compare_means {radiant.basics}R Documentation

Compare sample means

Description

Compare sample means

Usage

compare_means(
  dataset,
  var1,
  var2,
  samples = "independent",
  alternative = "two.sided",
  conf_lev = 0.95,
  comb = "",
  adjust = "none",
  test = "t",
  data_filter = "",
  envir = parent.frame()
)

Arguments

dataset

Dataset

var1

A numeric variable or factor selected for comparison

var2

One or more numeric variables for comparison. If var1 is a factor only one variable can be selected and the mean of this variable is compared across (factor) levels of var1

samples

Are samples independent ("independent") or not ("paired")

alternative

The alternative hypothesis ("two.sided", "greater" or "less")

conf_lev

Span of the confidence interval

comb

Combinations to evaluate

adjust

Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni)

test

t-test ("t") or Wilcox ("wilcox")

data_filter

Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000")

envir

Environment to extract data from

Details

See https://radiant-rstats.github.io/docs/basics/compare_means.html for an example in Radiant

Value

A list of all variables defined in the function as an object of class compare_means

See Also

summary.compare_means to summarize results

plot.compare_means to plot results

Examples

compare_means(diamonds, "cut", "price") %>% str()


[Package radiant.basics version 1.6.6 Index]