Type: | Package |
Title: | Statistical Comparisons of Two or more Alpha Coefficients |
Author: | Birk Diedenhofen [aut, cre] |
Maintainer: | Birk Diedenhofen <mail@birkdiedenhofen.de> |
Depends: | methods |
Suggests: | testthat |
Enhances: | rkward |
Imports: | stats |
Description: | Statistical tests for the comparison between two or more alpha coefficients based on either dependent or independent groups of individuals. A web interface is available at http://comparingcronbachalphas.org. A plugin for the R GUI and IDE RKWard is included. Please install RKWard from https:// rkward.kde.org to use this feature. The respective R package 'rkward' cannot be installed directly from a repository, as it is a part of RKWard. |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
LazyLoad: | yes |
URL: | http://comparingcronbachalphas.org |
Version: | 1.0-1 |
Date: | 2016-03-11 |
RoxygenNote: | 5.0.1 |
NeedsCompilation: | no |
Packaged: | 2016-03-11 14:10:42 UTC; birk |
Repository: | CRAN |
Date/Publication: | 2016-03-12 00:33:28 |
The cocron Package
Description
Statistical Comparisons of Two or more Alpha Coefficients.
Details
Package: | cocron |
Type: | Package |
Version: | 1.0-1 |
Date: | 2016-03-11 |
Depends: | methods |
Enhances: | rkward |
Encoding: | UTF-8 |
License: | GPL (>= 3) |
LazyLoad: | yes |
URL: | http://comparingcronbachalphas.org |
Statistical tests for the comparison between two or more alpha coefficients based on either dependent or independent groups of individuals. A web interface is available at http://comparingcronbachalphas.org. A plugin for the R GUI and IDE RKWard is included. Please install RKWard from https://rkward.kde.org to use this feature. The respective R package 'rkward' cannot be installed directly from a repository, as it is a part of RKWard.
Author(s)
Birk Diedenhofen
Statistical comparisons of n alpha coefficients
Description
Performs a test of significance for the difference between n
alpha coefficients (Cronbach,
1951). The function expects raw data input from which the alpha coefficients are calculated.
Usage
cocron(data, dep = FALSE, standardized = FALSE, los = 0.05,
conf.level = 0.95)
Arguments
data |
A list holding two or more data.frames/matrices with rows and columns corresponding to individuals and items, respectively. From each data.frame/matrix an alpha coefficients is determined. |
dep |
A logical indicating whether the alpha coefficients are based on dependent groups of individuals |
standardized |
A logic indicating whether a standardized Cronbach alpha should be calculated (default is FALSE). |
los |
A number indicating the level of significance (default is |
conf.level |
A number defining the level of confidence for the confidence intervals of the alpha coefficients (default is |
Details
To compare n
dependent or independent alpha coefficients (Cronbach, 1951),
the methods by Feldt, Woodruff,
and Salih (1987) implemented in cocron.n.coefficients are used.
Value
Returns an object of the class "cocron.n.coefficients
" (see cocron.n.coefficients).
References
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334.
Feldt, L. S., Woodruff, D. J., & Salih, F. A. (1987). Statistical inference for coefficient alpha. Applied Psychological Measurement, 11, 93-103.
See Also
cocron.n.coefficients, cocron.two.coefficients
Examples
data("knowledge")
# independent alpha coefficients
cocron(knowledge, dep=FALSE)
# dependent alpha coefficients
cocron(knowledge, dep=TRUE)
Statistical comparisons of n alpha coefficients
Description
Performs a test of significance for the difference between n
alpha coefficients (Cronbach,
1951). The function expects alpha coefficients as input.
Usage
cocron.n.coefficients(alpha, n, items = NULL, dep = FALSE, r = NULL,
los = 0.05, conf.level = 0.95)
Arguments
alpha |
A numeric vector containing the alpha coefficients. |
n |
A numeric vector containing the number of individuals who provided the data for the test for which alpha coefficients were determined. |
items |
A numeric vector containing the number of items the alpha coefficients are based on. |
dep |
A logical indicating whether the alpha coefficients are based on dependent groups of individuals (default is |
r |
A matrix that contains in the upper triangle all correlations between the scores the alpha coefficients are based on (see examples). Only required if the alpha coefficients are computed for dependent groups of individuals ( |
los |
A number indicating the level of significance (default is |
conf.level |
A number defining the level of confidence for the confidence intervals of the alpha coefficients (default is |
Details
To compare n
dependent or independent alpha coefficients (Cronbach, 1951),
the methods by Feldt, Woodruff, and Salih (1987) are implemented.
Value
Returns an object of the class "cocron.n.coefficients
" with the following slots:
alpha |
Input parameter |
n |
Input parameter |
items |
Input parameter |
dep |
Input parameter |
r |
Input parameter |
los |
Input parameter |
conf.level |
Input parameter |
statistic |
The value of the test statistic |
distribution |
The distribution of the test statistic |
df |
The degrees of freedom of the distribution of the test statistic |
p.value |
The p-value of the test |
conf.int |
The confidence intervals of the alpha coefficients |
References
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334.
Feldt, L. S., Woodruff, D. J., & Salih, F. A. (1987). Statistical inference for coefficient alpha. Applied Psychological Measurement, 11, 93-103.
See Also
cocron, cocron.two.coefficients
Examples
# independent alpha coefficients
cocron.n.coefficients(alpha=c(.784,.875,.936), items=c(5,5,5), n=c(51,101,151),
dep=FALSE)
# dependent alpha coefficients
r <- rbind(
c(1,.8,.6,.75),
c(NA,1,.65,.7),
c(NA,NA,1,.55),
c(NA,NA,NA,1)
)
cocron.n.coefficients(alpha=c(.857,.875,.800,.833), items=c(50,40,35,25), n=100,
dep=TRUE, r=r)
Statistical comparisons of two alpha coefficients
Description
Performs a test of significance for the difference between two alpha coefficients (Cronbach, 1951). The function expects alpha coefficients as input.
Usage
cocron.two.coefficients(alpha, n, dep = FALSE, r = NULL, los = 0.05,
alternative = "two.sided")
Arguments
alpha |
A numeric vector containing the two alpha coefficients. |
n |
A numeric vector containing the number of individuals who provided the data for the test for which alpha coefficients were determined. |
dep |
A logical indicating whether alpha coefficients are based on dependent groups of individuals (default is |
r |
A single number specifying the correlation between the scores the alpha coefficients are based on. Only required if the alpha coefficients are computed for dependent groups of individuals ( |
los |
A number indicating the level of significance (default is |
alternative |
A character string specifying the alternative hypothesis; must be " |
Details
For comparing two dependent or independent alpha coefficients (Cronbach, 1951), the methods described in Charter and Feldt (1996) are available, which were originally introduced in Feldt (1969) and Feldt (1980).
Value
Returns an object of the class "cocron.two.coefficients
" with the following slots:
alpha |
Input parameter |
n |
Input parameter |
dep |
Input parameter |
r |
Input parameter |
los |
Input parameter |
alternative |
Input parameter |
statistic |
The value of the test statistic |
distribution |
The distribution of the test statistic |
df |
The degrees of freedom of the distribution of the test statistic |
p.value |
The p-value of the test |
References
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334.
Charter, R. A., & Feldt, L. S. (1996). Testing the equality of two alpha coefficients. Perceptual and Motor Skills, 82, 763-768.
Feldt, L. S. (1969). A test of the hypothesis that Cronbach's alpha or Kuder-Richardson coefficient twenty is the same for two tests. Psychomelrika, 34, 363-373.
Feldt, L. S. (1980). A test of the hypothesis that Cronbach's alpha reliability coefficient is the same for two tests administered to the same sample. Psychometrika, 45, 99-105.
See Also
Examples
# independent alpha coefficients
cocron.two.coefficients(alpha=c(.78,.71), n=c(41,151), dep=FALSE)
# dependent alpha coefficients
cocron.two.coefficients(alpha=c(.82,.89), n=27,dep=TRUE, r=.74)
Cronbach's Alpha
Description
Calculates Cronbach's alpha (Cronbach, 1951), a coefficient of internal consistency. The coefficient typically serves as an estimate of the reliability of a psychometric test.
Usage
cronbach.alpha(x, standardized = FALSE)
Arguments
x |
A numeric data.frame/matrix with rows and columns corresponding to individuals and items, respectively. |
standardized |
A logic indicating whether a standardized Cronbach alpha should be calculated (default is FALSE). |
Details
For a test consisting of k
items that measures a quantity X
,
Cronbach's alpha is defined as
\alpha = \frac{k}{k - 1}\left(1 - \frac{\sum_{i=1}^{k}{\sigma_Y}_i^2}{\sigma_X^2}\right)
with X = Y_1 + Y_2 + ... + Y_k
. {\sigma_Y}_i^2
is the variance of item i
,
and \sigma_X^2
the variance of the total test score for a sample of individuals that completed the test.
The standardized Cronbach's alpha is defined as
\alpha_s = \frac{k\overline{r}}{\left(1 + (k - 1)\overline{r}\right)}
where k
is the number of items and \overline{r}
the mean correlation between the items.
Cases that have missing values on any of the items are excluded.
Value
Returns Cronbach's alpha as a numeric object.
References
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334.
See Also
cocron, cocron.n.coefficients, cocron.two.coefficients
Examples
data("knowledge")
cronbach.alpha(knowledge$test1)
cronbach.alpha(knowledge$test2)
Confidence interval for Cronbach's Alpha
Description
Calculates a confidence interval for Cronbach's alpha (Cronbach, 1951).
Usage
cronbach.alpha.CI(alpha, n, items, conf.level = 0.95)
Arguments
alpha |
A numeric specifying the alpha coefficient. |
n |
A numeric defining the number of individuals who provided the data for the test for which the alpha coefficient was determined. |
items |
A numeric specifying the number of items the alpha coefficient is based on. |
conf.level |
A number defining the level of confidence for the confidence interval (default is |
Details
The lower bound of a confidence interval for an \alpha
that is based on the data of n
individuals who responded to k
items is defined as
L = 1 - \left((1 - \alpha) F(1 - c/2)\right)
where c
is the level of confidence and F(1 - c/2)
the 100(1 - c/2)
percentile of the F-distribution with df_1 = n - 1
and df_2 = (n - 1)(k - 1)
(Feldt,
Woodruff, & Salih, 1987, p. 95, formula 6).
The upper bound of the confidence interval is computed as
U = 1 - \left((1 - \alpha) F(c/2)\right)
(Feldt et al., 1987, p. 95, formula 7).
Value
Returns a confidence interval for Cronbach's alpha as a numeric vector.
References
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16, 297-334.
Feldt, L. S., Woodruff, D. J., & Salih, F. A. (1987). Statistical inference for coefficient alpha. Applied Psychological Measurement, 11, 93-103.
See Also
Examples
cronbach.alpha.CI(alpha=.83, n=100, items=20, conf.level=.95)
Sample dataset: knowledge
Description
Data of 312 testees who completed two tests on general knowledge consisting of 30 questions each.
Usage
data(knowledge)
Format
A list that contains a matrix for each of the two tests holding 312 observations (rows) on the 30 questions (columns) presented. The ones and zeros stand for correct and incorrect responses, respectively.
Examples
data(knowledge)