Extract fitted values from a model fit by bayesGAM
bayesGAM
Method for bayesGAMfit
objects. Extracts the fitted values based on a specified quantile for the posterior distribution. The median is the default.
## S4 method for signature 'bayesGAMfit' fitted(object, ...)
object
: an object of class bayesGAMfit
, usually a result of a call to bayesGAM
....
: additional arguments to pass to coefficients
Numeric vector of fitted values
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")
Useful links