R/flexgam_extra.R

Defines functions fitted.values.flexgam fitted.flexgam resid.flexgam residuals.flexgam coef.flexgam coefficients.flexgam

Documented in coefficients.flexgam coef.flexgam fitted.flexgam fitted.values.flexgam resid.flexgam residuals.flexgam

coefficients.flexgam <- function(object, ... ) {
    coef <- c(object$beta_k,object$f_k$coefficients)
    names(coef) <- c(names(object$beta_k), paste("Psi.",1:length(object$f_k$coefficients),sep=""))
    coef
}

coef.flexgam <- function(object, ... ) {
    coef <- c(object$beta_k,object$f_k$coefficients)
    names(coef) <- c(names(object$beta_k), paste("Psi.",1:length(object$f_k$coefficients),sep=""))
    coef
}

residuals.flexgam <- function(object, ...) {
    res <- object$response - object$fitted
    attr(res,"names") <- NULL
    as.numeric(res)
}

resid.flexgam <- function(object, ...) {
    res <- object$response - object$fitted
    attr(res,"names") <- NULL
    as.numeric(res)
}

fitted.flexgam <- function(object, ...) {
    as.numeric(object$fitted)
}

fitted.values.flexgam <- function(object, ...) {
    as.numeric(object$fitted)
}

Try the FlexGAM package in your browser

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

FlexGAM documentation built on May 2, 2019, 2:16 a.m.