fitted {bayesGAM}R Documentation

Extract fitted values from a model fit by bayesGAM

Description

Method for bayesGAMfit objects. Extracts the fitted values based on a specified quantile for the posterior distribution. The median is the default.

Usage

## S4 method for signature 'bayesGAMfit'
fitted(object, ...)

Arguments

object

an object of class bayesGAMfit, usually a result of a call to bayesGAM.

...

additional arguments to pass to coefficients

Value

Numeric vector of fitted values

Examples

require(stats); require(graphics)
f <- bayesGAM(weight ~ np(height), data = women, family = gaussian, 
              iter = 500, chains = 1)
plot(fitted(f), women$weight, type='o', xlab="fitted", ylab="actual")

[Package bayesGAM version 0.0.2 Index]