predict.spikeSlabGAM | R Documentation |
Obtain posterior predictive/credible intervals from a spike-and-slab model
## S3 method for class 'spikeSlabGAM' predict( object, newdata = NULL, type = c("response", "link", "terms"), terms = NULL, aggregate = mean, quantiles = NULL, addIntercept = is.null(terms), ... )
object |
a |
newdata |
an optional |
type |
the type of prediction required. The default is on the scale of
response, the alternative |
terms |
an optional character vector of term labels or variable names for which to return fits/predictions/credible regions. If variable names instead of term labels are supplied, the function returns predictions/estimates for all terms associated with these variables, i.e. their main effects (usually both linear and smooth for numeric covariates) and all interaction terms they are involved in. |
aggregate |
(function) the summary statistic of the posterior predictive
of the linear predictor. Defaults to |
quantiles |
(numeric) an optional vector of quantiles for borders of credible regions of the returned values. Defaults to NULL. |
addIntercept |
include global intercept term in prediction/estimate?
Defaults to TRUE if |
... |
arguments passed from or to other methods (not used) |
If type ="terms"
, a list of data.frame
s containing the
requested pointwise summary statistics for the supplied terms (use e.g.
Reduce("+", ...)
to get row-wise sums of the list-entries).
Otherwise, a data.frame
containing the requested pointwise summary
statistics of the posterior predictive of the linear predictor
(type ="link"
) or the conditional expectation of the response
(type ="response"
) is returned.
Fabian Scheipl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.