Skip to content
Prev 18771 / 29559 Next

Question about LM test for residual autocorrelation in R

Hi Dongwoo:

I tried the following example:
[1] "type"            "rho"             "coefficients"    "rest.se"        
 [5] "LL"              "s2"              "SSE"             "parameters"     
 [9] "logLik_lm.model" "AIC_lm.model"    "method"          "call"           
[13] "residuals"       "opt"             "tarX"            "tary"           
[17] "y"               "X"               "fitted.values"   "se.fit"         
[21] "similar"         "ase"             "rho.se"          "LMtest"         
[25] "resvar"          "zero.policy"     "aliased"         "listw_style"    
[29] "interval"        "fdHess"          "optimHess"       "insert"         
[33] "trs"             "LLNullLlm"       "timings"         "f_calls"        
[37] "hf_calls"        "intern_classic"  "coeftitle"       "Coef"           
[41] "NK"              "Wald1"           "correlation"     "correltext"     
[45] "LR1"
[,1]
[1,] 0.2891926
and it does indeed have the LMtest result.

Or were you looking for the formula, please?

Thanks,
Erin