Learn R Programming

Biograph (version 2.0.6)

plot.cumrates: Plots cumulative transition rates

Description

Plots cumulative transition rates by origin, destination, and age estimated by Cumrates. The required input data are provided by the Cumrates function.

Usage

"plot"(x,ptrans,title,...)

Arguments

x
An object of class cumrates, produced by the Cumrates function.
ptrans
Selection of transitions to be plotted
title
Title
...
Further arguments to plot

Details

The function plots cumulative transition rates (cumulative hazard rates). If irate = 1 or irate = 3 it plots the Nelson-Aalen estimator at each birthday and adds lower and upper confidence intervals. If irate = 2 or irate = 3, it plots the cumulative occurrence-exposure rates. If irate = 3, the function plots both the Nelson-Aalen estimator (with confidence intervals) and the cumulative occurrence-exposure rate. The variable irate is an argument of the Cumrates function and included in the object produced by Cumrates.

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)
    z<- plot (x=cumrates,ptrans=c("NJ","JN")) 
  

Run the code above in your browser using DataLab