get_pseudo_ipd_binary {maicplus} | R Documentation |
Create pseudo IPD given aggregated binary data
Description
Create pseudo IPD given aggregated binary data
Usage
get_pseudo_ipd_binary(binary_agd, format = c("stacked", "unstacked"))
Arguments
binary_agd |
a data.frame that take different formats depending on |
format |
a string, "stacked" or "unstacked" |
Value
a data.frame of pseudo binary IPD, with columns USUBJID, ARM, RESPONSE
Examples
# example of unstacked
testdat <- data.frame(Yes = 280, No = 120)
rownames(testdat) <- "B"
get_pseudo_ipd_binary(
binary_agd = testdat,
format = "unstacked"
)
# example of stacked
get_pseudo_ipd_binary(
binary_agd = data.frame(
ARM = rep("B", 2),
RESPONSE = c("YES", "NO"),
COUNT = c(280, 120)
),
format = "stacked"
)
[Package maicplus version 0.1.2 Index]