goodness_of_fit {FlexVarJM} | R Documentation |
Predictions for the goodness of fit, of the random effects, the current value for each individuals and the cumulative hazard function for both events
Description
Predictions for the goodness of fit, of the random effects, the current value for each individuals and the cumulative hazard function for both events
Usage
goodness_of_fit(object, graph = FALSE, break.times = NULL)
Arguments
object |
an object of class lsjm |
graph |
a boolean to indicate to print graphics, False by default |
break.times |
a vector of times for the time points of longitudinal graphic |
Value
A list which contains the following elements :
tables
A list with the table of the predicted random effect, the table of the predicted current value, table(s) of predictive cumulative hazard function(s)
graphs
A list with 2 or 3 graphs : one for the longitudinal adjustment and one for each risk function
Examples
#Fit a joint model with competing risks and subject-specific variability
example <- lsjm(formFixed = y~visit,
formRandom = ~ visit,
formGroup = ~ID,
formSurv = Surv(time, event ==1 ) ~ 1,
timeVar = "visit",
data.long = Data_toy,
variability_hetero = TRUE,
formFixedVar =~visit,
formRandomVar =~visit,
correlated_re = TRUE,
sharedtype = c("current value", "variability"),
hazard_baseline = "Weibull",
formSlopeFixed =~1,
formSlopeRandom = ~1,
indices_beta_slope = c(2),
competing_risk = TRUE,
formSurv_CR = Surv(time, event ==2 ) ~ 1,
hazard_baseline_CR = "Weibull",
sharedtype_CR = c("current value", "variability"),
S1 = 100,
S2 = 1000,
nproc = 1,
maxiter = 100,
Comp.Rcpp = TRUE
)
#Assesment of the goodness of fit:
gof <- goodness_of_fit(example, graph = TRUE)
gof$tables
gof$graphs
[Package FlexVarJM version 0.1.0 Index]