Hi, As I didn't get a response last week, I try it again. I want to calculate the t- and p-values for a linear model using the Newey West estimator. I tried this Code and it usually worked just fine:
> oberlm <- lm(DYH ~ BIP + Infl + EOil, data=HU_H) > coeftest(oberlm, NeweyWest(oberlm, lag=2)) t test of coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.1509950 0.0743832 2.0300 0.179486 BIP -5.5131683 1.2536813 -4.3976 0.048016 * Infl -0.0623530 0.0036215 -17.2175 0.003356 ** EOil 8.6762170 0.0853216 101.6884 9.67e-05 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 But then I got an error and I don't understand what it means or even why it occurs now: > oberlm <- lm(DYI ~ BIP + BrInv_bw + EOil, data=HU_I) > coeftest(oberlm, NeweyWest(oberlm, lag=2)) Fehler in if ((dimension < 1) | (dimension > n)) stop("wrong embedding dimension") : Argument hat Länge 0 Zusätzlich: Warning message: In log(det(varE[[m - order.min + 1]])) : NaNs wurden erzeugt Can anyone understand there the problem is? Best, Marina [[alternative HTML version deleted]]
______________________________________________ R-help@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.