Learn R Programming

mvna (version 1.0-2)

predict.mvna: Calculates Nelson-Aalen estimates at specified time-points

Description

This function gives the Nelson-Aalen estimates at time-points specified by the user, along with the two variance estimators.

Usage

## S3 method for class 'mvna':
predict(object, times, tr.choice, ...)

Arguments

object
An object of class 'mvna'
times
Time-points at which you want the estimates
tr.choice
A vector of character giving for which transitions you want estimates. By default, the function will give the Nelson-Aalen estimates for all the transitions.
...
Other arguments to predict

Value

  • Returns a list named after the possible transitions, e.g. if we define a multistate model with two possible transitions: from state 0 to state 1, and from state 0 to state 2, the returned list will have two parts named "0 1" and "0 2". Each part contains a data.frame with columns:
  • naNelson-Aalen estimates at each transition times.
  • var1Variance estimator given in eq. (4.1.6) of Andersen et al. (1993).
  • var2Variance estimator given in eq. (4.1.7) of Andersen et al. (1993).
  • timeThe given timepoints.

References

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.

See Also

mvna, sir.adm, sir.cont

Examples

Run this code
data(sir.cont)

# Matrix of logical giving the possible transitions
tra <- matrix(ncol=3,nrow=3,TRUE)
tra[3,1:2] <- FALSE

# Computation of the Nelson-Aalen estimates
na <- mvna(sir.cont,c("0","1","2"),tra,"cens")

# Using predict
predict(na,times=c(1,5,10,15))

Run the code above in your browser using DataLab