• Function draws at data points can be visualized using plot_pred. If the pred argument is NULL, it is computed using the pred function with x=NULL.

  • The total signal f or any of its additive components can be plotted using plot_f.

plot_pred(
  fit,
  pred = NULL,
  group_by = "id",
  t_name = "age",
  MULT_STD = 2,
  verbose = TRUE,
  draws = NULL,
  reduce = function(x) base::mean(x),
  x = NULL,
  ...
)

plot_f(
  fit,
  pred = NULL,
  group_by = "id",
  t_name = "age",
  MULT_STD = 2,
  verbose = TRUE,
  draws = NULL,
  reduce = function(x) base::mean(x),
  comp_idx = NULL,
  color_by = NA,
  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.

x

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

...

additional arguments to plot_api_g or plot_api_c

comp_idx

Index of component to plot. The total sum is plotted if this is NULL.

color_by

name of coloring factor

Value

a ggplot object

See also

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