plot.RII {RII}R Documentation

Plot RII Objects

Description

A plot method for objects of class RII.

Usage

## S3 method for class 'RII':
plot(x, group = 1, ylim = NULL, ...)

Arguments

x An object of class RII
group Which standardizing group to plot
ylim Graphical parameter with a useful default
... Graphical parameters

Details

RII.plot gives a graphical interpretation of the output from RII. For the specified standardizing group, the empirical incidence rate for each class is obtained by dividing the count in that class by the amount of eposure and then plotted. The natural cubic spline incidence rate fitted by RII (multiplied by the exponential of the appropriate group effect) is then added to the plot. For the first standardizing group (and for data with only one group) the group effect is defined to be 0.

Author(s)

Jamie Sergeant, jamie.sergeant@nuffield.oxford.ac.uk

References

Sergeant, J. C. and Firth D. (2004) Relative index of inequality: definition, estimation and inference. In preparation.

See Also

RII, RII.CVplot.

Examples

## Estimate the RII for the LSDeaths data,
## using a smoothing parameter of 1
data(LSDeaths)
LSdead <- xtabs(Deaths ~ class + age, data = LSDeaths)
LSatrisk <- xtabs(AtRisk ~ class + age, data = LSDeaths)
LSRII <- RII(LSdead, LSatrisk, loglambda = 0)

## Plot the data and fitted death rate for each age group
par(mfrow=c(2,2))
plot(LSRII, group = "25-34", main = "(a) age group 25-34")
plot(LSRII, group = "35-44", main = "(b) age group 35-44")
plot(LSRII, group = "45-54", main = "(c) age group 45-54")
plot(LSRII, group = "55-64", main = "(d) age group 55-64")

[Package RII version 0.4-1 Index]