Cohensdp: Cohen's standardized mean difference.

View source: R/Cohensdp.R

CohensdpR Documentation

Cohen's standardized mean difference.

Description

Cohensdp() computes the Cohen's d (noted $d_p$) and its confidence interval in either within-subject, between-subject design and single-group design. For the between-subject design, MBESS already has an implementation based on the "pivotal" method but the present method is faster, using the method based on the Lambda prime distribution \insertCitel07CohensdpLibrary. See \insertCiteh81,c22a,c22b,gc18;textualCohensdpLibrary.

Usage

Cohensdp(statistics, design, gamma, method )

Arguments

statistics

a list of pre-computed statistics. The statistics to provide depend on the design: - for "between": m1, m2 the means of the two groups, s1, s2 the standard deviation of the two groups, and n1, n2, the sample sizes of the two groups; - for "within": m1, m2, s1, s2, n, and r or rho the correlation between the measure; - for "single": m, s, n and m0 the reference mean from which m is standardized).

design

the design of the measures ("within", "between", or "single");

gamma

the confidence level of the confidence interval (default 0.95)

method

In "within"-subject design only, choose among methods "piCI", or "adjustedlambdaprime" (default), "alginakeselman2003", "morris2000", and "regressionapproximation".

Details

This function uses the exact method in "single"-group and "between"-subject designs. In "within"-subject design, the default is the adjusted Lambda prime confidence interval ("adjustedlambdaprime") which is based on an approximate method. This method is described in \insertCitec22b;textualCohensdpLibrary. Other methods are available, described in \insertCitem00,ak03,CG057-1,f22;textualCohensdpLibrary

Value

The Cohen's $d_p$ statistic and its confidence interval. The return value is internally a dpObject which can be displayed with print, explain or summary/summarize.

References

\insertAllCited

Examples


# example in which the means are 114 vs. 101 with sds of 14.3 and 12.5 respectively
Cohensdp( statistics = list( m1= 101, m2= 114, s1= 12.5, s2= 14.3, n1= 12, n2= 12 ), 
          design     = "between")

# example in a repeated-measure design
Cohensdp(statistics =list( m1= 101, m2= 114, s1= 12.5, s2= 14.3, n= 12, rho= 0.53 ),
         design     ="within" )

# example with a single-group design where mu is a population parameter
Cohensdp( statistics = list( m = 101, m0 = 114, s = 12.5, n = 10 ), 
          design     = "single")

# The results can be displayed in three modes
res <- Cohensdp( statistics = list( m = 101, m0 = 114, s = 12.5, n = 10), 
                 design     = "single")

# a raw result of the Cohen's d_p and its confidence interval
res              

# a human-readable output
summarize( res ) 

# ... and a human-readable ouptut with additional explanations.
explain( res )   

# example in a repeated-measure design with a different method than piCI
Cohensdp(statistics =list( m1= 101, m2= 114, s1= 12.5, s2= 14.3, n= 12, r= 0.53 ),
         design     ="within", method = "adjustedlambdaprime")



CohensdpLibrary documentation built on Sept. 11, 2024, 7:55 p.m.