Skip to contents

A wrapper around two_sample() for pairwise comparisons. For posthoc testing we recomend using pairwise_test() accordingly.

Usage

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

Arguments

data

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

x

Character for the grouping factor. Must be present in data

y

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

rowid

Character 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 for parametric test. The 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%).

markdown

Logical (default FALSE). If lbl is TRUE, then this argument specify if the report-ready labels should be formated for inline code for R markdown (using mathjax and markdown syntax), or if the output should be in plain text (the default).

character.only

Logical. checks whether to use the unevaluated expression or its content (when TRUE), asumming is a character vector. Defaults to FALSE.

...

Currently ignored.