Type: | Package |
Title: | Compute Effect Sizes of the Difference |
Version: | 1.0.2 |
Author: | Satoshi Aoki |
Maintainer: | Satoshi Aoki <aokis1ll1@gmail.com> |
Date: | 2020-05-01 |
Description: | Computes various effect sizes of the difference, their variance, and confidence interval. This package treats Cohen's d, Hedges' d, biased/unbiased c (an effect size between a mean and a constant) and e (an effect size between means without assuming the variance equality). |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
NeedsCompilation: | no |
Packaged: | 2020-05-01 06:29:20 UTC; akaka |
Repository: | CRAN |
Date/Publication: | 2020-05-02 06:10:02 UTC |
es.c
Description
Calculates the effect size of the difference, its variance and confidence interval from a dataset and a constant.
Default function returns unbiased c (unbiased=TRUE). When unbiased=FALSE, it returns biased c. One of the sample size needs to be 1 and it is treated as a constant. The confidence interval is given by binary search. Therefore, the confidence interval has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.c(data1,data2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
data1 |
Dataset 1 as a numeric vector. |
data2 |
Dataset 2 as a numeric vector. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd edition. New York: Academic Press.
Examples
data1<-c(1,2,3,4)
data2<-c(3)
es.c(data1,data2)
es.d
Description
Calculates the effect size of the difference, its variance and confidence interval from two datasets (data1 and data2) under the variance equality. Default function returns Hedges' d (unbiased=TRUE). When unbiased=FALSE, it returns Cohen's d. The confidence interval is given by binary search. Therefore, the confidence interval has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.d(data1,data2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
data1 |
Dataset 1 as a numeric vector. |
data2 |
Dataset 2 as a numeric vector. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd edition. New York: Academic Press.
Hedges, L. V. (1981). Distribution theory for Glass's estimator of effect size and related estimators. Journal of Educational Statistics 6, 107–128.
Hedges, L. V. and Olkin I. (1985). Statistical Methods for Meta-analysis. Orlando: Academic Press.
Examples
data1<-c(1,2,3)
data2<-c(2,3,4)
es.d(data1,data2)
es.e
Description
Calculates the effect size of the difference, its variance and confidence interval from two datasets (data1 and data2) without assuming the variance equality.
Default function returns unbiased e (unbiased=TRUE). When unbiased=FALSE, it returns biased e. The variance for small samples may be negative because of the inaccuaracy of the approximation of the degree of freedom. The confidence interval is given by binary search. Therefore, the confidence interval has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.e(data1,data2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
data1 |
Dataset 1 as a numeric vector. |
data2 |
Dataset 2 as a numeric vector. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Examples
data1<-c(1,2,3)
data2<-c(2,3,4)
es.e(data1,data2)
es.para.c
Description
Calculates the effect size of the difference, its variance and confidence interval from statistics of one dataset and a constant. Default function returns unbiased c (unbiased=TRUE). When unbiased=FALSE, it returns biased c. One of the sample size needs to be 1 and it is treated as a constant. The confidence interval is given by binary search. Therefore, the CI has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.para.c(mean1,mean2,var1,var2,n1,n2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
mean1 |
Mean of dataset 1. |
mean2 |
Mean of dataset 2. |
var1 |
Unbiased (divided by n1-1) variance of dataset 1. |
var2 |
Unbiased (divided by n2-1) variance of dataset 2. |
n1 |
Sample size of dataset 1. |
n2 |
Sample size of dataset 2. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd edition. New York: Academic Press.
Examples
es.para.c(2.5,3,5/3,0,4,1)
es.para.d
Description
Calculates the effect size of the difference, its variance and confidence interval from statistics of two datasets under the variance equality. Default function returns Hedges' d (unbiased=TRUE). When unbiased=FALSE, it returns Cohen's d. The confidence interval is given by binary search. Therefore, the confidence interval has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.para.d(mean1,mean2,var1,var2,n1,n2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
mean1 |
Mean of dataset 1. |
mean2 |
Mean of dataset 2. |
var1 |
Unbiased (divided by n1-1) variance of dataset 1. |
var2 |
Unbiased (divided by n2-1) variance of dataset 2. |
n1 |
Sample size of dataset 1. |
n2 |
Sample size of dataset 2. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd edition. New York: Academic Press.
Hedges, L. V. (1981). Distribution theory for Glass's estimator of effect size and related estimators. Journal of Educational Statistics 6, 107–128.
Hedges, L. V. and Olkin I. (1985). Statistical Methods for Meta-analysis. Orlando: Academic Press.
Examples
es.para.d(2,3,1,2,4,3)
es.para.e
Description
Calculates the effect size of the difference, its variance and confidence interval from statistics of two datasets without assuming the variance equality.
Default function returns unbiased e (unbiased=TRUE). When unbiased=FALSE, it returns biased e. The variance for small samples may be negative because of the inaccuaracy of the approximation of the degree of freedom. The confidence interval is given by binary search. Therefore, the confidence interval has rounding error, and alpha with many digits will need very long computation time. In some situations, the confidence interval may be inaccurate, and the warning message appears because of the limitation of the function pt(), which is used for the calculation.
Usage
es.para.e(mean1,mean2,var1,var2,n1,n2,alpha=0.05,unbiased=TRUE,vector_out=FALSE)
Arguments
mean1 |
Mean of dataset 1. |
mean2 |
Mean of dataset 2. |
var1 |
Unbiased (divided by n1-1) variance of dataset 1. |
var2 |
Unbiased (divided by n2-2) variance of dataset 2. |
n1 |
Sample size of dataset 1. |
n2 |
Sample size of dataset 2. |
alpha |
Confidence level, or type I error rate for the confidence interval. The default value gives 95% CI. |
unbiased |
When true (default), the bias corrected value is returned. When false, the value based on the whole population sample is returned. |
vector_out |
Whether output is in vector or not. When in vector, it is c(effect size, the variance, lower CI bound, higher CI bound). |
References
Aoki S. (2020) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. Heliyon 6(1): e03306.
Aoki S., Ito M. & Shimada M. (2019) Effect sizes of the differences between means without assuming the variance equality and between a mean and a constant. arXiv:1901.09581.
Examples
es.para.e(2,3,1,2,4,3)