View source: R/Outcome.MLMPN.R
Outcome.MLMPN | R Documentation |
Outcome.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 multilevel modeling based outcome models (where a multilevel model is specified for the treatment outcome and a regression model is specified for the control outcome).
Outcome.MLMPN(Y, Trt, clus, general_confounders, clustering_confounders)
outcome |
a string indicating the name of the column containing the outcome variable. |
Treatment_assignment |
a string indicating the name of the column containing the treatment assignments (1 for treatment and 0 for control). (In the partially nested design, the treatment group has multiple clusters, and the control group has no cluster.) |
cluster_assignment |
a string indicating the name of the column containing the observed cluster assignments. For an individual in the treatment group, the cluster assignment is the cluster in which the individual is assigned to receive the treatment (e.g., an integer in 1, 2, ,..., J, where J is the total number of clusters in the treatment group). For an individual in the control group, set the cluster assignment as 0. |
clustering_confounders |
A character vector containing the names of the clustering confounders. The clustering confounders are those baseline confounders that directly affect both the treatment assignment and cluster assignment in the treatment group, but do not directly influence the outcome once the treatment assignment and cluster assignment are given. |
general_confounders |
A character vector containing the names of the general confounders. The general confounders are those baseline confounders that directly affect both the treatment assignment and outcome within a cluster of the treatment group. (When one is uncertain about whether a covariate is a general confounder or a clustering confounder, the covariate should be classified as a general confounder to be conservative, because a general confounder can directly affect the outcome, cluster assignment, and treatment assignment.) |
data |
A data frame containing all variables. |
The multilevel model for the treatment outcome includes a random cluster-specific intercept. The covariates do not have random cluster-specific slopes.
Outcome.MLMPN returns a list containing the following components:
Estimate |
the average treatment effect estimate. |
SE |
the standard error estimate of the average treatment effect estimate. |
z.wald |
the Wald statistic (i.e., Estimate/SE). |
data(dat_obs) head(dat_obs) res= Outcome.MLMPN( outcome = 'Y', Treatment_assignment = 'Trt', cluster_assignment = 'K', general_confounders = c('C'), clustering_confounders = c('W') , data = dat_obs) res ~design ~models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.