makeData.old: makeData.old

View source: R/makeData.R

makeData.oldR Documentation

makeData.old

Description

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))

Usage

makeData.old(n, b = 0.25, b0 = 1, ba = -0.25, setA = NULL)

Arguments

b

Interaction coefficient for L01 and L11

ba

The effect of each treatment on the outcome. See makeData to see how it is used.

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.

Value

A list with L0, A0, L1, A1, L2 to input into drinf.tmle.


benkeser/drinf documentation built on Oct. 22, 2023, 9:50 a.m.