IPW.MLMPN: Estimating the treatment effect from a partially nested...

Description Usage Arguments Details Value Examples

View source: R/IPW.MLMPN.R

Description

IPW.MLMPN is used to estimate the treatment effect from a partially nested design (where the treatment arm has multiple treatment clusters, and the control arm has no clusters) with the inverse-propensity-weighted multilevel modeling (where a multilevel model is specified for the treatment arm and a regression model is specified for the control arm) estimation approach.

Usage

1
2
3
4
5
6
7
IPW.MLMPN(
  Y,
  Trt,
  clus,
  Lyz,
  Ly
)

Arguments

Y

An outcome variable

Trt

Treatment assignment indicator (1 for treatment and 0 for control). The treatment arm has multiple treatment clusters, and the control arm has no clusters.

clus

Observed treatment cluster assignment. clus = 0 for the control arm

Lyz

A matrix containing pre-treatment covariates. Lyz can contain two types of covariates. The first type of covariates affect both the treatment assignment and outcome directly. The second type of covariates do not affect the outcome in a given treatment cluster directly, but affect both the treatment assignment and treatment cluster assignment.

Ly

A matrix containing the pre-treatment covariates that affect both the treatment assignment and outcome directly. Ly is the first type of covariates contained in Lyz.

Details

The sandwisch type standard error estimation accounts for the clustering in the treatment arm.

Value

IPW.MLMPN returns a list "ipw10.mlmpn" containing the following components:

gammDiff

the treatment effect estimate, i.e., the mean difference between the treatment and control arm.

se_sw

the sandwich-type standard error estimate of the treatment effect estimate.

z.wald

the Wald statistic (i.e., gammDiff/se_sw).

Examples

1
2
3
4
5
6
7
data(dat_obs)
head(dat_obs)
IPW.MLMPN(Y=dat_obs$Y,
                   Trt=dat_obs$Trt,
                   clus=dat_obs$clus,
                   Lyz=dat_obs[,c('Ly','Lz')],
                   Ly=dat_obs[,c('Ly')] )

IPWpn documentation built on April 13, 2021, 5:08 p.m.