makeData.old | R Documentation |
A function to simulate data for use in the simulation study. The function
can be used to generate observed data or data from an intervened SCM; the latter
is achieved via the setA
option. The data are simulated as follows:
L0.1 ~ Uniform(-4,4)
L0.2 ~ Bernoulli(1/2)
A0 ~ Bernoulli(expit(b0 + b*L0.1 - 2b*L0.2*L0.1))
L1.1 ~ Uniform(-4,4)
L1.2 ~ Bernoulli(1/2)
A1 ~ Bernoulli(expit(2*b0 + b*L0.1 - 2*b*L0.2*L0.1 + b/2*L1.1 - b*L1.2*L1.1))
L2 ~ Bernoulli(expit(ba*A0 + ba*A1 + b*L0.1 - 2*b*L0.2*L0.1 + b*L1.1 - 2*b*L1.2*L1.1))
makeData.old(n, b = 0.25, b0 = 1, ba = -0.25, setA = NULL)
b |
Interaction coefficient for L01 and L11 |
ba |
The effect of each treatment on the outcome. See |
Y |
The outcome |
X |
The predictors |
newX |
The prediction frame |
family |
Not used, just for compatibility |
obsWeights |
Not used, just for compatibility |
r |
The exponent of the rate at which error goes to zero as function of n. |
A list
with L0, A0, L1, A1, L2 to input into drinf.tmle
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.