R/OLS.AR.R

Defines functions OLS.AR

OLS.AR <-
function(x,p)
{
    x <- as.matrix(x)
    n <- nrow(x)
    B <- LSM(x,p)
    b <- B$coef;xmat=B$xmat
    e <- B$resid    
    s2 <- sum(e^2)/(nrow(x)-length(b))

return(list(coef=b,resid=e,covmat=B$covmat,xmat=xmat))
}

Try the VAR.etp package in your browser

Any scripts or data that you put into this service are public.

VAR.etp documentation built on Aug. 31, 2023, 9:08 a.m.