You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I was wondering whether you are aware of the functionality in the plm package to get the quasi-demeaned variables without doing the calcuclation yourself (as in here
Just use model.matrix() on a plm model and you get the model matrix (quasi-demeaned variables of the RHS) and pmodel.repsonse for the quasi-demeaned response.
Works likewise for demeaned variables of FE models.
One caveat though: for unbalanced two-way RE models, model.response and pmodel.repsonse output the original variables due to the specific estimation technique used for these models.
The text was updated successfully, but these errors were encountered:
Hi there,
I was wondering whether you are aware of the functionality in the
plm
package to get the quasi-demeaned variables without doing the calcuclation yourself (as in hereqdmean/R/qdmean.R
Lines 105 to 112 in 10f15b6
Just use
model.matrix()
on a plm model and you get the model matrix (quasi-demeaned variables of the RHS) andpmodel.repsonse
for the quasi-demeaned response.Buidling upon your example in the help page:
Works likewise for demeaned variables of FE models.
One caveat though: for unbalanced two-way RE models,
model.response
andpmodel.repsonse
output the original variables due to the specific estimation technique used for these models.The text was updated successfully, but these errors were encountered: