Skip to contents

This function allows to calculate the cohen's d and the critical d given the t-value for a two samples t-test, sample size of the two groups and the standard error, specifying the confidence level of the interval, the direction of the hypothesis and the variance parameter.

Usage

crit_from_t_t2s(
  t = NULL,
  n1,
  n2,
  se = NULL,
  conf.level,
  hypothesis,
  var.equal = FALSE
)

Arguments

t

the t value.

n1

a number corresponding to the sample size of group 1.

n2

a number corresponding to the sample size of group 2.

se

a number corresponding to the standard error.

conf.level

confidence level of the interval.

hypothesis

a character string indicating the alternative hypothesis ("less", "greater" or "two.tailed").

var.equal

a logical variable indicating whether to treat the two variances as being equal.

Value

the output returns a d which is the Cohen's d, the critical d which is the minimum value for which to get a significant result with a given sample, the bc is the numerator of the formula from which the d is calculated, df are the degrees of freedom and se is the standard error.