si.data: Generate data

View source: R/si.data.R

si.dataR Documentation

Generate data

Description

Generate data for testing our main function MB and hdMB..

Usage

si.data(sample.size = 500, dimension = 10)

Arguments

sample.size

sample size for data, Default: 500,

dimension

dimension for covariate, it should be larger than 10, Default: 10.

Details

We first generate covariates X from standard normal distribution function. Then we will use the following propensity score model with the binomial distribution to generate treatment indicator T:

Pr(T = 1 | X) = 1/ (1 + exp(X_1 + ... + X_{10}))

Finally, the outcome model will be generated by Y = (X_1 + ... + X_{10}) + noise, where noise follows standard normal distribution.

Value

data object with the following attributes:

  • X: covariates.

  • Tr: treatment indicator.

  • Y: observed outcome.

Examples

data <- si.data()

yimindai0521/MBalance documentation built on May 9, 2022, 4:06 p.m.