View source: R/grf_subg_harm_glm.R
| create_glm_row | R Documentation |
Fits a GLM within the specified subgroup and returns a one-row data frame containing the effect estimate, confidence interval, sample size, and event count. Supports binary, continuous, and count (with offset) outcomes.
create_glm_row(
df,
outcome.name,
treat.name = "treat",
effect_measure = "log_OR",
offset.name = NULL,
overdispersion = "none",
conf.level = 0.95,
min_arm_n = 5L,
min_arm_events = 3L,
verbose = FALSE
)
df |
Data frame for the subgroup (already subset). |
outcome.name |
Character. Name of the outcome column. |
treat.name |
Character. Name of the treatment indicator. |
effect_measure |
Character. Effect measure; see
|
offset.name |
Character or |
overdispersion |
Character. One of |
conf.level |
Numeric. Confidence level. Default: |
min_arm_n |
Integer. Minimum observations per arm; returns |
min_arm_events |
Integer. For binary/count outcomes, minimum events
per arm; returns |
verbose |
Logical. Default: |
A one-row data frame with columns:
N, n_treat, n_control,
events_treat, events_control (for binary/count),
est, lower, upper, se, effect_measure.
grf.subg.harm.glm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.