Learn R Programming

multid (version 1.0.2)

d_pooled_sd: Standardized mean difference with pooled standard deviation

Description

Standardized mean difference with pooled standard deviation

Usage

d_pooled_sd(
  data,
  var,
  group.var,
  group.values,
  rename.output = TRUE,
  infer = FALSE
)

Value

Descriptive statistics and mean differences

Arguments

data

A data frame.

var

A continuous variable for which difference is estimated.

group.var

The name of the group variable.

group.values

Vector of length 2, group values (e.g. c("male", "female) or c(0,1)).

rename.output

Logical. Should the output values be renamed according to the group.values? Default TRUE.

infer

Logical. Statistical inference with Welch test? (default FALSE)

Examples

Run this code
d_pooled_sd(iris[iris$Species == "setosa" | iris$Species == "versicolor", ],
  var = "Petal.Length", group.var = "Species",
  group.values = c("setosa", "versicolor"), infer = TRUE
)

Run the code above in your browser using DataLab