R/sdfhd.R

Defines functions sdfhd

Documented in sdfhd

sdfhd <- function(n, alpha=1, phi=numeric(0), theta=numeric(0), lmodel=c("FD", "FGN", "PLA", "NONE")) {
    lmodel <- match.arg(lmodel)
    if(!(InvertibleQ(phi)&&InvertibleQ(theta)&&alpha>0&&alpha<2)) 
        stop("error: non-invertible or non-stationary")
    if(length(phi)==0&&length(theta)==0) s1 <- 1 else s1 <- 2*pi*sdfarma(n, phi, theta)
    s2 <- switch(lmodel,
     FD   = sdfFD((1-alpha)/2, n),
     FGN  = sdfFGN(1-alpha/2, n),
     PLA  = sdfPLA(alpha, n),
     PLS  = sdfPLS(alpha, n),
     NONE = sdfFGN(0.5, n))
     s1*s2
     }

Try the FGN package in your browser

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

FGN documentation built on May 30, 2017, 7:19 a.m.