Description Usage Arguments Value References See Also Examples
multi.ate
implements a variety of algorithms for calculating
propensity score weighting estimators and their standard errors for the
sample average treatment effect (ATE) in a clustered data setting. Here, the
treatment is assigned on an individual level and not cluster level.
multi.ate
has an optional threshold for the minimum number of units in
each treatment group of each cluster - clusters that don't meet this
requirement are removed before the propensity scores are estimated.
multi.ate
offers four weighting estimators: marginal weighting,
clustered weighting, stratification, and doubly-robust. Standard errors
include closed-form formula when available (Lunceford and Davidian 2004), as
well as values obtained by bootstrapping. psmultilevel
makes calls to
multi.ate
as needed.
1 2 3 |
data |
Data containing covariates except for the outcome, the treatment, and the cluster identification. |
Y |
A vector containing the outcome of interest. This can be either binary or continuous, but will need to be specified for methods involving outcome models. |
Z |
A vector indicating the observations which are in the treated and control group. This is binary-coded: 1 = Treated, 0 = Untreated. |
cluster |
A vector of factored cluster identification. |
y.formula |
Outcome formula, required for Doubly-Robust. The treatment variable should be called "Z" and the cluster variable should be called "cluster". |
pscore.formula |
Propensity score formula. The treatment variable should be called "Z" and the cluster variable should be called "cluster". |
method |
A character string for the method of interest. Options: "marwt" for marginal weighting, "clwt" for clustered weighting, "stratification" for stratification/ subclassification, and "DR" for doubly-robust. |
modeltype |
A character string identifying the model of the cluster-specific
effects for both the propensity score and the outcome. Options: "fixed" for a fixed effects model, and
"random" for a random effects model. Default: fixed effects model. Note that for random
effects models, function |
y.type |
A character string classifying the outcome type. Options: "binary"/ "continuous". |
se.report |
A logical flag for whether the standard error for the estimator should be reported. |
nboot |
The number of bootstrap samples to be drawn. Default value is 75. |
nsub |
A scalar denoting the number of subclasses to be used for stratification. Default value is 6. |
ps.cut |
A vector of length 2 containing the lower and upper limit for the propensity scores cut-offs. Observations beyond these limits are removed. Default values are (0.05,0.95). |
cl.cutoff |
A scalar denoting the minimum number of observations required in both the treatment and the control groups. Clusters with fewer observations than the threshold in either group will be removed before the estimation process. Default value is 0. |
A list with the elements:
estimate |
Value of the estimator of interest. |
se |
The standard error of the estimator. Closed-form formula is available for ATE DR (Lunceford and Davidian 2004). Bootstrapping is implemented to calculate SE for the rest of the estimators. |
Lunceford, J. K. and Davidian, M. (2004), Stratification and weighting via the propensity score in estimation of causal treatment effects: a comparative study. Statist. Med., 23: 2937<e2><80><93>2960. doi:10.1002/sim.1903
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | y.formula.re<-function(){
return (Y~Z+X1+X2+(1|cluster))
}
ps.formula.re<-function(){
return(Z~ X1+X2+ (1|cluster))
}
data<-simdata[,c(1:2)]
multi.ate(data=data,Y=simdata$Y,Z=simdata$Z,cluster=simdata$cluster,y.formula=NULL,
pscore.formula=ps.formula.re(),method='marwt',modeltype='random',y.type=NULL,
se.report=FALSE,ps.cut=c(0.05,0.95),cl.cutoff=0)
## Not run:
#Method = Cluster weighting, obtain bootstrapped SE
multi.ate(data=data,Y=simdata$Y,Z=simdata$Z,cluster=simdata$cluster,
y.formula = y.formula.re(),pscore.formula=ps.formula(),method='clwt',modeltype='random',
se.report=TRUE,nboot=75,ps.cut=c(0.05,0.95),cl.cutoff=0)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.