Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/binary-helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ glm_makeup <- function(binobj, legend = "before matching", weighted = FALSE) {
n <- tapply(binobj$data$USUBJID, binobj$data$ARM, length)
n_event <- tapply(binobj$data$RESPONSE, binobj$data$ARM, sum)
} else {
n <- tapply(binobj$data$weights, binobj$data$ARM, length)
n <- tapply(binobj$data$weights, binobj$data$ARM, sum)
n_event <- tapply(binobj$data$weights * binobj$data$RESPONSE, binobj$data$ARM, sum)
}
data.frame(
Expand Down
4 changes: 2 additions & 2 deletions R/maic_anchored.R
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ maic_anchored_binary <- function(res,
# ~~~ Analysis table
# : set up proper link
glm_link <- switch(eff_measure,
"RD" = poisson(link = "identity"),
"RR" = poisson(link = "log"),
"RD" = binomial(link = "identity"),
"RR" = binomial(link = "log"),
"OR" = binomial(link = "logit")
)
res_template <- list(
Expand Down
4 changes: 2 additions & 2 deletions R/maic_unanchored.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ maic_unanchored_binary <- function(res,
# ~~~ Analysis table
# : set up proper link
glm_link <- switch(eff_measure,
"RD" = poisson(link = "identity"),
"RR" = poisson(link = "log"),
"RD" = binomial(link = "identity"),
"RR" = binomial(link = "log"),
"OR" = binomial(link = "logit")
)
transform_estimate <- switch(eff_measure,
Expand Down
Loading