View source: R/ard_effectsize_hedges_g.R
ard_effectsize_hedges_g | R Documentation |
Analysis results data for paired and non-paired Hedge's G Effect Size Test
using effectsize::hedges_g()
.
ard_effectsize_hedges_g(data, by, variables, conf.level = 0.95, ...)
ard_effectsize_paired_hedges_g(data, by, variables, id, conf.level = 0.95, ...)
data |
( |
by |
( |
variables |
( |
conf.level |
(scalar |
... |
arguments passed to |
id |
( |
For the ard_effectsize_hedges_g()
function, the data is expected to be one row per subject.
The data is passed as effectsize::hedges_g(data[[variable]]~data[[by]], data, paired = FALSE, ...)
.
For the ard_effectsize_paired_hedges_g()
function, the data is expected to be one row
per subject per by level. Before the effect size is calculated, the data are
reshaped to a wide format to be one row per subject.
The data are then passed as
effectsize::hedges_g(x = data_wide[[<by level 1>]], y = data_wide[[<by level 2>]], paired = TRUE, ...)
.
ARD data frame
cards::ADSL |>
dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
ard_effectsize_hedges_g(by = ARM, variables = AGE)
# constructing a paired data set,
# where patients receive both treatments
cards::ADSL[c("ARM", "AGE")] |>
dplyr::filter(ARM %in% c("Placebo", "Xanomeline High Dose")) |>
dplyr::mutate(.by = ARM, USUBJID = dplyr::row_number()) |>
dplyr::arrange(USUBJID, ARM) |>
dplyr::group_by(USUBJID) |>
dplyr::filter(dplyr::n() > 1) |>
ard_effectsize_paired_hedges_g(by = ARM, variables = AGE, id = USUBJID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.