[R] Extract model matrix from plm

yves croissant
2010-05-14T04:40:03Z

There is actually a model.matrix method for plm objects. Unfortunately,
it is not currently exported and therefore can't be used by the end user
of plm. I'll fix that in the next update. However, you won't find in
this matrix the dummies because demeaned values are used. If you really
want the matrix that includes the individual dummies, you'd better use
lm with factor(id) somewhere in the formula, where id is the individual
index.


Le mardi 11 mai 2010 ? 09:30 -0400, Abiel X Reinhart a ?crit
:
> Is there a way to recover the model matrix that is being used by the plm
package? For example, if you run a panel regression with fixed effects, the
model matrix would contain the generated dummy variables for the groups.
>
> Thanks.
>
> Abiel Reinhart
>
>
>
> This communication is for informational purposes only. I...{{dropped:30}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>