[R] linearHypothesis() ERROR-Message
John Fox
jfox at mcmaster.ca
Fri Jul 11 03:54:08 CEST 2014
Dear Katharina,
There's no specific method for linearHypothesis() for objects produced by plm(), but as you say, the default method seems to work. For example, following example(plm):
---------- snip -----------
> linearHypothesis(zz, names(coef(zz)), test="F")
Linear hypothesis test
Hypothesis:
log(pcap) = 0
log(pc) = 0
log(emp) = 0
unemp = 0
Model 1: restricted model
Model 2: log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
Res.Df Df F Pr(>F)
1 768
2 764 4 3064.8 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
--------------- snip -------------
The error message seems reasonably self-explanatory, and given the hypothesis that you're testing -- that all coefficients are 0 -- it suggests that the covariance matrix of the coefficients is numerically singular. You can check that, e.g., by examining the eigenstructure of vcov(fixed.interest3).
I agree that's curious given that plm() doesn't complain. Are you able to get coefficient standard errors in summary(fixed.interest3)?
Without your data, it's not possible to say more, and you could make the problem reproducible by supplying the data. In any event, I've just returned from several weeks out of town and wouldn't be able to look at your data for a few days.
I hope this helps,
John
On Thu, 10 Jul 2014 12:04:46 +0200
"Katharina Mersmann" <kmersman at smail.uni-koeln.de> wrote:
> Dear Community,
>
> unfortunately I can´t give you an reproducable example, because I really do
> not understand why this messages pops up.
>
> I estimate an Fixed Effects Modell, controlling for HAC, because F-statistic
> changes, I want to compute it, for the other model-specifications it works,
>
> But for this special one I get the following error:
>
>
>
> > fixed.interest3<-plm(CSmean~ numfull_FCRlong_adj+exp(numfull_FCRlong_adj),
>
> + data=data.plm,index = c("countrynr","quartal"),
> model="within")
>
> > ###F-Test
>
> > coefs <- names(coef(fixed.interest3))
>
> > linearHypothesis(fixed.interest3,coefs,test="F", vcov=function(x)
> vcovHC(x, method = "arellano"))
>
> Fehler in solve.default(L %*% V %*% t(L)) :
>
> System ist für den Rechner singulär: reziproke Konditionszahl =
> 1.37842e-19 „system is computationally singular reciprocal condition
> number”
>
> > drop(coefs)
>
> [1] "numfull_FCRlong_adj" "exp(numfull_FCRlong_adj)"
>
> >
>
>
>
> Is something wrong in the code. Or is it because of the model?
>
>
>
>
>
> Thanks in advance and a really nice day
>
> Katie
>
>
> [[alternative HTML version deleted]]
>
------------------------------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
More information about the R-help
mailing list