R/ysT.R

Defines functions ysT

ysT <-
function(x,b,e)
{
    p <- length(b)-2
    n <- nrow(x)
    tm <- 1:n
    y <- x
    for(i in (p+1):n)
        y[i,1] <- b[p+1,1] + b[p+2,1]*tm[i] + sum(b[1:p,1]*y[(i-1):(i-p),1]) + e[i-p]
    return(y)
}

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.