Learn R Programming

icmstate (version 0.2.0)

visualise_data: Visualise data for illness-death model, only applicable to Frydman(1995) setting.

Description

Visualise data for illness-death model, only applicable to Frydman(1995) setting.

Usage

visualise_data(data, msmFrydman)

Value

Returns a visualisation of illness-death data, with the transition from healthy to illness interval-censored and the other two transitions observed exactly or right-censored. If msmFrydman is specified, the support intervals from the fit are additionally plotted at the top of the data visualisation.

Arguments

data

A data.frame containing the columns named:

delta:

Did a transition from 1 -> 2 occur? (binary: 0 = no, 1 = yes); In the left-truncated case, delta = 2 indicates initially observed in state 2.

Delta:

Was the transition to state 3 observed? (binary: 0 = no, 1 = yes);

L:

Left timepoint of interval censored transition to state 2 (numeric);

R:

Right timepoint of interval censored transition to state 2 (numeric);

time:

Time of event (transition to 3) or right-censoring in state 2 (numeric);

trunc:

(optional) Left-truncation time (numeric); Only used for entries with delta = 2.

msmFrydman

A fitted model from msm_frydman

References

Frydman, H. (1995). Nonparametric Estimation of a Markov 'Illness-Death' Process from Interval- Censored Observations, with Application to Diabetes Survival Data. Biometrika, 82(4), 773-789. tools:::Rd_expr_doi("10.2307/2337344")

See Also

See msm_frydman for fitting a model.

Examples

Run this code
data <- data.frame(delta = c(0, 0, 1, 1), Delta = c(0, 1, 0, 1),
                   L = c(NA, NA, 1, 1.5), R = c(NA, 3, 2, 3),
                   time = c(4, 5, 6, 7))

mod_frydman <- msm_frydman(data)
visualise_data(data, mod_frydman)

Run the code above in your browser using DataLab