I am trying to figure out how Eviews calculate the weighted least squares standard errors, and I found out that, by using the residuals from the Actual,Fitted,Residuals Table, the sqrt of the diagonal of the resulting variance-covariance matrix is off by a constant compared to the reported standard errors in the equation window. I compare the results with the ones given by a weighted lm in R and if the regression command is as follows:
Code: Select all
output <- lm(function=y~x1+x2+x3, weights=weight)
you could get 2 different residual series by the following:
1)
Code: Select all
> output$residuals
2)
Code: Select all
> summary(output)$residuals
The reason why I bring up R here is because, result 1) is the same as the residual series reported in the Actual,Fitted,Residuals table, while 2) is the one used to calculate standard error in the equation window. I want to know how I could get to the residual series calculated by option 2). Would anyone mind sharing some ideas? Thanks.
Tchaithonov