avg_RR_logit: An Average of the Log Odds Ratio

View source: R/avg_RR_logit.R

avg_RR_logitR Documentation

An Average of the Log Odds Ratio

Description

Averages the log odds ratio using retrospective logistic regression.

Usage

avg_RR_logit(y, t, x, w = "control")

Arguments

y

n-dimensional vector of binary outcomes

t

n-dimensional vector of binary treatments

x

n by d matrix of covariates

w

'case' if the average is conditional on the case sample; 'control' if it is conditional on the control sample; 'all' if it is based on the whole sample; default w = 'control'

Value

An S3 object of type "ciccr". The object has the following elements.

est

a scalar estimate of the weighted average of the log odds ratio using retrospective logistic regression

se

standard error

References

Jun, S.J. and Lee, S. (2023). Causal Inference under Outcome-Based Sampling with Monotonicity Assumptions. https://arxiv.org/abs/2004.08318.

Examples

# use the ACS_CC dataset included in the package
  y = ciccr::ACS_CC$topincome
  t = ciccr::ACS_CC$baplus
  x = ciccr::ACS_CC$age
# use 'case' to condition on the distribution of covariates given y = 1
  results = avg_RR_logit(y, t, x, 'case')


ciccr documentation built on Oct. 21, 2023, 1:08 a.m.