Size: 856
Comment:
|
Size: 3462
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= How do I compute Cohen's d in SPSS? = | = How do I compute Cohen's d in SPSS and its and eta-squared confidence interval in SPSS, R or EXCEL? = |
Line 5: | Line 5: |
Cohen's d = \[ \frac{\mbox{difference in group means}}{\mbox{average group sd}} \] |
Cohen's d = (difference in group means)/(average group sd) |
Line 8: | Line 7: |
This may be worked out using the routine of Smithson which is located in the demo file in the power talk at [:StatsCourse2009 Graduate Statistics Courses 2009.] Alternatively the average group sd is equal to the ''square root'' of the ''Mean Square Error'' outputted using the ONEWAY procedure in SPSS and dividing this into the difference in the two means which can be obtained using the means procedure. For example for comparing the two age 'pr' group means we can run the below | This may be worked out using the routine of Smithson which is located in the demo file in the power talk given as part of the [[StatsCourse2009|Graduate Statistics Courses 2009.]] Alternatively the average group sd is equal to the ''square root'' of the ''Mean Square Error'' outputted using the ONEWAY procedure in SPSS and dividing this into the difference in the two means which can be obtained using the means procedure. For example for comparing the two age 'pr' group means we can run the below |
Line 17: | Line 16: |
You can alternatively use SPSS Output Management Syntax (OMS) as shown [[FAQ/omscd|here]] to compute Cohen's d which converts the tabular output in SPSS procedures into data files which may then be manipulated to give statistics of interest. Cumming and Finch (2001) have written an EXCEL spreadsheet to compute the 95% Confidence Interval for Cohen's d available from [[http://www.latrobe.edu.au/psy/research/cognitive-and-developmental-psychology/ | here.]] The spreadsheet is also [[attachment:cohendci.xlsm | here.]] Choose the table related to the ''CI for d'', select d using the paddle then simulate the lower and upper limits clicking on ''find LL'' and ''find UL'' at bottom of page under the plot to produce the 95% confidence intervals. Alternatively a formula for the variance of Cohen's d is given [[http://stats.stackexchange.com/questions/8487/how-do-you-calculate-confidence-intervals-for-cohens-d | here.]] If this link is broken its contents are reproduced [[FAQ/cohendse | here.]] Macros and functions to obtain confidence intervals for eta-squared and Cohen's d in SPSS and R including some of the above are outlined [[http://daniellakens.blogspot.co.uk/2014/06/calculating-confidence-intervals-for.html | here.]] This includes using R to obtain a CI for eta-squared from between subjects ANOVA {{{ library(MBESS) ci.pvaf(F.value=5.72, df.1=1, df.2=198, N=200, conf.level=.90) }}} which yields {{{ [1] "The 0.9 confidence limits (and the actual confidence interval coverage) for the proportion of variance of the dependent variable accounted for by knowing group status are given as:" $Lower.Limit.Proportion.of.Variance.Accounted.for [1] 0.002600261 $Probability.Less.Lower.Limit [1] 0.05 $Upper.Limit.Proportion.of.Variance.Accounted.for [1] 0.07563493 $Probability.Greater.Upper.Limit [1] 0.05 $Actual.Coverage [1] 0.9 }}} and adding a few extra lines for eta-squareds from a repeated measures ANOVA as below (otherwise the R function gives an error message) {{{ library(MBESS) Lims <- conf.limits.ncf(F.value = 7, conf.level = 0.90, df.1 <- 4, df.2 <- 50) Lower.lim <- Lims$Lower.Limit/(Lims$Lower.Limit + df.1 + df.2 + 1) Upper.lim <- Lims$Upper.Limit/(Lims$Upper.Limit + df.1 + df.2 + 1) Lower.lim Upper.lim }}} __References__ Cumming, G. & Finch, S. (2001) A primer on the understanding, use, and calculation of confidence intervals that are based on central and noncentral distributions. Educational and Psychological Measurement, '''61''', 633-649. |
How do I compute Cohen's d in SPSS and its and eta-squared confidence interval in SPSS, R or EXCEL?
Cohen's d represents the difference between a pair of group means expressed in terms of the average group standard deviation.
Cohen's d = (difference in group means)/(average group sd)
This may be worked out using the routine of Smithson which is located in the demo file in the power talk given as part of the Graduate Statistics Courses 2009. Alternatively the average group sd is equal to the square root of the Mean Square Error outputted using the ONEWAY procedure in SPSS and dividing this into the difference in the two means which can be obtained using the means procedure. For example for comparing the two age 'pr' group means we can run the below
ONEWAY age BY pr /MISSING ANALYSIS. MEANS TABLES=age BY pr /CELLS MEAN COUNT STDDEV .
You can alternatively use SPSS Output Management Syntax (OMS) as shown here to compute Cohen's d which converts the tabular output in SPSS procedures into data files which may then be manipulated to give statistics of interest.
Cumming and Finch (2001) have written an EXCEL spreadsheet to compute the 95% Confidence Interval for Cohen's d available from here. The spreadsheet is also here. Choose the table related to the CI for d, select d using the paddle then simulate the lower and upper limits clicking on find LL and find UL at bottom of page under the plot to produce the 95% confidence intervals.
Alternatively a formula for the variance of Cohen's d is given here. If this link is broken its contents are reproduced here.
Macros and functions to obtain confidence intervals for eta-squared and Cohen's d in SPSS and R including some of the above are outlined here. This includes using R to obtain a CI for eta-squared from between subjects ANOVA
library(MBESS) ci.pvaf(F.value=5.72, df.1=1, df.2=198, N=200, conf.level=.90)
which yields
[1] "The 0.9 confidence limits (and the actual confidence interval coverage) for the proportion of variance of the dependent variable accounted for by knowing group status are given as:" $Lower.Limit.Proportion.of.Variance.Accounted.for [1] 0.002600261 $Probability.Less.Lower.Limit [1] 0.05 $Upper.Limit.Proportion.of.Variance.Accounted.for [1] 0.07563493 $Probability.Greater.Upper.Limit [1] 0.05 $Actual.Coverage [1] 0.9
and adding a few extra lines for eta-squareds from a repeated measures ANOVA as below (otherwise the R function gives an error message)
library(MBESS) Lims <- conf.limits.ncf(F.value = 7, conf.level = 0.90, df.1 <- 4, df.2 <- 50) Lower.lim <- Lims$Lower.Limit/(Lims$Lower.Limit + df.1 + df.2 + 1) Upper.lim <- Lims$Upper.Limit/(Lims$Upper.Limit + df.1 + df.2 + 1) Lower.lim Upper.lim
References
Cumming, G. & Finch, S. (2001) A primer on the understanding, use, and calculation of confidence intervals that are based on central and noncentral distributions. Educational and Psychological Measurement, 61, 633-649.