avg_RR_logit | R Documentation |
Averages the log odds ratio using retrospective logistic regression.
avg_RR_logit(y, t, x, w = "control")
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' |
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 |
Jun, S.J. and Lee, S. (2023). Causal Inference under Outcome-Based Sampling with Monotonicity Assumptions. https://arxiv.org/abs/2004.08318.
# 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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.