powered by
Compute weighted sum of outcomes.
extract_stochastic_intervention(z, r, s)
the inner product of s and r
a vector of doses
a vector of outcomes
a set of weights, summing to 1
# dose vector dose <- c(0, 0.1, 0.4) # outcome vector outcome <- c(1, 1.1, 1.5) # weight vector weight = c(0.3, 0.4, 0.3) theta <- extract_stochastic_intervention(z = dose, r = outcome, s = weight)
Run the code above in your browser using DataLab