ard_smd_smd: ARD Standardized Mean Difference

View source: R/ard_smd_smd.R

ard_smd_smdR Documentation

ARD Standardized Mean Difference

Description

Standardized mean difference calculated via smd::smd() with na.rm = TRUE. Additionally, this function add a confidence interval to the SMD when std.error=TRUE, which the original smd::smd() does not include.

Usage

ard_smd_smd(data, by, variables, std.error = TRUE, conf.level = 0.95, ...)

Arguments

data

(data.frame/survey.design)
a data frame or object of class 'survey.design' (typically created with survey::svydesign()).

by

(tidy-select)
column name to compare by.

variables

(tidy-select)
column names to be compared. Independent tests will be computed for each variable.

std.error

(scalar logical)
Logical indicator for computing standard errors using smd::compute_smd_var(). Default is TRUE.

conf.level

(scalar numeric)
confidence level for confidence interval. Default is 0.95.

...

arguments passed to smd::smd()

Value

ARD data frame

Examples


ard_smd_smd(cards::ADSL, by = SEX, variables = AGE)
ard_smd_smd(cards::ADSL, by = SEX, variables = AGEGR1)


cardx documentation built on Sept. 11, 2024, 9:12 p.m.