build_covariate: Build covariance matrix of the covariates

Description Usage Arguments Details References See Also

View source: R/simdata.R

Description

builds covariance matrix of the onfounders, exposure predictors, and outcome predictors

Usage

1
2
3
4
5
6
7
build_covariate(
  sig = rep(1L, 10),
  confounder_exposure = c(0.2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, 0),
  confounder_outcome = c(0, 0, 0, 0, 0, 0, 0.2, 0, 0, 0, 0.9, 0),
  exposure_outcome = rep(0L, 9),
  value_cor = TRUE
)

Arguments

sig

variance of each covariate

confounder_exposure

covariance between confounder and exposure predictors, vector in order of column

confounder_outcome

covariance between confounder and outcome predictors, vector in order of column

exposure_outcome

covariance between exposure predictors and outcome predictors, vector in order of column

value_cor

are given values (except sig) are correlation? (default = TRUE)

Details

This function builds covariance matrix of the covariates, which are confounders (w1, w2, w3, w4), exposure predictors (w5, w6, w7), and outcome predictors(w8, w9, w10). In each group, there is no correlation. On the other hand, you can specify picewise correlation between e.g. confounder-exposure predictor.

References

Setoguchi, S., Schneeweiss, S., Brookhart, M. A., Glynn, R. J., & Cook, E. F. (2008). Evaluating uses of data mining techniques in propensity score estimation: a simulation study. Pharmacoepidemiology and Drug Safety, 17(6), 546–555 https://doi.org/10.1002/pds.1555

See Also

sim_outcome


ygeunkim/propensityml documentation built on Jan. 1, 2021, 1:44 p.m.