Learn R Programming

prLogistic (version 1.2)

prLogisticBootMarg: Estimation of Prevalence Ratios using Logistic Models and Bootstrap Confidence Intervals for Marginal Standardization

Description

This function estimates prevalence ratios (PRs) and bootstrap confidence intervals using logistic models for marginal standardization. The estimation of standard errors for PRs is obtained through use of bootstrapping. Confidence intervals of (1-alpha)% for PRs are available for standard logistic regression and for random-effects logistic models (Santos et al, 2008). The function prLogisticBootMarg allows estimation of PRs using marginal standardization procedure (Wilcosky and Chambless, 1985).

Usage

prLogisticBootMarg(object, data, conf = 0.95, R = 99, ...)

Arguments

object
any fitted model object from which fixed effects estimates can be extracted. The details of model specification are given below.
data
a required data frame containing the variables named in object.
conf
scalar or vector specifying confidence level(s) for estimation. The default is conf= 0.95.
R
the number of bootstrap replicates. The default is R=99.
...
optional additional arguments. Currently none are used in any methods.

Value

Returns prevalence ratio and its 95% bootstrap confidence intervals for marginal standardization. Both normal and percentile bootstrap confidence intervals are presented.

Details

The fitted model object can be obtained using glm() function for binary responses when unit samples are independent. The glmer() function should be used for correlated binary responses. Only binary predictors are allowed. If categorization for predictors is other than (0,1), factor() should be considered.

References

Localio AR, Margolis DJ, Berlin JA (2007). Relative risks and confidence intervals were easily computed indirectly from multivariate logistic regression. Journal of Clinical Epidemiology, 60, 874-882.

Oliveira NF, Santana VS, Lopes AA (1997). Ratio of proportions and the use of the delta method for confidence interval estimation in logistic regression. Journal of Public Health, 31(1), 90-99.

Santos CAST et al (2008). Estimating adjusted prevalence ratio in clustered cross-sectional epidemiological data. BMC Medical Research Methodology, 8 (80). Available from http://www.biomedcentral.com/1471-2280/8/80.

Wilcosky TC, Chambless LE (1985). A comparison of direct adjustment and regression adjustment of epidemiologic measures. Journal of Chronic Diseases, 34, 849-856.

See Also

glm, glmer, prLogisticDelta,prLogisticBootCond

Examples

Run this code
### For independent observations:
## Estimates from logistic regression with bootstrap confidence intervals -
## marginal standardization
# Not run:
# data("titanic", package = "prLogistic")
# attach(titanic)
# fit.logistic=glm(survived~ sex + pclass + embarked, family=binomial, 
# data = titanic)
# prLogisticBootMarg(fit.logistic, data = titanic)
# End (Not run:)

# Another way for fitting the same model:
# Not run:
# prLogisticBootMarg(glm(survived~ sex + pclass + embarked, 
# family=binomial, data = titanic), data=titanic)
# End (Not run:)
 
### For clustered data
# Estimates from random-effects logistic regression 
## with bootstrap confidence intervals - marginal standardization
# Not run:
# library(lme4)
# data("Thailand", package = "prLogistic")
# attach(Thailand)
# ML = glmer(rgi ~  sex + pped  + (1|schoolid), 
# family = binomial, data = Thailand)
 			
# prLogisticBootMarg(ML, data = Thailand)
# End (Not run:)

Run the code above in your browser using DataLab