fitted function

Extract fitted values from a model fit by bayesGAM

Extract fitted values from a model fit by 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, ...)

Arguments

  • object: an object of class bayesGAMfit, usually a result of a call to bayesGAM.
  • ...: additional arguments to pass to coefficients

Returns

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")
  • Maintainer: Samuel Thomas
  • License: GPL-3
  • Last published: 2022-03-17

Useful links