Learn R Programming

CIMTx (version 0.3.0)

regadj_multiTrt_att: Regression Adjustment when estimand is ATT

Description

This function implements the regression adjustment method when estimand is ATT. Please use our main function causal_multi_treat.R.

Usage

regadj_multiTrt_att(
  y,
  x,
  trt,
  ndpost = parent.frame()$ndpost,
  reference = parent.frame()$reference_trt
)

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

reference

Reference group for ATT

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

Run this code
# NOT RUN {
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
reference_trt <- 2
regadj_multiTrt_att(y = y, x = idata$trtdat,trt = trt_ind, reference = 2, ndpost = 100)
# }

Run the code above in your browser using DataLab