indSample.iid.bA.bY.rareJ1_list: An Example of a Non-Hierarchical Data Containing a Binary...

Description Usage Format Source Examples

Description

Simulated (non-hierarchical) dataset containing 2,000 i.i.d. observations, with each row i consisting of 4 measured baseline covariates (W1, W2, W3 and W4), 1 binary exposure (A) and 1 binary outcome (Y) that defines case or control status. The baseline covariates W1, W2, W3 and W4 were sampled as i.i.d., while the exposure A for each observation i depends on i's four baseline covariates. Similarly, the outcome Y for each observation depends on i's baseline covariates and exposure values. Moreover, we can also describe the case-control design as first sampling 1 case (W_1^1, W_2^1, W_3^1, W_4^1, A^1) from the conditional distribution of (W_1, W_2, W_3, W_4, A), given Y = 1. One then samples J controls (W_1^{0,j}, W_2^{0,j}, W_3^{0,j}, W_4^{0,j}, A^{0,j}) from (W_1, W_2, W_3, W_4, A), given Y = 0, j=1,...,J. Thus, the cluster containing one case and J controls is considered the experimental unit. Finally one gets nC cases and nCo controls with J=nC/nCo, where J can be used effectively in observation weights. The following section provides more details regarding individual variables in simulated data.

Usage

1

Format

A data frame with 2,000 independent observations (rows), containing 1000 cases and 1000 controls, and 6 variables:

W1

continuous uniform baseline covariate with min=0 and max=1

W2

continuous normal baseline covariate with μ = 0 and σ = 0.3

W3

binary baseline covariate with P(W2=1) = 0.5

W4

binary baseline covariate with P(W2=1) = 0.5

A

binary exposure that depends on baseline covariate values in (W1, W2, W3, W4)

Y

binary outcome that depends on baseline covariate and exposure values in (W1, W2, W3, W4, A)

Source

https://github.com/chizhangucb/tmleCommunity/blob/master/tests/dataGeneration/get.iid.dat.Acont.R

Examples

1
2
3
4
5
6
data(indSample.iid.bA.bY.rareJ1_list)
indSample.iid.bA.bY.rareJ1 <- indSample.iid.bA.bY.rareJ1_list$indSample.iid.bA.bY.rareJ1
head(indSample.iid.bA.bY.rareJ1_list$obs.wt.J1)  # Assigned weights to each observations
indSample.iid.bA.bY.rareJ1_list$q0  # 0.013579 True prevalence probability
indSample.iid.bA.bY.rareJ1_list$psi0.Y  # 0.012662 True ATE
indSample.iid.bA.bY.rareJ1_list$J  # 1 The ratio of number of controls to cases

chizhangucb/tmleCommunity documentation built on May 20, 2019, 3:34 p.m.