Description Usage Arguments Details Value Author(s) References See Also Examples
This function estimates prevalence ratios (PRs) and their confidence
intervals using logistic models.
The estimation of standard errors for PRs is obtained through use of delta method.
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
prLogisticDelta
allows estimation of PRs using two
standardization procedures: conditional or marginal (Wilcosky and Chambless, 1985).
glm
, glmer
, prLogisticBootCond
, prLogisticBootMarg
1 2 3 |
formula |
a symbolic description of the model to be fitted. The details of model specification are given below. |
cluster |
logical argument specifying data clustering. The default is cluster=FALSE. If data is clustered or longitudinal, it should be set to cluster=TRUE. |
pattern |
the standardization procedure. If |
conf |
scalar or vector specifying confidence level(s) for estimation. The default is conf = 0.95. |
dataset |
a required data frame containing the variables named in |
... |
optional additional arguments. Currently none are used in any methods. |
A typical form used with glm()
function is included in the formula argument as response
~ terms where response is the (binary) response vector and terms is a series of terms which
specifies a linear predictor for response. The prLogisticDelta
assumes a binomial
family associated to the model. The glmer()
function is used when a vertical bar character "|"
separates an expression for a model matrix and a grouping factor. Currently only binary predictors are allowed. If categorization for predictors
is other than (0,1), factor()
should be considered.
Returns prevalence ratio and its 95% confidence intervals.
Raydonal Ospina, Department of Statistics, Federal University of Pernambuco, Brazil
(raydonal@de.ufpe.br)
Leila D. Amorim, Department of Statistics, Federal University of Bahia, Brazil
(leiladen@ufba.br).
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.
glm
, glmer
,
prLogisticBootCond
,prLogisticBootMarg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ### For independent observations:
# Estimates from logistic regression with conditional standardization -
# delta method
# Not run:
# data("titanic", package = "prLogistic")
# attach(titanic)
# prLogisticDelta(survived~ sex + pclass + embarked, data = titanic)
# End (Not run:)
# Estimates from logistic regression with marginal standardization -
# delta method
prLogisticDelta(survived~ sex + pclass + embarked,
data = titanic, pattern="marginal")
### For clustered data
# Estimates from random-effects logistic regression with conditional
# standardization - delta method
# Not run:
# data("Thailand", package = "prLogistic")
# prLogisticDelta(rgi~ sex + pped + (1|schoolid),
# data = Thailand, cluster=TRUE)
# End (Not run:)
# Estimates from random-effects logistic regression with marginal
# Not run:
# standardization - delta method
# prLogisticDelta(rgi ~ sex + pped + (1|schoolid), data = Thailand,
# pattern="marginal", cluster=TRUE)
# End (Not run:)
|
Loading required package: boot
Loading required package: stats4
Loading required package: lme4
Loading required package: Matrix
Loading required package: Hmisc
Loading required package: lattice
Attaching package: 'lattice'
The following object is masked from 'package:boot':
melanoma
Loading required package: survival
Attaching package: 'survival'
The following object is masked from 'package:boot':
aml
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:base':
format.pval, units
95% Confidence Interval using Delta method
Estimate 2.5% 97.5%
sex 3.5089 2.94031 4.1873
pclass 1.7556 1.48217 2.0794
embarked 1.1548 0.96776 1.3780
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.