calculate_d {ViSe}R Documentation

d_s for Between Subjects with Pooled SD Denominator

Description

This function displays d for two between subjects groups and gives the central and non-central confidence interval using the pooled standard deviation as the denominator.

Usage

calculate_d(
  m1 = NULL,
  m2 = NULL,
  sd1 = NULL,
  sd2 = NULL,
  n1 = NULL,
  n2 = NULL,
  t = NULL,
  model = NULL,
  df = NULL,
  x_col = NULL,
  y_col = NULL,
  d = NULL,
  a = 0.05,
  lower = TRUE
)

Arguments

m1

mean group one

m2

mean group two

sd1

standard deviation group one

sd2

standard deviation group two

n1

sample size group one

n2

sample size group two

t

optional, calculate d from independent t, you must include n1 and n2 for degrees of freedom

model

optional, calculate d from t.test for independent t, you must still include n1 and n2

df

optional dataframe that includes the x_col and y_col

x_col

name of the column that contains the factor levels OR a numeric vector of group 1 scores

y_col

name of the column that contains the dependent score OR a numeric vector of group 2 scores

d

a previously calculated d value from a study

a

significance level

lower

Use this to indicate if you want the lower or upper bound of d for one sided confidence intervals. If d is positive, you generally want lower = TRUE, while negative d values should enter lower = FALSE for the upper bound that is closer to zero.

Details

To calculate d_s, mean two is subtracted from mean one and divided by the pooled standard deviation.

d_s = \frac{M_1 - M_2}{S_{pooled}}

You should provide one combination of the following:

1: m1 through n2

2: t, n1, n2

3: model, n1, n2

4: df, "x_col", "y_col"

5: x_col, y_col as numeric vectors

6: d, n1, n2

You must provide alpha and lower to ensure the right confidence interval is provided for you.

Value

Provides the effect size (Cohen's *d*) with associated central and non-central confidence intervals, the *t*-statistic, the confidence intervals associated with the means of each group, as well as the standard deviations and standard errors of the means for each group. The one-tailed confidence interval is also included for sensitivity analyses.

d

effect size

dlow

noncentral lower level confidence interval of d value

dhigh

noncentral upper level confidence interval of d value

dlow_central

central lower level confidence interval of d value

dhigh_central

central upper level confidence interval of d value

done_low

noncentral lower bound of one tailed confidence interval

done_low_central

central lower bound of one tailed confidence interval

M1

mean of group one

sd1

standard deviation of group one mean

se1

standard error of group one mean

M1low

lower level confidence interval of group one mean

M1high

upper level confidence interval of group one mean

M2

mean of group two

sd2

standard deviation of group two mean

se2

standard error of group two mean

M2low

lower level confidence interval of group two mean

M2high

upper level confidence interval of group two mean

spooled

pooled standard deviation

sepooled

pooled standard error

n1

sample size of group one

n2

sample size of group two

df

degrees of freedom (n1 - 1 + n2 - 1)

t

t-statistic

p

p-value

estimate

the d statistic and confidence interval in APA style for markdown printing

statistic

the t-statistic in APA style for markdown printing

Examples

calculate_d(m1 = 14.37, # neglect mean
   sd1 = 10.716, # neglect sd
   n1 = 71, # neglect n
   m2 = 10.69, # none mean
   sd2 = 8.219, # none sd
   n2 = 3653, # none n
   a = .05, # alpha/confidence interval
   lower = TRUE) # lower or upper bound


[Package ViSe version 0.1.2 Index]