| aggregate_outcome_by_level | R Documentation |
Takes individual-level linear predictors and aggregates them to the specified cluster level. This is used for cluster-level treatment assignment in propensity score models.
aggregate_outcome_by_level(
outcome,
data,
sim_args,
multinomial_categories = NULL
)
outcome |
Numeric vector or matrix of linear predictors (untransformed outcomes) |
data |
Data frame containing cluster ID variables |
sim_args |
Simulation arguments list containing outcome_level specification |
multinomial_categories |
Categories for multinomial outcome transformation |
Aggregated outcome vector with cluster-level values repeated for all individuals within each cluster
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.