I would like to extract the variance-covariance matrix from a simple plm
fixed effects model. For example:
library(plm)
data("Grunfeld")
M1 <- plm(inv ~ lag(inv) + value + capital, index = 'firm',
data = Grunfeld)
The usual vcov
function gives me:
vcov(M1)
lag(inv) value capital
lag(inv) 3.561238e-03 -7.461897e-05 -1.064497e-03
value -7.461897e-05 9.005814e-05 -1.806683e-05
capital -1.064497e-03 -1.806683e-05 4.957097e-04
plm
's fixef
function only gives:
fixef(M1)
1 2 3 4 5 6 7
-286.876375 -97.190009 -209.999074 -53.808241 -59.348086 -34.136422 -34.397967
8 9 10
-65.116699 -54.384488 -6.836448
Any help extracting the variance-covariance matrix that includes the fixed effects would be much appreciated.