View source: R/stablised-weights.R
dh.stablisedWeights | R Documentation |
This calculates stablised inverse probability weights. Currently only works with a binary outcome variable.
dh.stablisedWeights(
glm_object = NULL,
responder_df = NULL,
responder_var = NULL,
non_responder_level,
responder_level,
new_obj = NULL,
conns = NULL
)
glm_object |
A fitted ds.glmSLMA object. |
responder_df |
A serverside data frame containing the responder variable. |
responder_var |
Character vector of outcome variable within |
non_responder_level |
Character vector indicating level of |
responder_level |
Character vector indicating level of |
new_obj |
A character string for the name of the new object to store stabilized weights. |
conns |
DataSHIELD connections object. |
The function performs the following steps:
Generate predicted values from the GLM model.
Calculate proportions of a binary outcome using the outcome data.
Format the proportions data for analysis.
Create stabilized weights using the formatted proportions and GLM predictions.
Stabilized weights assigned as serverside object new_obj
Currently only works with binary outcome variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.