"msSurv"
contains nonparametric estimates
for multistate models subject to right censoring and possibly left
truncation by calling msSurv
.new("msSurv", ...)
.
"msSurv" objects are also returned from function msSurv
tree
:"graphNEL"
. A
graphNEL
object with nodes
corresponding to the states in
the multistate model and the edges corresponding to the allowed
transitions. ns
:"numeric"
. The number of
unique states in the multistate model.et
:"numeric"
. The event times.pos.trans
:"character"
.
Possible transtitions between states. nt.states
:"character"
. The
non-terminal states in the multistate model. dNs
:"array"
. A matrix
containing the differential of the counting processes
for the event times. Ys
:"array"
. A matrix
containing the at risk sets for the event times. sum_dNs
:"array"
. A matrix
containing the differential for the counting process for total
transitions out of each state, at each event time. dNs.K
:"array"
. A matrix
containing the differential of the weighted counting process
described in Datta and Satten (2001).Ys.K
:"array"
. A matrix
containing the weighted at risk sets described in Datta and
Satten (2001). sum_dNs.K
:"array"
. A matrix
containing the differential of the weighted counting process
for total transitions out of each state, at each event time.ps
:"array"
. A matrix with
state occupation probabilities for each state at each event time.AJs
:"array"
. An array
containing matrices of Aalen-Johansen estimates (transition
probabilities) at each event time. I.dA
:"array"
. A matrix
containing the I+dA transition matrices for Aalen-Johansen computation.cov.AJs
:"array"
. An array
containing the variance-covariance matrices for transition
probabilities at each event time.var.sop
:"array"
. A matrix
containing covariance estimates for the state occupation
probabilities.cov.dA
:"array"
. A matrix
containing the covariance of dA matrices used for computation
of cov(P(s,t)).Fnorm
:"array"
. A matrix
containing normalized state entry distributions. Note: "NA" is
recorded for Fnorm
at the initial state(s) (node(s)).Fsub
:"array"
. A matrix
containing unnormalized (subdistribution) state entry
distributions. Note: "NA" is recorded for Fsub
at the
initial state(s) (node(s)).Gnorm
:"array"
. A matrix
containing normalized state exit distributions. Note: "NA" is
recorded for Gnorm
at the terminal state(s) (node(s)).Gsub
:"array"
. A matrix
containing unnormalized (subdistribution) state exit
distributions. Note: "NA" is recorded for Gsub
at the
terminal state(s) (node(s)).Fnorm.var
:"array or NULL"
. A matrix
containing variance estimates for the normalized state entry
distributions. Will be NULL
if the user does not specify
bs=TRUE
.Fsub.var
:"array or NULL"
. A matrix
containing variance estimates for the unnormalized
(subdistribution) state entry distributions. Will be NULL
if the user does not specify bs=TRUE
.Gnorm.var
:"array or NULL"
. A matrix
containing variance estimates for the normalized state exit
distributions. Will be NULL
if the user does not specify
bs=TRUE
.Gsub.var
:"array or NULL"
. A matrix
containing variance estimates for the unnormalized
(subdistribution) state exit distributions. Will be NULL
if the user does not specify bs=TRUE
.signature(object = "msSurv")
:
Accessor functions are defined for each of the slots in an
msSurv
object, e.g. tree
, ns
, et
, etc.
The accessor functions all have the same name as the corresponding
slot name, and all have the same signature.signature(x = "msSurv")
: Print method for
"msSurv" objects.signature(object = "msSurv")
: Show method for
"msSurv" objects.signature(object = "msSurv")
: Summary function
for "msSurv" objects. Additional arguements:
digits=3
all=FALSE
all=FALSE
corresponds to only the IQR of event
times being displayed in the summary output.times=NULL
all
if supplied.ci.fun="linear"
ci.level=0.95
stateocc=TRUE
TRUE
.trans.pr=TRUE
TRUE
.dist=TRUE
TRUE
.DS=FALSE
FALSE
.signature(x = "msSurv", y = "missing")
: Plotting
method for "msSurv" objects. Additional arguments:
states="ALL"
trans="ALL"
CI=TRUE
CI=FALSE
, only the estimates are
plotted. If the user specifies CI=TRUE
, plots of each
estimate and its corresponding
confidence intervals are created (if appropriate variances
are available). The default is TRUE
. ci.level=0.95
ci.trans="linear"
plot.type="stateocc"
...
xyplot
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 stage occupation probabilities and Nelson-Aalen estimators of integrated transition hazards for non-Markov models. Statistics and Probability Letters, 55(4): 403-411.
Datta S, Satten GA (2002). Estimation of Integrated Transition Hazards and Stage Occupation Probabilities for Non-Markov Systems under Dependent Censoring. Biometrics, 58(4), 792-802.
'msSurv'
see msSurv
.## 3-state illness-death multistate model (no left-truncation) ## Row data for 3 individuals ## Data in the form "id", "start", "stop", "start.stage", "end.stage" p1 <- c(1,0,0.21,1,3) p2 <- c(2,0,0.799,1,2) p22 <- c(2,0.799,1.577,2,3) p3 <- c(3,0,0.199,1,0) ## Combining data into a matrix ex1 <- rbind(p1,p2,p22,p3) colnames(ex1) <- c("id", "start", "stop", "start.stage", "end.stage") ex1 <- data.frame(id=ex1[,1], start=ex1[,2], stop=ex1[,3], start.stage=ex1[,4], end.stage=ex1[,5]) ## Inputting nodes & edges of the tree structure Nodes <- c("1","2","3") # states in MSM Edges <- list("1"=list(edges=c("2","3")),"2"=list(edges=c("3")), "3"=list(edges=NULL)) ## allowed transitions between states ## edges=NULL implies terminal node ## Specifying tree treeobj <- new("graphNEL", nodes=Nodes, edgeL=Edges, edgemode="directed") ans1 <- msSurv(ex1, treeobj) print(ans1) ## same as 'show(ans1)' summary(ans1) ## prints IQR for ans1 summary(ans1, all=TRUE) ## prints all event times for ans1 ## prints only state occupation probability info for all event times summary(ans1, all=TRUE, trans.pr=FALSE, dist=FALSE) plot(ans1) ## plots state occupation probability plot(ans1, states="1") plot(ans1, states=c("1", "2")) plot(ans1, plot.type="transprob") ## plots for transition probability plot(ans1, plot.type="transprob", trans=c("1 2", "1 3"))