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")