Calculate Cohen's d to accompany a one-sample t-test
Calculate Cohen's d to accompany a one-sample t-test
To run this function, the following package(s) must be installed: Package 'psych' v2.1.9 (or possibly a higher version) by William Revelle (2021), https://cran.r-project.org/package=psych
cohen_d_for_one_sample(x =NULL, mu =NULL)
Arguments
x: a numeric vector containing values whose mean will be calculated
mu: the true mean
Examples
cohen_d_for_one_sample(x =1:10, mu =3)cohen_d_for_one_sample(x = c(1:10,NA,NA), mu =3)