This calls plot_f for all model components.

plot_components(
  fit,
  pred = NULL,
  group_by = "id",
  t_name = "age",
  MULT_STD = 2,
  verbose = TRUE,
  draws = NULL,
  reduce = function(x) base::mean(x),
  color_by = NA,
  no_err = FALSE,
  ylim = NULL,
  draw = TRUE,
  nrow = NULL,
  ncol = NULL,
  gg_add = NULL,
  x = NULL,
  ...
)

Arguments

fit

An object of class lgpfit.

pred

An object of class GaussianPrediction or Prediction. If pred=NULL, the pred function is called with the given reduce and draws arguments.

group_by

name of the grouping variable (use group_by=NA to avoid grouping)

t_name

name of the x-axis variable

MULT_STD

a multiplier for standard deviation

verbose

Can this print any messages?

draws

Only has effect if pred=NULL.

reduce

Only has effect if pred=NULL.

color_by

Names of coloring factors. Can have length 1 or equal to the number of components. See the color_by argument of plot_f.

no_err

Should the error ribbons be skipped even though they otherwise would be shown? Can have length 1 or equal to number of components + 1. See the no_err argument of plot_api_c.

ylim

a vector of length 2 (upper and lower y-axis limits), or NULL

draw

if this is TRUE, the plot grid is drawn using arrangeGrob

nrow

number of grid rows

ncol

number of grid columns

gg_add

additional ggplot obejct to add to each plot

x

Deprecated argument. This is now taken from the pred object to ensure compatibility.

...

additional arguments to plot_api_c

Value

a list of ggplot objects invisibly

See also

Other main plot functions: plot_draws(), plot_pred()