vm_multiTrt_att: Vector matching Matching (VM matching)

Description Usage Arguments Value Examples

View source: R/vm_multiTrt_att.R

Description

This function implements the VM matching method. Please use our main function causal_multi_treat.R.

Usage

1
vm_multiTrt_att(y, x, trt, 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

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

1
2
3
4
5
6
7
8
library(CIMTx)
set.seed(1)
idata = data_gen(n = 120, ratio =1,scenario = 1)
trt_ind <- as.numeric(idata$trtdat$trt_ind)
all_vars <- idata$trtdat[, -1] #exclude treatment indicator
y <- idata$Yobs
causal_multi_treat(y = y, x = idata$trtdat,
trt = trt_ind,method = "VM Matching", estimand = "ATT", reference = 1)

CIMTx documentation built on July 8, 2020, 7:09 p.m.

Related to vm_multiTrt_att in CIMTx...