Description Usage Arguments Details Value Author(s) See Also Examples

This function provides a graphical representation of individual dynamic predictions obtained from a joint latent class model and plots simultaneously the observed outcome.

1 2 3 |

`x` |
a dynpred object, containing the predicted probabilities of event in a time window, obtained from a joint latent class model. |

`subject` |
a vector containing the identifiers of the subjects the user wants to display. If NULL (the default), all subjects are plotted. |

`landmark` |
a vector containing the landmark times from which the probabilities are to be plotted. If NULL (the default), all landmarks are used. If several horizon are specified, only one landmark should be selected. |

`horizon` |
a vector containing the horizon times from which the probabilities are to be plotted. If NULL (the default), all horizons are used. If several landmarks are specified, only one horizon should be selected. |

`add` |
logical indicating if the plot should be added to an existing plot. By default (add=FALSE), a new plot is created. |

`...` |
optional graphical parameters. |

Two types of plot are provided for the moment :

- if one horizon is selected (and one or several landmarks), each prediction is represented by a point at the landmark time. If available, the predictions are surrounded by confidence intervals.

- if several horizons (t1, t2, etc) and only one landmark (s) is selected, a line linking the predictions (placed at abscissa s+t1, s+t2, etc) is drawn. Confidence bands (if available) are represented as dotted lines.

returns NULL

Cecile Proust-Lima, Viviane Philipps

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
## Not run:
## Joint latent class model with 2 classes :
m32 <- Jointlcmm(Ydep1~Time*X1,mixture=~Time,random=~Time,subject="ID",
classmb=~X3,ng=2,survival=Surv(Tevent,Event)~X1+mixture(X2),
hazard="3-quant-splines",hazardtype="PH",data=data_lcmm,B = c(0.64, -0.62,
0, 0, 0.52, 0.81, 0.41, 0.78, 0.1, 0.77, -0.05, 10.43, 11.3, -2.6, -0.52, 1.41,
-0.05, 0.91, 0.05, 0.21, 1.5))
## Predictions at landmark 10 and 12 for horizon 3, 5 and 10 for two subjects :
dynpred.m32 <- dynpred(m32,landmark=c(10,12),horizon=c(3,5,10),var.time="Time",
fun.time=function(x){10*x},newdata=data_lcmm[4:8,],draws=TRUE,ndraws=2000)
## Plot of the predictions at landmark 10 for horizon 3,5,10 :
plot(dynpred.m32,landmark=10)
## Plot of the predictions at landmark 10 and 12 for horizon 3 :
plot(dynpred.m32,horizon=3)
## End(Not run)
``` |

lcmm documentation built on May 31, 2017, 5:19 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.