R/mainf.R

Defines functions mainf

mainf <-
function(b,h,p)
{
    mf <- c(1, b[1], rep(0,h-1))
    for(i in 2:h)
    {
        idx <- 1:min(i,p)
        mf[i+1] <- sum(b[idx] * rev(mf[1:i])[idx])
    }
    return(mf)
}

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.