View source: R/binary-helper.R
glm_makeup | R Documentation |
Helper function to summarize outputs from glm fit
glm_makeup(binobj, legend = "before matching", weighted = FALSE)
binobj |
returned object from |
legend |
label to indicate the binary fit |
weighted |
logical flag indicating whether weights have been applied in the glm fit |
A data.frame
containing a summary of the number of events and subjects in a logistic
regression model.
data(adrs_sat)
pseudo_adrs <- get_pseudo_ipd_binary(
binary_agd = data.frame(
ARM = rep("B", 2),
RESPONSE = c("YES", "NO"),
COUNT = c(280, 120)
),
format = "stacked"
)
pseudo_adrs$RESPONSE <- as.numeric(pseudo_adrs$RESPONSE)
combined_data <- rbind(adrs_sat[, c("USUBJID", "ARM", "RESPONSE")], pseudo_adrs)
combined_data$ARM <- as.factor(combined_data$ARM)
binobj_dat <- stats::glm(RESPONSE ~ ARM, combined_data, family = binomial("logit"))
glm_makeup(binobj_dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.