R/Shaman.Stine.R

Defines functions Shaman.Stine

Shaman.Stine <-
function(x,p,h)
{
x <- as.matrix(x)
n <- nrow(x)
b <- LSM(x,p)$coef
bc <- c(Stine(b,n,p),b[p+1])

    bc <- adjust(b,bc,p)
    
bc[p+1] <- mean(x)*(1-sum(bc[1:p]))
e <- RESID(x,bc)
f <- {}
if(h > 0)
f <- AR.Fore(x,bc,h)
return(list(coef=bc,resid=e,forecast=f))
}

Try the BootPR package in your browser

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

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