Description Usage Arguments Value References Examples
View source: R/outcome_model.R
This function will run the outcomes model for your analysis. Upon completeion, use the model object returned from this function and call ov_simgrid to check the sensitivity of your findings.
1 2 |
ps_object |
A ps object exported from TWANG |
stop.method |
If the user specifies ps_object, stop.method should be used to export the weights (e.g "ks.max") |
data |
A data frame containing the data |
weights |
A column name in data that represents the relevant weights |
treatment |
A column name in data for the treatment indicator |
outcome |
A column name in data indicating the outcome vector |
model_covariates |
A vector of column names representing the covariates in your final outcome's model |
estimand |
"ATE" or "ATT" |
outcome_model returns a list containing the following components:
ps_object |
The ps_object from TWANG specified in the function call. If ignored, this component will be NULL |
stop.method |
The stop method, if applicable, specified in the function call |
data |
the updated data frame |
weights |
the original vector of weights |
tx |
a character name in data indicating the treatment indicator |
y |
a character name in data indicating the outcome |
outcome_mod_fmla |
the final outcome model formula |
estimand |
The estimand specified in the function call |
mod_results |
an object of class "svyglm" |
Lumley T (2020). “survey: analysis of complex survey samples.” R package version 4.0.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.