R/residuals.fm.R

Defines functions residuals.fm

Documented in residuals.fm

residuals.fm <- function(object, ...) 
{
    if (class(object)[1] == "fm"|class(object)[1] == "ftsm"){
        return(structure(list(x = object$x1, y = object$y1, z = t(object$residuals$y), xname = object$y$xname, yname = object$y$yname, call = match.call()), 
               class = "fmres"))
    }
    else {
         warning("object is neither a functional time series model nor a functional model.")
    }
}

Try the ftsa package in your browser

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

ftsa documentation built on May 29, 2024, 2:47 a.m.