https://github.com/cran/ftsa
Raw File
Tip revision: 7621951a183186ccd8706e35121ccdc4dbfddd1a authored by Shang H on 10 December 2014, 07:56:05 UTC
version 4.1
Tip revision: 7621951
residuals.fm.R
`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.")
    }
}
back to top