plot_pred {lgpr} | R Documentation |
Visualizing model predictions or inferred covariate effects
Description
Function draws at data points can be visualized using
plot_pred
. If thepred
argument isNULL
, it is computed using thepred
function withx=NULL
.The total signal
f
or any of its additive components can be plotted usingplot_f
.
Usage
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 |
group_by |
name of the grouping variable (use |
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 |
reduce |
Only has effect if |
x |
Deprecated argument. This is now taken from the |
... |
additional arguments to |
comp_idx |
Index of component to plot. The total sum is plotted
if this is |
color_by |
name of coloring factor |
Value
a ggplot
object
See Also
Other main plot functions:
plot_components()
,
plot_draws()