Learn R Programming

relsurv (version 2.0-9)

checktimes: Summary of a cumulative incidence curve

Description

Returns a list containing the estimated values at required times.

Usage

checktimes(w, times, xscale = 1,area=FALSE)

Arguments

w

output of the function cmp.rel.

times

the times at which the output is required.

xscale

The time scale in which the times are specified. The default value is 1, i.e. days.

area

Should area under the curves at time tau be printed out? Default is FALSE.

Value

A list of values is returned.

Details

The variance is calculated using numerical integration. If the required time is not a time at which the value was estimated, the value at the last time before it is reported. The density of the time points is set by the precision argument in the cmp.rel function.

See Also

cmp.rel

Examples

Run this code
# NOT RUN {
data(slopop)
data(rdata)
#calculate the cumulative incidence curve
#note that the variable year is given in days since 01.01.1960 and that 
#age must be multiplied by 365 in order to be expressed in days.
fit <- cmp.rel(Surv(time,cens)~sex+ratetable(age=age*365,sex=sex,
      year=year),ratetable=slopop,data=rdata,tau=3652.41)
checktimes(fit,c(1,3),xscale=365.241)
# }

Run the code above in your browser using DataLab