Guillermo Julián San Martín
2007-Feb-19 00:01 UTC
[R] Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
Hi,
I am trying to obtain the heteroskedasticity consitent standard errors
(HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or
systemfit:
#### tsls ####
library (sem)
Reg2SLS <-tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D)
summary (Reg2SLS)
#### systemfit ####
library (systemfit)
RS <- LnP~Sc+Ag+Ag2+Var+R+D
Inst <- ~I2+Ag+Ag2+Var+R+D
labels <-list("RS")
system <-list(RS)
Reg2SLS <- systemfit("2SLS", system, labels, Inst, saveMemory=TRUE)
summary (Reg2SLS)
If I try to obtain the HCSE with robcov I obtain the following error message
in both cases:
Error in rep.default(1, p) : rep() incorrect type for second argument
If I tried to apply vcovHAC or vcovHC in the systemfit output of 2SLS I
receive the following messages of errors respectively:
Error in estfun(x) : no applicable method for "estfun" (for vcovHAC)
Error in terms.default(object) : no terms component (for vcovHC)
If somebody can help me to solve this problem I will thank you a lot.
Best regards
Guillermo
[[alternative HTML version deleted]]
Guillermo Julián San Martín
2007-Feb-19 10:37 UTC
[R] Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
Hi,
I am trying to obtain the heteroskedasticity consitent standard errors
(HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or
systemfit:
#### tsls ####
library (sem)
Reg2SLS <-tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D)
summary (Reg2SLS)
#### systemfit ####
library (systemfit)
RS <- LnP~Sc+Ag+Ag2+Var+R+D
Inst <- ~I2+Ag+Ag2+Var+R+D
labels <-list("RS")
system <-list(RS)
Reg2SLS <- systemfit("2SLS", system, labels, Inst, saveMemory=TRUE)
summary (Reg2SLS)
If I try to obtain the HCSE with robcov I obtain the following error message
in both cases:
Error in rep.default(1, p) : rep() incorrect type for second argument
If I tried to apply vcovHAC or vcovHC in the systemfit output of 2SLS I
receive the following messages of errors respectively:
Error in estfun(x) : no applicable method for "estfun" (for vcovHAC)
Error in terms.default(object) : no terms component (for vcovHC)
If somebody can help me to solve this problem I will thank you a lot.
Best regards
Guillermo
[[alternative HTML version deleted]]
Reasonably Related Threads
- Problems with obtaining t-tests of regression coefficients applying consistent standard errors after run 2SLS estimation. Clearer !!!!!
- Problems with obtaining t-tests of regression
- 2SLS / TSLS / SEM non-linear
- question about 2SLS
- limited formula length in tsls