bclogit

Conditional Logistic Regression with Optional Concordant Pairs

pkgdown

Full documentation and function reference: https://tennenbaumj.github.io/bclogit_package_and_paper_repo/

Overview

bclogit is an R package for fitting conditional logistic regression models that can optionally incorporate information from concordant pairs (and a reservoir of additional controls) to improve estimation of discordant pairs. This approach effectively uses a Bayesian prior derived from the concordant data to inform the discordant pairs analysis, suitable for matched case-control studies where data sparsity might be an issue.

Installation

You can install the development version of bclogit from source:

# install.packages("devtools")
devtools::install()

or use the command line

R CMD INSTALL bclogit

Usage

Here is a basic example of how to use bclogit:

library(bclogit)

# Simulate some matched pair data
set.seed(123)
n_pairs <- 50
x1 <- rnorm(n_pairs * 2)
x2 <- rbinom(n_pairs * 2, 1, 0.5)
strata <- rep(1:n_pairs, each = 2)
treatment <- rep(c(0, 1), n_pairs) # Case-Control
# ... (simulate response y) ...

# Fit the model
# Using Formula Interface
fit <- bclogit(y ~ x1 + x2, data = mydata, treatment = treatment, strata = strata)

# Summary of results
summary(fit)

# Coefficients
coef(fit)

# Confidence Intervals
confint(fit)

Features

Citation

See CITATION.cff, or in R: citation("bclogit").

License

This package is licensed under GPL3.