EntryExit: State Entry and Exit Time Distributions at Time t

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

This function displays the state entry and exit time distributions at time t. The function also displays the corresponding variance estimates if the user requests them.

Usage

1
EntryExit(object, t="last", deci=4, var=FALSE, norm=TRUE)

Arguments

object

A msSurv object.

t

The time to find state entry/exit distributions. Default is "last" which is the highest (or "last") event time.

deci

Numeric argument specifying number of decimal places for estimates. Default is 4.

var

Logical argument to determine if the variance is displayed. Default is FALSE. If variance estimates are NULL, an error message will print.

norm

Logical argument to determine whether normalized or non-normalized (subdistribution) functions are displayed. Default is normalized distributions.

Details

Display of the state entry and exit time distributions and corresponding variance for multistate models at each state in the system where computation makes sense.

Value

Returns (invisibly) a list consisting of the state entry / exit distributions (either entry.norm and exit.norm or entry.sub and exit.sub), and (optionally) the variance estimates (either entry.var.norm and exit.var.norm or entry.var.sub and exit.var.sub).

Note

State entry distributions (and corresponding variance estimates) are displayed for all states where entry into the state occurs. State exit distributions (and corresponding variance estimates) are displayed for all states where exit from the state occurs.

Author(s)

Nicole Ferguson <nicole.ferguson@kennesaw.edu>, Guy Brock <guy.brock@louisville.edu>, Somnath Datta <somnath.datta@louisville.edu>

References

Nicole Ferguson, Somnath Datta, Guy Brock (2012). msSurv: An R Package for Nonparametric Estimation of Multistate Models. Journal of Statistical Software, 50(14), 1-24. URL http://www.jstatsoft.org/v50/i14/.

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.

See Also

msSurv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Row elements of data 
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")

## Running msSurv
ans1 <- msSurv(ex1,treeobj)
EntryExit(ans1,t=0.8)

msSurv documentation built on May 1, 2019, 7:31 p.m.