Description Usage Arguments Details Value Note References Examples

This function computes the transition probability matrix for the illness-death model, by using the Aalen-Johansen technique (suitable for Markov models) or alternatively a non-Markovian estimator. It creates a ‘TPidm’ object.

1 2 |

`data` |
A data.frame including at least four columns named |

`s` |
The current time for the transition probabilities to be computed; |

`t` |
The future time for the transition probabilities to be computed. Default is “last” which means the largest time among the uncensored entry times for the intermediate state and the final absorbing state. |

`cov` |
A categorical variable for the optional by-group analysis; this variable must be a |

`CI` |
If |

`level` |
Level of confidence intervals. Default is |

`ci.transformation` |
Transformation applied to compute confidence intervals. Possible choices are “linear”, “log”, “log-log” and “cloglog”. Default is “linear”. |

`method` |
The method used to compute the transition probabilities. Possible options are “AJ” (Aalen-Johansen) or “NM” (non-Markovian). Default is “NM”. |

If s = 0 this function TPidm reports the state occupation probabilities at time t. For s > 0, the transition probabilities are provided. The default method “NM” computes the estimator proposed by de Uña-Álvarez and Meira-Machado (2015), which is consistent regardless the Markov assumption. To fit a Markovian transition probability matrix, use the “AJ” method. Note that the Aalen-Johansen occupation probabilities are consistent even when the process is non-Markov (Datta and Satten, 2001), but this is not true for the Aalen-Johansen transition probabilities (Meira-Machado et al., 2006). If `CI`

is `TRUE`

(default), TPidm calculates the estimated variance and the confidence intervals by using the plug-in variance described in Balboa and de Uña-Álvarez (2018) (method = “NM”), or the standard formulas for Markovian processes (method = “AJ”, see Andersen et al., 1993).

An object of class ‘TPidm’. It is a list containing the following objects:

`s ` |
The user-supplied current time for the transition probabilities. |

`t ` |
The user-supplied future time for the transition probabilities. |

`method ` |
The method used to compute the transition probabilities. |

`times ` |
The uncensored entry times for the intermediate state and the final absorbing state which fall between s and t. |

`probs ` |
A matrix with transition probability estimates |

`all.probs ` |
An array with transition probability estimates |

`p.trans ` |
Possible transitions among the states. If s = 0, possible transitions are “1 1”, “1 2” and “1 3”; if s > 0 possible transitions are “1 1”, “1 2”, “1 3”, “2 2” and “2 3”. |

`CI ` |
A logical value chosen by the user. |

`ci.transformation ` |
Transformation chosen by the user to compute the confidence intervals. |

If `time1=Stime`

and `event1=event=1`

, the function `TPidm`

assumes that a direct transition from the initial state to the final absorbing state has occurred. That is, zero sojourn times are not allowed for the intermediate state (replacing the zeros by a small positive amount is a way to introduce such cases).

If `cov`

is specified, the main function provides estimations of transition probabilities for each level of the covariate.

Andersen P. K., Borgan O., Gill R. D. and Keiding N. (1993). Statistical models based on counting processes. Springer Series in Statistics. New York, NY: Springer.

Datta S. and Satten G. A. (2001). Validity of the Aalen-Johansen estimators of the stage occupation probabilities and Nelson-Aalen estimators of integrated transition hazards for non-Markov models. *Statistics and Probability Letters* **55(4)**, 403–411.

de Uña-Álvarez J. and Meira-Machado L. (2015). Nonparametric estimation of transition probabilities in a non-Markov illness-death model: a comparative study. *Biometrics* **71**, 364–375.

Meira-Machado L. F., de Uña-Álvarez J. and Cadarso-Suárez C. (2006). Nonparametric estimation of transition probabilities in a non-Markov illness-death model. *Lifetime Data Anal* **12(3)**, 325–344.

Balboa-Barreiro V., de Uña-Álvarez J. (2018). Estimation of Transition Probabilities for the Illness-Death Model: Package `TP.idm`

. *Journal of Statistical Software* **83(10)**, 1–19.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
data(colonTP)
# create a TPidm object with s = 0, t = "last" (default),
# CI = TRUE (default) and method = "AJ":
aj0ci <- TPidm(colonTP, s = 0, method = "AJ")
plot(aj0ci) # plotting all occupation probabilities
#or
# create a TPidm object with s = 365, t = "last" (default),
# CI = FALSE and method = "NM" (default):
nm365 <- TPidm(colonTP, s = 365, CI=FALSE)
summary(nm365) # summarizing the results
# or
# create a TPidm object with cov = "rx":
nm365cov <- TPidm(colonTP, s = 365, t = 1095, cov = "rx", CI=FALSE)
summary(nm365cov) # summarizing the results
``` |

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.