avg_RR_logit: An Average of the Log Odds Ratio

Description Usage Arguments Value References Examples

View source: R/avg_RR_logit.R

Description

Averages the log odds ratio using retrospective logistic regression.

Usage

1
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 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. (2020). Causal Inference in Case-Control Studies. https://arxiv.org/abs/2004.08318.

Examples

1
2
3
4
5
6
# 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. 29, 2020, 5:07 p.m.