acpme: Adjustment for confounding in the presence of multivariate...

View source: R/acpme.R

acpmeR Documentation

Adjustment for confounding in the presence of multivariate exposure

Description

This function simulates the posterier exposure effect using the Bayesian adjustment for confounding in the presence of multivariate exposures (ACPME) meethod.

Usage

acpme(
  Z,
  C,
  y,
  niter,
  burnin = round(niter/2),
  pen.lambda = NA,
  pen.type = "eigen"
)

Arguments

Z

Matrix of exposures. This should include any interactions of other functions of exposures.

C

A n x p matrix or data.frame of covaraites.

y

An n-vector of observed outcomes.

niter

Integer number of MCMC iterations to compute including burnin.

burnin

Integer number of MCMC iterations to discard as burning.

pen.lambda

Non-negative tuning parameter lambda to control the strength of confounder adjustment (strength of prior or size of penalty). A value of NA (defailt) uses BIC to choose the value.

pen.type

Choice of penalty. The default is "eigen." Other options are "correlation" and "projection."

Examples

dat <- simregimes(scenario="acpme1", seed=1234, n=200, p=100)
fit <- acpme(Z=dat$Z,C=dat$C,y=dat$Y, niter=1000)

AnderWilson/regimes documentation built on Aug. 5, 2023, 8:30 a.m.