two_sample: Two Sample test

View source: R/two_sample.R

two_sampleR Documentation

Two Sample test

Description

A list containing results from a two-sample test and effect size plus confidence intervals.

Usage

two_sample(
  data,
  x,
  y,
  rowid = NULL,
  type,
  paired = FALSE,
  var.equal = FALSE,
  effsize.type = "unbiased",
  alternative = "two.sided",
  conf.level = 0.95,
  character.only = FALSE,
  ...
)

Arguments

data

Data frame from which x and y (and possibly rowid if provided) will be searched.

x

Character name for the grouping factor. Must be present in data

y

Character name for the response variable. Must be present in data.

rowid

Character name for the subject-id column. If null, then is assumed that data is sorted for paired designs, creating one. So if your data is not sorted and you leave this argument unspecified, the results can be inaccurate when there are more than two levels in x and there are NAs present.

type

Set "auto" (default) for checking the normality and homogeneity of variances for test selection. Other options are "p" for parametric, "np" for non-parametric and "r" for robust tests.

paired

Logical that decides whether the experimental design is repeated measures/within-subjects or between-subjects. The default is FALSE.

var.equal

Logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used.

effsize.type

Options are "unbiased" or "g" for Hedges g and "biased" or "d" for Cohen's d as a measure of effect size. rank-biserial correlation is used for non-parametric analysis.

alternative

A character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

conf.level

Confidence/Credible Interval (CI) level. Default to 0.95 (95%).

character.only

whether to treat x as a character. Default is FALSE.

...

Currently ignored.


matcasti/Report documentation built on July 23, 2024, 10:24 a.m.