diff --git a/R/binary-helper.R b/R/binary-helper.R index 6d2e2aad..9fc76fc8 100644 --- a/R/binary-helper.R +++ b/R/binary-helper.R @@ -94,18 +94,18 @@ get_pseudo_ipd_binary <- function(binary_agd, format = c("stacked", "unstacked") #' @examples #' 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") +#' 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 <- 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) - glm_makeup <- function(binobj, legend = "before matching", weighted = FALSE) { ARM <- levels(binobj$data$ARM) if (!weighted) {