View source: R/treatmemt_model.R
treatment_model | R Documentation |
Observational study involves the evaluation of outcomes of participants not randomly assigned treatments or exposures. To be able to assess the effects of the outcome, the participants are matched using propensity scores (PSM). This then enables the determination of the effects of the treatments on those treated against those who were not treated. Most of the earlier functions available for this analysis only enables the determination of the average treatments effects on the treated (ATT) while the other treatment effects are optional. This is where this functions is unique because five different average treatment effects are estimated simultaneously, in spite of the one line code arguments. The five treatment effects are:
Average treatment effect for the entire (ATE) population
Average treatment effect for the treated (ATT) population
Average treatment effect for the controlled (ATC) population
Average treatment effect for the evenly matched (ATM) population
Average treatment effect for the overlap (ATO) population.
There are excellent materials dealing with each of the treatment effects, please see Understanding propensity score weighting
treatment_model(Treatment, x_data)
Treatment |
Vector of binary data (0 = control population, 1 = treated population) LHS for the treatment effects estimation |
x_data |
Data frame of explanatory variables for the RHS of the estimation |
A list with the following components:
Model |
Estimated treatment effects model. |
Effect |
Data frame of the estimated various treatment effects. |
P_score |
Vector of estimated propensity scores from the model |
Fitted_estimate |
Vector of fitted values from the model |
Residuals |
Residuals of the estimated model |
`Experiment plot` |
Plot of the propensity scores from the model faceted into Treated and control populations |
`ATE plot` |
Plot of the average treatment effect for the entire population |
`ATT plot` |
Plot of the average treatment effect for the treated population |
`ATC plot` |
Plot of the average treatment effect for the controlled population |
`ATM plot` |
Plot of the average Treatment effect for the evenly population |
`ATO plot` |
Plot of the average Treatment effect for the overlap population |
weights |
Estimated weights for each of the treatment effects |
Treatment = treatments$treatment
data = treatments[, c(2:3)]
treatment_model(Treatment, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.