Package: prLogistic 2.0.2

prLogistic: Estimation of Prevalence Ratios via Logistic Regression Models

Estimates adjusted prevalence ratios (PR) and their confidence intervals from logistic regression models, addressing the well-known limitation of odds ratios (OR) as approximations to PR in cross-sectional studies with common outcomes. Supports independent observations (glm()), clustered/multilevel data (glmer() from 'lme4'), longitudinal data via Generalised Estimating Equations (geeglm() from 'geepack'), and complex survey designs (svyglm() from 'survey'). Inference is available via the delta method (conditional and marginal standardisation) and via bootstrap (normal-approximation and percentile intervals). Continuous covariates are handled through user-specified or median-based reference values; flexible baseline specification allows any reference category to be chosen for factor predictors. Based on the methodology described in Amorim & Ospina (2021) <doi:10.1590/0001-3765202120190316>.

Authors:Raydonal Ospina [aut, cre], Leila D. Amorim [aut]

prLogistic_2.0.2.tar.gz
prLogistic_2.0.2.zip(r-4.7-any)prLogistic_2.0.2.zip(r-4.6-any)prLogistic_2.0.2.zip(r-4.5-any)
prLogistic_2.0.2.tgz(r-4.6-any)prLogistic_2.0.2.tgz(r-4.5-any)
prLogistic_2.0.2.tar.gz(r-4.7-any)prLogistic_2.0.2.tar.gz(r-4.6-any)
prLogistic_2.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
prLogistic/json (API)

# Install 'prLogistic' in R:
install.packages('prLogistic', repos = c('https://raydonal.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/raydonal/prlogistic/issues

Pkgdown/docs site:https://raydonal.github.io

Datasets:
  • downer - Downer Cow Survival Data
  • LBW - Low Birth Weight - Longitudinal Study
  • Thailand - Thailand Education Study
  • titanic - Titanic Passenger Survival
  • Toenail - Toenail Infection Trial
  • UIS - UIS Drug Treatment Study

On CRAN:

Conda:

5.03 score 12 scripts 330 downloads 3 mentions 5 exports 13 dependencies

Last updated from:21fe1f02df. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK166
source / vignettesOK214
linux-releaseOK165
macos-releaseOK115
macos-oldrelOK118
windows-develOK110
windows-releaseOK104
windows-oldrelOK103
wasm-releaseOK122

Exports:prLogisticBootCondprLogisticBootMargprLogisticDeltaprLogisticGEEprLogisticSurvey

Dependencies:bootlatticelme4MASSMatrixminqanlmenloptrrbibutilsRcppRcppEigenRdpackreformulas

Estimating Prevalence Ratios with prLogistic
Introduction | Installation | Independent observations — glm | Data | Fitting the model | Delta method — conditional standardisation | Delta method — marginal standardisation | Custom reference values | Forest plot | Bootstrap confidence intervals | Clustered / multilevel data — glmer (lme4) | Longitudinal data — GEE via geepack | Complex survey data — svyglm (survey) | Comparing OR and PR | Methodological notes | Conditional standardisation | Marginal standardisation | Delta method | Session information | References

Last update: 2026-06-05
Started: 2026-06-05

Reproducing the Examples from Amorim & Ospina (2021)
Example 1 — Low Birth Weight (LBW): clustered binary data | Data | Independent GLM (ignoring clustering) | GEE — accounting for within-mother correlation | Mixed model (random intercept per mother) | Example 2 — Thailand Education Study: multilevel data | Independent GLM | Mixed model | Example 3 — Toenail Infection Trial: longitudinal data | GEE | Example 4 — UIS Drug Treatment Study | GLM — independent observations | OR vs PR comparison | Bootstrap CIs | Example 5 — Downer Cow Survival | GLM | Example 6 — Titanic Survival | GLM — OR vs PR | Forest plot | Key comparison for Titanic | Summary | Session information

Last update: 2026-06-05
Started: 2026-06-05