plot.paramDemoLT {paramDemo}R Documentation

Functions to plot life tables and product limit estimators

Description

Draw a plot of demographic rates from a life table produced with function CalcLifeTable or of product limit estimator produced with function CalcProductLimitEst

Usage

## S3 method for class 'paramDemoLT'
plot(x, demorate = "lx", inclCIs = FALSE, ...)

## S3 method for class 'paramDemoPLE'
plot(x, inclCIs = FALSE, ...)

Arguments

x

Object of class paramDemoLT or paramDemoPLE produced with functions CalcLifeTable or CalcProductLimitEst

demorate

Demographic rate to be plotted, choices are “lx” for the survival, “px” for the age-specific survival probability, “qx” for the age-specific mortality probability, and “ex” for the remaining life expectancy

inclCIs

Logical indicating whether confidence intervals should be ploted in case they were calculated with function CalcLifeTable or CalcProductLimitEst

...

Additional arguments passed to function plot

Value

No return value, called for plotting objects of class “paramDemoLT

Author(s)

Fernando Colchero fernando_colchero@eva.mpg.de

See Also

CalcLifeTable to calculate life tables. CalcProductLimitEst to calculate product limit estimators.

Examples

# Simulate age at death data from Gompertz model:
ages <- SampleRandAge(n = 100, theta = c(b0 = -5, b1 = 0.1))

# Calculate life table:
lt <- CalcLifeTable(ageLast = ages, departType = rep("D", 100))

# Plot life table:
plot(lt)

[Package paramDemo version 1.0.1 Index]