Learn R Programming

itsadug (version 0.8)

get_random: Get model predictions for the random effects.

Description

Get model predictions for the random effects.

Usage

get_random(model, fun = NULL, cond = NULL, n.grid = 30,
  print.summary = TRUE)

Arguments

model
A gam object, produced by gam or bam.
fun
A string or function description to apply to the random effects estimates. When NULL (default), the estimates for the random effects are returned.
cond
A named list of the values to restrict the estimates for the random predictor terms. When NULL (default) all levels are returned.
n.grid
Number of data points estimated for each random smooth.
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 for random effects.

See Also

Other functions for model predictions: get_difference; get_modelterm; get_predictions

Examples

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

Run the code above in your browser using DataLab