plot.haz1tsLMM {TwoTimeScales} | R Documentation |
Plot method for a haz1ts object.
Description
plot.haz1tsLMM()
is a plot method for objects of class haz1tsLMM
.
Usage
## S3 method for class 'haz1tsLMM'
plot(
x,
which_plot = c("hazard", "covariates"),
plot_grid = NULL,
plot_options = list(),
...
)
Arguments
x |
The output of the function |
which_plot |
The type of plot required. Can be one of |
plot_grid |
(optional) A named vector containing the parameters to build a new
grid of intervals over |
plot_options |
A list with all possible options for any of the plots:
|
... |
Further arguments to plot. |
Details
The function obtainSmoothTrend
from the R-package LMMsolver
is
used here. We refer the interested readers to https://biometris.github.io/LMMsolver/
for more details on LMMsolver
and its usage.
Value
A plot of the type required.
Examples
## preparing data - no covariates
dt1ts <- prepare_data(data = reccolon2ts,
s_in = "entrys",
s_out = "timesr",
events = "status",
ds = 180)
## fitting the model with fit1ts() - default options
mod1 <- fit1ts(dt1ts,
optim_method = "LMMsolver")
plot(mod1)