R/FPE.trace.R

Defines functions FPE.trace

FPE.trace<-function(res, p = 2)
{
    d = length(res[1,])
    n = length(res[,1])
    if(d == 1)
    {
        out = (p*d+n)/(n-p*d)*var(res)
    }
    else
    {
        out = (p*d+n)/(n-p*d)*sum(diag(cov(res)))
    }
    return(out)
}

Try the ftsa package in your browser

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

ftsa documentation built on Jan. 13, 2021, 6:21 p.m.