1

I have the following panel regression:

reg.soja.4 <- plm(Soja_Produtividade ~ 
                     jan_temp_dev + fev_temp_dev + mar_temp_dev + abr_temp_dev + 
                     mai_temp_dev + jun_temp_dev + jul_temp_dev + ago_temp_dev +
                     set_temp_dev + out_temp_dev + nov_temp_dev + dez_temp_dev + 
                     jan_pluv_dev + fev_pluv_dev + mar_pluv_dev + abr_pluv_dev + 
                     mai_pluv_dev + jun_pluv_dev + jul_pluv_dev + ago_pluv_dev +
                     set_pluv_dev + out_pluv_dev + nov_pluv_dev + dez_pluv_dev +
                     + factor(Estado_Ano), 
                   data = painel_soja.p, index=c("Estado_Municipio","Ano"),model="within")

Also, I have a dataframe for some new information for the following years for the first 24 coefficients (jan_temp_dev to dez_pluv_dev).

Like this:

Panel with prediction values

I would like to use predict, to calculate the Soja_Produtividade for the next 80 years. Does anyone know how to do this? How can I exclude the other factors (Ano, Estado_Ano and Estado_Municipio) from my predict?

  • A remark unrelated to your question: it seems, your panel data is defined on the lower level of months rather than years. – Helix123 Nov 29 '21 at 08:36
  • Does this answer your question? [Predict out of sample on fixed effects model](https://stackoverflow.com/questions/65702581/predict-out-of-sample-on-fixed-effects-model) – Helix123 Apr 17 '22 at 19:09

0 Answers0