SimExample: Simulate Example Data for BayesPen

Description Usage Arguments Value Author(s) References Examples

Description

Simulates example data used in Bondell and Reich (2012), Wang et. al (2012), and Wilson and Reich (2014).

Usage

1
SimExample(n = 100, p, model, rho)

Arguments

n

Number of observations.

p

The total number of covariates (including the exposure of interest for WPD2).

model

What model to simulate data from. WPD2 is design 2 from Wang et. al (2012). BR1 and BR2 are designs 1 and 2 from Bondell and Reich (2012).

rho

This specifies the correlation between covariates in WPD2 and BR2.

Value

y

n vector of responses.

X

n vector of exposures for WPD and the n x p design matrix for BR1 and BR2.

U

n x p matrix of potential confounders for WPD2.This is missing for BR1 and BR2.

p

Total number of potential confounders

beta

The regression coeficients. For WPD2 the first beta corresponds to X.

rho

Returns rho.

model

Returns model.

Author(s)

Ander Wilson, Howard D. Bondell, and Brian J. Reich

References

Bondell, H. D. and Reich, B. J. (2012). Consistent high-dimensional Bayesian variable selection via penalized credible regions. J. Am. Statist. Assoc. 107, 1610-1624.

Wang, C., Parmigiani, G., and Dominici, F. (2012). Bayesian effect estimation accounting for adjustment uncertainty. Biometrics 68, 661-671.

Wilson A., Reich B. J. (2014). Confounder selection via penalized credible regions. Biometrics 70: 852-861.

Examples

1
2
3
set.seed(1234)
dat <- SimExample(500,model="BR1")
lm.fit <- lm(dat$y~dat$X)

AnderWilson/BayesPen documentation built on May 5, 2019, 4:56 a.m.