Skip to contents

The MARGINAL odds ratio is not the conditional one: odds ratios are non-collapsible. Inference is on the log scale because the sampling distribution of a ratio is badly skewed.

Usage

Tmleor(Y, A, QAW, Q1W, Q0W, g1W, gbound = 0.025, level = 0.95)

Arguments

Y

Binary outcome.

A

Binary treatment.

QAW, Q1W, Q0W

Initial outcome predictions.

g1W

Initial propensity.

gbound

Propensity truncation level.

level

Confidence level.

Value

List with estimate, log_or, se_log, ci_lower, ci_upper, p_value, mu1, mu0, n.

Details

Formula: psi = [mu1/(1-mu1)] / [mu0/(1-mu0)]; IC_logOR = IC_1/(mu1(1-mu1)) - IC_0/(mu0(1-mu0)); CI = exp(log psi -+ z se_log)

References

Verified against the CRAN package tmle 2.1.1 (Gruber & van der Laan), whose calcParameters sets OR$psi <- mu1/(1-mu1)/(mu0/(1-mu0)) and builds IC.logOR on the log scale.

Examples

set.seed(16)
n <- 400
A <- rbinom(n, 1, 0.5)
Y <- rbinom(n, 1, plogis(-0.5 + A))
Q1 <- rep(plogis(0.5), n); Q0 <- rep(plogis(-0.5), n)
Tmleor(Y, A, QAW = ifelse(A == 1, Q1, Q0), Q1W = Q1, Q0W = Q0, g1W = rep(0.5, n))[c("estimate", "ci_lower", "ci_upper")]
#> $estimate
#> [1] 1.757982
#> 
#> $ci_lower
#> [1] 1.182662
#> 
#> $ci_upper
#> [1] 2.613172
#>