regadj_multiTrt_ate: Regression Adjustment when estimand is ATE

Description Usage Arguments Value Examples

View source: R/regadj_multiTrt_ate.R

Description

Regression Adjustment when estimand is ATE

Usage

1
regadj_multiTrt_ate(y, x, trt, ndpost = parent.frame()$ndpost)

Arguments

y

numeric vector for the binary outcome

x

dataframe including the treatment indicator and the covariates

trt

numeric vector for the treatment indicator

ndpost

number of independent simulation draws to create

Value

list with 2 elements for ATT effect. It contains

ATT12:

A dataframe containing the estimation, standard error, lower and upper 95% CI for RD/RR/OR

ATT13:

A dataframe containing the estimation, standard error, lower and upper 95% CI for RD/RR/OR

list with 3 elements for ATE effect. It contains

ATE12:

A dataframe containing the estimation, standard error, lower and upper 95% CI for RD/RR/OR

ATE13:

A dataframe containing the estimation, standard error, lower and upper 95% CI for RD/RR/OR

ATE23:

A dataframe containing the estimation, standard error, lower and upper 95% CI for RD/RR/OR

Examples

1
2
3
4
5
6
7
8
library(CIMTx)
set.seed(3242019)
idata = data_gen(n = 12, ratio =1,scenario = 1)
trt_ind <- as.numeric(idata$trtdat$trt_ind)
all_vars <- idata$trtdat[, -1]
y <- idata$Yobs
causal_multi_treat(y = y, x = idata$trtdat,ndpost = 10,
trt = trt_ind, method ="Regression Adjustment", estimand = "ATE")

CIMTx documentation built on July 16, 2021, 9:09 a.m.