|
16 | 16 | #' @param ... arguments passed to `effectsize::hedges_g(...)` |
17 | 17 | #' |
18 | 18 | #' @return ARD data frame |
19 | | -#' @name ard_hedges_g |
| 19 | +#' @name ard_effectsize_hedges_g |
20 | 20 | #' |
21 | 21 | #' @details |
22 | | -#' For the `ard_hedges_g()` function, the data is expected to be one row per subject. |
| 22 | +#' For the `ard_effectsize_hedges_g()` function, the data is expected to be one row per subject. |
23 | 23 | #' The data is passed as `effectsize::hedges_g(data[[variable]]~data[[by]], data, paired = FALSE, ...)`. |
24 | 24 | #' |
25 | | -#' For the `ard_paired_hedges_g()` function, the data is expected to be one row |
| 25 | +#' For the `ard_effectsize_paired_hedges_g()` function, the data is expected to be one row |
26 | 26 | #' per subject per by level. Before the effect size is calculated, the data are |
27 | 27 | #' reshaped to a wide format to be one row per subject. |
28 | 28 | #' The data are then passed as |
|
31 | 31 | #' @examplesIf cards::is_pkg_installed(c("effectsize", "parameters", "withr"), reference_pkg = "cardx") |
32 | 32 | #' cards::ADSL |> |
33 | 33 | #' dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |> |
34 | | -#' ard_hedges_g(by = ARM, variables = AGE) |
| 34 | +#' ard_effectsize_hedges_g(by = ARM, variables = AGE) |
35 | 35 | #' |
36 | 36 | #' # constructing a paired data set, |
37 | 37 | #' # where patients receive both treatments |
|
41 | 41 | #' dplyr::arrange(USUBJID, ARM) |> |
42 | 42 | #' dplyr::group_by(USUBJID) |> |
43 | 43 | #' dplyr::filter(dplyr::n() > 1) |> |
44 | | -#' ard_paired_hedges_g(by = ARM, variables = AGE, id = USUBJID) |
| 44 | +#' ard_effectsize_paired_hedges_g(by = ARM, variables = AGE, id = USUBJID) |
45 | 45 | NULL |
46 | 46 |
|
47 | | -#' @rdname ard_hedges_g |
| 47 | +#' @rdname ard_effectsize_hedges_g |
48 | 48 | #' @export |
49 | | -ard_hedges_g <- function(data, by, variables, ...) { |
| 49 | +ard_effectsize_hedges_g <- function(data, by, variables, ...) { |
50 | 50 | # check installed packages --------------------------------------------------- |
51 | 51 | cards::check_pkg_installed(c("effectsize", "parameters", "withr"), reference_pkg = "cardx") |
52 | 52 |
|
@@ -89,9 +89,9 @@ ard_hedges_g <- function(data, by, variables, ...) { |
89 | 89 | dplyr::bind_rows() |
90 | 90 | } |
91 | 91 |
|
92 | | -#' @rdname ard_hedges_g |
| 92 | +#' @rdname ard_effectsize_hedges_g |
93 | 93 | #' @export |
94 | | -ard_paired_hedges_g <- function(data, by, variables, id, ...) { |
| 94 | +ard_effectsize_paired_hedges_g <- function(data, by, variables, id, ...) { |
95 | 95 | # check installed packages --------------------------------------------------- |
96 | 96 | cards::check_pkg_installed("effectsize", reference_pkg = "cardx") |
97 | 97 | cards::check_pkg_installed("parameters", reference_pkg = "cardx") |
|
0 commit comments