Learn R Programming

itsadug (version 0.8)

get_predictions: Get model predictions for specific conditions.

Description

Get model predictions for specific conditions.

Usage

get_predictions(model, cond = NULL, se = TRUE, f = 1.96,
  rm.ranef = NULL, print.summary = TRUE)

Arguments

model
A gam object, produced by gam or bam.
cond
A named list of the values to use for the predictor terms. Variables omitted from this list will have the closest observed value to the median for continuous variables, or the reference level for factors.
se
Logical: whether or not to return the confidence interval or standard error around the estimates.
f
A number to scale the standard error. Defaults to 1.96, resulting in 95% confidence intervals. For 99% confidence intervals use a value of 2.58.
rm.ranef
Logical: whether or not to remove random effects. Default is TRUE. Alternatively a string (or vector of strings) with the name of the random effect(s) to remove.
print.summary
Logical: whether or not to print a summary of the values selected for each predictor. Defaults to TRUE.

Value

  • A data frame with estimates and optinally errors.

See Also

Other functions for model predictions: get_difference; get_modelterm; get_random

Examples

Run this code
# see the vignette for examples:
vignette("plotfunctions", package="itsadug")

Run the code above in your browser using DataLab