This function computes the NPMLE of the event time distribution and truncation time distribution, when the event times are subject to double truncation.
cdfDT(
y,
l,
r,
error = 1e-06,
n.iter = 10000,
boot = FALSE,
B.boot = 200,
joint = FALSE,
plot.cdf = FALSE,
plot.joint = FALSE,
display = TRUE
)
Unique event times of the event time vector y
Number of events that occurred at each timepoint
Estimated cumulative distribution function of Y at each distinct value of y
Estimated survival function of Y at each distinct value of y (equal to 1-F)
Bootstrapped standard error of F at each distinct value of y (displayed if boot=TRUE)
Estimated lower limits of the Wald confidence intervals for F (displayed if boot=TRUE).
Estimated upper limits of the Wald confidence intervals for F (displayed if boot=TRUE).
Probability of the observed vector y falling within a random truncation interval [L,R]
Estimated joint distribution function of (l,r)
Estimated marginal cumulative distribution function of L at each observed l
Estimated marginal cumulative distribution function of R at each observed r
Number of iterations needed for convergence
0 indicates convergence, 1 indicates that number of iterations exceeded n.iter
vector of event times
vector of left truncation times
vector of right truncation times
prespecified error for convergence (default = 1e-6)
maximum number of iterations
Logical. Default=FALSE. If TRUE, the simple bootstrap method is applied to estimate the standard error and pointwise confidence intervals of the event time distribution
Numeric value for number of bootstrap resamples. Default is 200.
Logical. Default=FALSE. If TRUE, computes joint and marginal distributions of the truncation times
Logical. Default is FALSE. If TRUE, the estimated cumulative distribution and survival functions of the event times are plotted. If boot=TRUE, confidence intervals are also plotted.
Logical. Default is FALSE. If TRUE, the estimated marginal distribution functions of the truncation times, and the joint distribution of the truncation times, are plotted. Note: Plot will only be displayed if both plot.joint=TRUE and joint=TRUE.
Logical. Default is TRUE. If FALSE, output will not be displayed upon execution of function.
Estimates the distribution function of the survival time in the presence of left and right truncation. Also estimates the joint cumulative distribution function and marginal cumulative distribution functions of the left and right truncation times. The computation is performed using the algorithm introduced in Shen (2010). This is an iterative algorithm that converges to the NPMLE after a number of iterations. Note that the survival, left, and right truncation times must be the same length. If either of these vectors have missing observations, the entire observation will be excluded.
Shen P-S (2010). Nonparametric analysis of doubly truncated data. Ann Inst Stat Math 62(5):835-853
#AIDS data set:
out=cdfDT(AIDS$Induction.time,AIDS$L.time,AIDS$R.time,plot.cdf=TRUE)
out
Run the code above in your browser using DataLab