Hi,
I'm actually I’m performing a TSLS linear multiple regression on annually
data which go from 1971 to 1997. After performing the TSLS regression, I
tried to extract the R squared value using “output$r.squared” function and
to perform autocorrelation (Durbin Watson and Breush Godfrey) and
heterokedasticity tests (Breush-pagan and Goldfeld Quandt) but I have
errors messages. More specifically, this is function that I write to R and
below its response :
for R^2 :
> output$r.squared
NULL
for heterokedasticity tests :
>bptest(reg1)
Error in terms.default(formula) : no terms component
and for autocorrelation test, when I try :
durbin.watson(reg1$residuals, max.lag=10)
[1] 1.509 2.520 2.247 2.001 1.743 1.092 1.392 1.439 1.468 1.035
this give me only the durbin watson value and not the probabilities
(p-value)
When performing these tests on lm object I have no problem. So my question
is how to extract R^2 from a tsls regression (object) and how to perform
autocorrelation and heterokedasticity tests on tsls regression. I looked at
the sem package but I found no answer to my questions. So please is there
any person who can help me.
Think you in advance
[[alternative HTML version deleted]]