Plot observed and fitted trajectories from fitted brokenstick model
plot_trajectory(
x,
newdata = NULL,
hide = c("right", "left", "boundary", "internal", "none"),
.x = NULL,
group = NULL,
color_y = c(grDevices::hcl(240, 100, 40, 0.7), grDevices::hcl(240, 100, 40, 0.8)),
size_y = 2,
linetype_y = 1,
shape_y = 19,
color_yhat = c(grDevices::hcl(0, 100, 40, 0.7), grDevices::hcl(0, 100, 40, 0.8)),
size_yhat = 2,
linetype_yhat = 1,
shape_yhat = 19,
color_imp = c("grey80", "grey80"),
size_imp = 2,
ncol = 3L,
xlab = NULL,
ylab = NULL,
xlim = NULL,
ylim = NULL,
show = c(TRUE, TRUE, FALSE),
n_plot = 3L,
scales = "fixed",
theme = ggplot2::theme_light(),
whatknots = "droplast",
...
)
An object of class ggplot
An object of class brokenstick
.
A data.frame
or matrix
Character indicating which knots should
The x
argument of the predict.brokenstick()
function.
A vector with group identifications
A character vector with two elements specifying the symbol and line color of the measured data points
Dot size of measured data points
Line type of data points
Symbol for data points
A character vector with two elements specifying the symbol and line color of the predicted data points
Dot size of predicted data points
Line type of predicted data
Symbol for predicted data
A character vector with two elements specifying the symbol and line color of the imputed data
Dot size of imputed data
Number of columns in plot
The label of the x-axis
The label of the y-axis
Vector of length 2 with range of x-axis
Vector of length 2 with range of y-axis
A logical vector of length 3. Element 1 specifies
whether the observed data are plotted, element 2 specifies
whether the broken stick are plotted, element 3 specifies
whether imputations are plotted. The default is
c(TRUE, TRUE, FALSE)
.
A integer indicating the number of individual plots.
The default is 3, which plots the trajectories of the first three
groups. The n_plot
is a safety measure to prevent unintended
plots of the entire data set.
Axis scaling, e.g. "fixed"
, "free"
, and so on
Plotting theme
Deprecated.
Extra arguments passed down to predict.brokenstick()
.
plot.brokenstick