简体   繁体   中英

plm with time effects

I'm trying to use the plm package in R for the first time.

I wish to estimate a pooling model with only time dummies, ie no unobserved heterogeneity.

I run a simple simple regression of the form:

plm(dep ~ x:y -1, data=data, index=c("panel_var", "time_var"), effect="time", model="pooling")

, where x is a continuous and ya categorical variable (and hence x:y the interaction). I added -1 to the model to not include an intercept given that I wished to have time dummies.

When using summary , the model correctly informs me time size of the 'panel' and 'time' dimensions. However, it does not report the time dummies. By inspection I found out that it is because it does not include time dummies in the regression (running a simple lm regression without an intercept gives the same answer).

Given that effect="time" option does not add time dummies, what does it do?

I know that my desired model can be run with lm but I wanted to explicitly state the panel structure and use the vcovSCC covariance structure included in the plm package (although this is probably feasible also after running an lm regression).

Thanks for help!

A pooled OLS model has neither time nor individual effects. Maybe the package should issue an error message. You probably want a fixed effects model, eg

data(Grunfeld, package="plm")
# estimate model with time effects
fe <- plm(inv ~ value + capital, data=Grunfeld, model = "within", effect = "time")

summary(fe)
# extract time effects
fixef(fe)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM