contribution: Functions to decompose the Relative Concentration Index into...

Description Usage Arguments Details Value Warning Author(s) References Examples

Description

These functions decompose the Relative Concentration Index into its components using a (generalized) linear model, optionally using a survey design, or a Cox Proportional Hazards model. Print, summary and plot methods have been defined for the results.

Usage

1
2
3
4
5
6
7
8
9
contribution(object, ranker, correction = TRUE)
## S3 method for class 'coxph'
contribution(object, ranker, correction = TRUE)
## S3 method for class 'glm'
contribution(object, ranker, correction = TRUE)
## S3 method for class 'lm'
contribution(object, ranker, correction = TRUE)
## S3 method for class 'svyglm'
contribution(object, ranker, correction = TRUE)

Arguments

object

An object of class coxph, glm, lm or svyglm. The outcome should be the health variable and the predictors the components.

ranker

A numeric vector containing the wealth variable, from the same dataframe as the outcome.

correction

A logical indicating whether the global and partial RCIs should be corrected for negative values using imputation.

Details

If correction is TRUE negative values of components or outcome are corrected using correctSign with option shift = FALSE.

Value

An object of class decomposition containing the following components

betas

a numeric vector containing regression coefficients

partialcis

a numeric vector containing partial RCIs

confints

a numeric vector contaning 95% confience intervals for the partial concentration indices

Warning

ranker should be chosen with care. Ideally, it is a variable from the same dataframe as the other variables. If not, redefine the row names in the model.

Author(s)

Peter Konings

References

Konings et al., 2009 Speybroeck et al., 2009

Examples

1
2
3
4
5
data(kenya)
simple.model <- lm(stunting ~ meducY + sex +  wealth + urban, data = kenya)
simple.contrib <- contribution(simple.model, kenya$wealth)
print(simple.contrib)
plot(simple.contrib)

decomp documentation built on May 2, 2019, 6:53 p.m.