1

I am new here :) I want to use the following equation for my bachelor thesis:

log⁡(production_it )= β_0 + β_1 * log⁡(temp_it ) + β_2 * log⁡(rain_it ) + β_3 * drought_it + β_4 * flood_it + β_5 * storm_it + β_6 * log⁡(labour_it )+ β_7* log⁡(Fertilitzer_it )+ β_8* log⁡(capital_it )+ β_9* log⁡(area_it )+ η_t+ u_i+ ε_it

where i: countries t: years

For my unterstading, this is a within/fixed effect model.

Can I write this equation with the following code in R? I am not sure if I can use the plm() to display the consistent intercept β_0. I always thought there is an intercept for every country and every year.

r1.time.fixed <- plm(log(production) ~ log(temp) + log(rain) + drought + flood + storm + log(labour) + log(fertilizer) +log(capital) +log(area), data = pm.rich, model = "within", effect = "twoways") 
Helix123
  • 3,502
  • 2
  • 16
  • 36
mag123
  • 21
  • 3
  • The fixed effect per individual and time you can extract via `fixef()`. Via `within_intercept()` you can have the fixed effects model with an intercept, see documentation of that function for details. – Helix123 Mar 06 '21 at 19:40
  • This is a two-way fixed-effects model. People often do this to estimate the difference-in-difference model. There is an interesting [paper](http://web.mit.edu/insong/www/pdf/FEmatch-twoway.pdf) about how that only works under a certain potentially restrictive set of assumptions. – DaveArmstrong Mar 07 '21 at 00:26
  • If no more information is given (about the terms nu_t, u_it), couldn't this be a 2-way RE model as well? – Helix123 Mar 07 '21 at 18:42

0 Answers0