Metric t-test parameters matrix

Description

Returns a matrix of independent or paired t-test data for comparison to ordinal alternatives

Usage

1
metric_t(a,b,alpha=0.05,paired=FALSE,t.welch=TRUE)

Arguments

a

First dataset (vector or matrix).

b

Second dataset (vector or matrix).

alpha

Significance or α-level used for the calculation of the confidence intervals. Default value is α = .05 or 5 Percent.

paired

By default, independence of the two groups or data sets is assumed. If the number of cases in x and y are equal and paired (e.g. pre-post) comparisons, this should be set to TRUE.

t.welch

By default, the variances of the two datasets are not assumed equal. If the pooled variance is needed for t, p, and df this should be set to FALSE. This setting has no effect on the calculation of Cohens'd.

Value

[1,1] or ["Diff M" ,1]

Mean Difference My-Mx or estimate (in the paired case) See t.test for details.

[2,1] or ["t value" ,1] or ["t(dep.)" ,1]

Value of the t-statistic for the independent or the paired case. See t.test for details.

[3,1] or ["df" ,1] or ["df" ,1]

Degrees of freedom for the t-statistic. For independent samples, the Welch approximation of degrees of freedom is returned unless t.welch is set to FALSE. See t.test for details.

[4,1] or ["p value" ,1]

The p-value of the test. See t.test for details. For independent samples, the Welch approximation of degrees of freedom is returned unless t.welch is set to FALSE.

[5,1] or ["Cohen's d" ,1]

Cohen's d effect size for both the independent and the paired case calculated using student's t (i.e. assuming pooled variance) as

Cohen's d = t ((n_y+n_x)/(n_y n_x))^(1/2),

following the advice of Dunlap, Cortina, Vaslow and Burke (1996) who suggested using the independent group t-value and the original standard deviations also for the paired case to avoid overestimation of the effect size.

Author(s)

Jens J. Rogmann, University of Hamburg, Department of Psychology,
Hamburg, Germany (Jens.Rogmann@uni-hamburg.de)

References

Dunlap, W. P., Cortina, J. M., Vaslow, J. B., & Burke, M. J. (1996). Meta-analysis of experiments with matched groups or repeated measures designs. Psychological Methods, 1, 170-177.

See Also

t.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
> #Example from Dunlap et al. (1996), Table 1
> y<-c(27,25,30,29,30,33,31,35)
> x<-c(21,25,23,26,27,26,29,31)
> metric_t(x,y)
                 [,1]
Diff M     4.00000000
t value    2.52982213
df Welch  14.00000000
p value    0.02403926
Cohen's d  1.26491106
> metric_t(x,y,paired=TRUE)
                 [,1]
Diff M    4.000000000
t(dep.)   4.512608599
df        7.000000000
p value   0.002756406
Cohen's d 1.264911064

## End(Not run)