Learn R Programming

Biograph (version 2.0.6)

Cumrates: Estimates cumulative transition rates

Description

Estimates cumulative transition rates by origin, destination, and age. Two estimation methods are distinguished: the statistical method (Nelson-Aalen estimator) and the demographic method (occurrence-exposure rates).

Usage

Cumrates(irate, Bdata)

Arguments

irate
Indicator variable defining option to be used: 1 = Nelson-Aalen method; 2 = Occurrence-Exposure rate; 3 = Both
Bdata
Biograph object

Value

D
The Biograph object Bdata with diagonal elements removed
irate
Option for estimation of rates: (1) Nelson-Aalen, (2) Occurrence-exposure rates, (3) both
NeAa
Nelson-Aalen estimator
predicted
Cumulative transition rates (Nelson-Aalen estimator) predicted at consecutive ages (using predict function of mvna package)
astr
Age-specific transition rate by age, derived from predicted cumulative transition rates
oeCum
Cumulative occurrence-exposure rates
oe
The M-matrix of age-specific transition (occurrence-exposure) rates by origin and destination

Details

The Nelson- Aalen estimator is obtained using the mvna package. First the function Biograph.mvna is called to convert the Biograph object to a data frame of class mvna. Then the mvna and the predict functions of the mvna package are called. The predict function produces cumulative hazards (with confidence intervals) at each birthday. For estimating the cumulative occurrence-exposure rates, the functions Occup, Trans and RateTable are called (among other functions). The object M is produced; it is a three-dimensional array containing the transition rates by age, origin and destination in a standard format used in multistate demographic analysis.

Examples

Run this code
    data(GLHS)
    Bdata.a <- date_b (GLHS,format.out="age",covs=c("marriage","LMentry"))
    cumrates <- Cumrates (irate = 3,Bdata=Bdata.a)
  

Run the code above in your browser using DataLab