R/Shaman.Stine.R

Defines functions Shaman.Stine

Shaman.Stine <-
function(x,p,a)
{
x <- as.matrix(x)
n <- nrow(x)
#b <- LSM(x,p)$coef
b=matrix(a)
tem = Stine(b,n,p); ahat0=tem$ahat.old
bc <- c(tem$ahat,b[p+1])
bc <- adjust(b,bc,p)
bc[p+1] <- mean(x)*(1-sum(bc[1:p]))
e <- RESID(x,bc)

return(list(coef=bc,coef0=ahat0,resid=e,mat=tem$mat))
}

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.