predict.mvna {mvna} | R Documentation |
This function gives the Nelson-Aalen estimates at time-points specified by the user, along with the two variance estimators.
## S3 method for class 'mvna': predict(object, times, tr.choice, ...)
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 |
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:
na |
Nelson-Aalen estimates at each transition times. |
var1 |
Variance estimator given in eq. (4.1.6) of Andersen et al. (1993). |
var2 |
Variance estimator given in eq. (4.1.7) of Andersen et al. (1993). |
time |
The given timepoints. |
Arthur Allignol, arthur.allignol@fdm.uni-freiburg.de
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.
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))