ratetable: Ratetable reference in formula

Description Usage Arguments Value See Also Examples

Description

This function matches variable names in data to those in a ratetable for survexp

Usage

1

Arguments

...

tags matching dimensions of the ratetable and variables in the data frame (see example)

Value

A data frame

See Also

survexp,survexp.us,is.ratetable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fit <- survfit(Surv(time, status) ~ sex, pbc,subset=1:312)

# The data set does not have entry date, use the midpoint of the study
efit <- survexp(~ ratetable(sex=sex,age=age*365.35,year=as.Date('1979/1/1')) +
            sex, data=pbc,  times=(0:24)*182)
## Not run: 
plot(fit, mark.time=F, xscale=365.25, xlab="Years post diagnosis",
        ylab="Survival")
lines(efit, col=2) # Add the expected survival line

## End(Not run)


Search within the survival package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.