Displaying 2 results from an estimated 2 matches for "coef2ols".
Did you mean:
coef1ols
2009 Nov 13
2
AR(2) modelling
...Just to be sure, I can do something I try to reconcile the ordinary
least square methods. And it works!
Christophe
PS : OLS code
###Ordinary Least Square
reslm <- lm(myserieminus0 ~ myserieminus1 + myserieminus2)
#summary(reslm)
coef1ols <- reslm$coefficients["myserieminus1"]
coef2ols <- reslm$coefficients["myserieminus2"]
resarols <- ar(myserie, method="ols", order.max=2, aic=FALSE)
cat("\t\tmanual ols\t\tar ols\n")
cat("first coef", coef1ols,"\t", resarols$ar[1], "\n")
cat("first coef", coef2ols,"...
2009 Nov 13
2
AR(2) modelling
...Just to be sure, I can do something I try to reconcile the ordinary
least square methods. And it works!
Christophe
PS : OLS code
###Ordinary Least Square
reslm <- lm(myserieminus0 ~ myserieminus1 + myserieminus2)
#summary(reslm)
coef1ols <- reslm$coefficients["myserieminus1"]
coef2ols <- reslm$coefficients["myserieminus2"]
resarols <- ar(myserie, method="ols", order.max=2, aic=FALSE)
cat("\t\tmanual ols\t\tar ols\n")
cat("first coef", coef1ols,"\t", resarols$ar[1], "\n")
cat("first coef", coef2ols,"...