I received the following error when passing a data.frame
with 3 (moderately skewed) numeric vectors and no missing values to psych::alpha()
:
Number of categories should be increased in order to count frequencies.
Looking through ?alpha
documentation, it looks like I should be able to adjust this with the max
argument:
max
: the number of categories/item to consider if reporting category frequencies. Defaults to 10, passed to link{response.frequencies}
This description is unclear to me, but I guessed if I set this to a number exceeding the count of unique values of any column in my data, it should go away...but it doesn't.
Any ideas what is causing this warning? Somehow this appears in several posts on here but not directly addressing the cause of the error. Example data and code to reproduce the issue are below.
library(psych)
# Default argument values
alpha(df)
# Changing max
alpha(df, max = 100)
df <- structure(list(x1 = c(0.560264465798536, 0.933211877385453, 0.979830303833817,
-0.139011930926932, -0.651814621858942, 0.513646039350172, -0.372104063168755,
0.793356598040359, 0.513646039350172, -1.35109101858441, 0.746738171591994,
0.0940802013148908, -0.232248783823662, -0.372104063168755, -1.67742000372296,
-0.232248783823662, 0.793356598040359, 0.280553907108349, 0.839975024488723,
-0.185630357375297, 0.140698627763255, 0.70011974514363, 0.373790760005078,
-0.0457750780302031, 0.933211877385453, -0.791669901204036, 0.513646039350172,
-0.41872248961712, -1.21123573923932, 0.653501318695266, 0.839975024488723,
0.467027612901807, -0.884906754100765, 0.606882892246901, 0.886593450937088,
0.280553907108349, 0.606882892246901, 0.746738171591994, 0.513646039350172,
0.327172333556713, -3.21582807651899, 0.560264465798536, -0.0923935044785677,
0.606882892246901, -0.278867210272026, 0.606882892246901, -0.325485636720391,
0.0474617748665261, -0.511959342513849, -0.278867210272026, 0.746738171591994,
0.979830303833817, -3.26244650296736, -2.60978853269025, 0.327172333556713,
0.839975024488723, -0.0923935044785677, 0.606882892246901, 0.0940802013148908,
0.233935480659984, -0.325485636720391, 0.420409186453442, 0.513646039350172,
-0.139011930926932, -0.185630357375297, -0.41872248961712, 0.187317054211619,
-0.325485636720391, -2.51655167979353, -2.79626223848371, -0.139011930926932,
0.933211877385453, -0.558577768962213, -1.53756472437787, -1.30447259213605,
-0.372104063168755, 0.233935480659984, 0.420409186453442, -2.2834595475517,
0.280553907108349, 0.979830303833817, 0.979830303833817, 0.886593450937088,
0.327172333556713, 0.839975024488723, -1.67742000372296, -0.139011930926932,
0.140698627763255, -1.44432787148114, 0.979830303833817, -0.0457750780302031,
0.000843348418161536, 0.560264465798536, 0.606882892246901, 0.0940802013148908,
0.979830303833817, -1.16461731279095, 0.979830303833817, 0.140698627763255,
-2.93611751782881), x2 = c(0.136902564711936, 0.717047589790198,
0.910429264816285, 0.407636909748458, 0.794400259800633, 0.523665914764111,
0.136902564711936, 0.83307659480585, 0.523665914764111, -0.0951554453193692,
-2.76382256067938, 0.0208735596962833, 0.0595498947015008, 0.368960574743241,
-0.0564791103141517, -0.0951554453193692, 0.717047589790198,
0.407636909748458, 0.83307659480585, -0.0951554453193692, 0.601018584774546,
0.639694919779763, -0.636624135392414, 0.0595498947015008, 0.871752929811068,
-1.4875035055072, 0.407636909748458, 0.175578899717153, -1.02338748544459,
0.0595498947015008, 0.871752929811068, 0.562342249769328, -0.0564791103141517,
0.639694919779763, 0.755723924795415, 0.523665914764111, 0.562342249769328,
0.368960574743241, 0.717047589790198, 0.407636909748458, -2.57044088565329,
0.523665914764111, -0.0564791103141517, 0.755723924795415, -0.0178027753089342,
0.717047589790198, -0.133831780324587, 0.136902564711936, -0.0564791103141517,
-1.99029586057503, 0.67837125478498, 0.910429264816285, -2.53176455064807,
-2.10632486559068, 0.368960574743241, 0.794400259800633, 0.330284239738023,
-0.288537120345457, 0.523665914764111, 0.368960574743241, -0.172508115329804,
0.523665914764111, 0.523665914764111, 0.910429264816285, -0.0564791103141517,
0.446313244753676, 0.523665914764111, 0.0982262297067184, -2.18367753560111,
-2.33838287562198, -0.0564791103141517, 0.83307659480585, -0.327213455350674,
-1.79691418554894, -2.91852790070025, -1.99029586057503, 0.252931569727588,
0.484989579758893, -1.02338748544459, 0.175578899717153, 0.910429264816285,
0.910429264816285, 0.910429264816285, 0.330284239738023, -2.87985156569503,
-1.25544549547589, 0.523665914764111, 0.523665914764111, -1.06206382044981,
0.910429264816285, 0.562342249769328, -0.0951554453193692, -2.87985156569503,
0.717047589790198, 0.0208735596962833, 0.83307659480585, -0.365889790355891,
0.910429264816285, 0.910429264816285, 0.562342249769328), x3 = c(0.376284465894342,
0.74833264743926, 0.93435673821172, -0.367811897195496, 0.794838670132375,
0.469296511280572, 0.0507423070425382, 0.701826624746145, 0.469296511280572,
-1.34443837375091, 0.701826624746145, 0.329778443201227, 0.283272420508112,
-0.50732996527484, -2.08853473684074, -0.367811897195496, 0.84134469282549,
0.469296511280572, 0.887850715518605, -0.0887757610368065, 0.469296511280572,
0.376284465894342, -1.99552269145451, -0.0422697383436916, 0.887850715518605,
-0.693354056047299, 0.283272420508112, -0.274799851809266, -1.15841428297845,
-0.925884169512874, 0.701826624746145, 0.329778443201227, -0.228293829116151,
0.608814579359916, 0.84134469282549, -0.228293829116151, 0.701826624746145,
0.701826624746145, 0.74833264743926, 0.283272420508112, -3.25118530416862,
0.469296511280572, -0.0422697383436916, 0.84134469282549, -0.181787806423036,
0.562308556666801, -0.181787806423036, 0.00423628434942329, 0.236766397814997,
-0.321305874502381, 0.655320602053031, 0.93435673821172, -3.2046792814755,
-2.8791371226237, 0.236766397814997, 0.701826624746145, -0.460823942581726,
0.236766397814997, -0.135281783729921, 0.236766397814997, -0.135281783729921,
0.608814579359916, 0.469296511280572, -1.34443837375091, -0.181787806423036,
-0.135281783729921, 0.329778443201227, 0.0972483297356525, -3.01865519070304,
-2.8791371226237, 0.469296511280572, 0.84134469282549, -1.06540223759222,
-2.22805280492009, -0.832872124126644, 0.143754352428767, -0.135281783729921,
0.422790488587457, -0.925884169512874, 0.562308556666801, 0.887850715518605,
0.93435673821172, 0.93435673821172, 0.283272420508112, 0.794838670132375,
-1.39094439644402, -0.181787806423036, -1.6234745099096, -1.25142632836468,
0.93435673821172, 0.74833264743926, 0.701826624746145, 0.422790488587457,
0.701826624746145, -0.181787806423036, 0.887850715518605, -1.29793235105779,
0.93435673821172, 0.562308556666801, -2.64660700915812)), row.names = c(NA,
-100L), class = c("tbl_df", "tbl", "data.frame"))
The alpha()
function calls "response.frequencies()" (line 82) which calls "responseFrequency()" which counts the number of unique items in your dataframe. Based on the docs I thought you would have 3 categories, but according to this function you actually have 142. This is very unintuitive, but if you set max = 142
you get the "Non missing response frequency for each item" output and you don't get the warning:
library(psych)
df <- structure(list(x1 = c(0.560264465798536, 0.933211877385453, 0.979830303833817,
-0.139011930926932, -0.651814621858942, 0.513646039350172, -0.372104063168755,
0.793356598040359, 0.513646039350172, -1.35109101858441, 0.746738171591994,
0.0940802013148908, -0.232248783823662, -0.372104063168755, -1.67742000372296,
-0.232248783823662, 0.793356598040359, 0.280553907108349, 0.839975024488723,
-0.185630357375297, 0.140698627763255, 0.70011974514363, 0.373790760005078,
-0.0457750780302031, 0.933211877385453, -0.791669901204036, 0.513646039350172,
-0.41872248961712, -1.21123573923932, 0.653501318695266, 0.839975024488723,
0.467027612901807, -0.884906754100765, 0.606882892246901, 0.886593450937088,
0.280553907108349, 0.606882892246901, 0.746738171591994, 0.513646039350172,
0.327172333556713, -3.21582807651899, 0.560264465798536, -0.0923935044785677,
0.606882892246901, -0.278867210272026, 0.606882892246901, -0.325485636720391,
0.0474617748665261, -0.511959342513849, -0.278867210272026, 0.746738171591994,
0.979830303833817, -3.26244650296736, -2.60978853269025, 0.327172333556713,
0.839975024488723, -0.0923935044785677, 0.606882892246901, 0.0940802013148908,
0.233935480659984, -0.325485636720391, 0.420409186453442, 0.513646039350172,
-0.139011930926932, -0.185630357375297, -0.41872248961712, 0.187317054211619,
-0.325485636720391, -2.51655167979353, -2.79626223848371, -0.139011930926932,
0.933211877385453, -0.558577768962213, -1.53756472437787, -1.30447259213605,
-0.372104063168755, 0.233935480659984, 0.420409186453442, -2.2834595475517,
0.280553907108349, 0.979830303833817, 0.979830303833817, 0.886593450937088,
0.327172333556713, 0.839975024488723, -1.67742000372296, -0.139011930926932,
0.140698627763255, -1.44432787148114, 0.979830303833817, -0.0457750780302031,
0.000843348418161536, 0.560264465798536, 0.606882892246901, 0.0940802013148908,
0.979830303833817, -1.16461731279095, 0.979830303833817, 0.140698627763255,
-2.93611751782881), x2 = c(0.136902564711936, 0.717047589790198,
0.910429264816285, 0.407636909748458, 0.794400259800633, 0.523665914764111,
0.136902564711936, 0.83307659480585, 0.523665914764111, -0.0951554453193692,
-2.76382256067938, 0.0208735596962833, 0.0595498947015008, 0.368960574743241,
-0.0564791103141517, -0.0951554453193692, 0.717047589790198,
0.407636909748458, 0.83307659480585, -0.0951554453193692, 0.601018584774546,
0.639694919779763, -0.636624135392414, 0.0595498947015008, 0.871752929811068,
-1.4875035055072, 0.407636909748458, 0.175578899717153, -1.02338748544459,
0.0595498947015008, 0.871752929811068, 0.562342249769328, -0.0564791103141517,
0.639694919779763, 0.755723924795415, 0.523665914764111, 0.562342249769328,
0.368960574743241, 0.717047589790198, 0.407636909748458, -2.57044088565329,
0.523665914764111, -0.0564791103141517, 0.755723924795415, -0.0178027753089342,
0.717047589790198, -0.133831780324587, 0.136902564711936, -0.0564791103141517,
-1.99029586057503, 0.67837125478498, 0.910429264816285, -2.53176455064807,
-2.10632486559068, 0.368960574743241, 0.794400259800633, 0.330284239738023,
-0.288537120345457, 0.523665914764111, 0.368960574743241, -0.172508115329804,
0.523665914764111, 0.523665914764111, 0.910429264816285, -0.0564791103141517,
0.446313244753676, 0.523665914764111, 0.0982262297067184, -2.18367753560111,
-2.33838287562198, -0.0564791103141517, 0.83307659480585, -0.327213455350674,
-1.79691418554894, -2.91852790070025, -1.99029586057503, 0.252931569727588,
0.484989579758893, -1.02338748544459, 0.175578899717153, 0.910429264816285,
0.910429264816285, 0.910429264816285, 0.330284239738023, -2.87985156569503,
-1.25544549547589, 0.523665914764111, 0.523665914764111, -1.06206382044981,
0.910429264816285, 0.562342249769328, -0.0951554453193692, -2.87985156569503,
0.717047589790198, 0.0208735596962833, 0.83307659480585, -0.365889790355891,
0.910429264816285, 0.910429264816285, 0.562342249769328), x3 = c(0.376284465894342,
0.74833264743926, 0.93435673821172, -0.367811897195496, 0.794838670132375,
0.469296511280572, 0.0507423070425382, 0.701826624746145, 0.469296511280572,
-1.34443837375091, 0.701826624746145, 0.329778443201227, 0.283272420508112,
-0.50732996527484, -2.08853473684074, -0.367811897195496, 0.84134469282549,
0.469296511280572, 0.887850715518605, -0.0887757610368065, 0.469296511280572,
0.376284465894342, -1.99552269145451, -0.0422697383436916, 0.887850715518605,
-0.693354056047299, 0.283272420508112, -0.274799851809266, -1.15841428297845,
-0.925884169512874, 0.701826624746145, 0.329778443201227, -0.228293829116151,
0.608814579359916, 0.84134469282549, -0.228293829116151, 0.701826624746145,
0.701826624746145, 0.74833264743926, 0.283272420508112, -3.25118530416862,
0.469296511280572, -0.0422697383436916, 0.84134469282549, -0.181787806423036,
0.562308556666801, -0.181787806423036, 0.00423628434942329, 0.236766397814997,
-0.321305874502381, 0.655320602053031, 0.93435673821172, -3.2046792814755,
-2.8791371226237, 0.236766397814997, 0.701826624746145, -0.460823942581726,
0.236766397814997, -0.135281783729921, 0.236766397814997, -0.135281783729921,
0.608814579359916, 0.469296511280572, -1.34443837375091, -0.181787806423036,
-0.135281783729921, 0.329778443201227, 0.0972483297356525, -3.01865519070304,
-2.8791371226237, 0.469296511280572, 0.84134469282549, -1.06540223759222,
-2.22805280492009, -0.832872124126644, 0.143754352428767, -0.135281783729921,
0.422790488587457, -0.925884169512874, 0.562308556666801, 0.887850715518605,
0.93435673821172, 0.93435673821172, 0.283272420508112, 0.794838670132375,
-1.39094439644402, -0.181787806423036, -1.6234745099096, -1.25142632836468,
0.93435673821172, 0.74833264743926, 0.701826624746145, 0.422790488587457,
0.701826624746145, -0.181787806423036, 0.887850715518605, -1.29793235105779,
0.93435673821172, 0.562308556666801, -2.64660700915812)), row.names = c(NA,
-100L), class = c("tbl_df", "tbl", "data.frame"))
# Default argument values
alpha(df)
#> Number of categories should be increased in order to count frequencies.
#>
#> Reliability analysis
#> Call: alpha(x = df)
#>
#> raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
#> 0.87 0.87 0.86 0.69 6.8 0.023 -0.056 0.91 0.61
#>
#> 95% confidence boundaries
#> lower alpha upper
#> Feldt 0.82 0.87 0.91
#> Duhachek 0.83 0.87 0.92
#>
#> Reliability if an item is dropped:
#> raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
#> x1 0.74 0.74 0.59 0.59 2.8 0.052 NA 0.59
#> x2 0.94 0.94 0.89 0.89 15.5 0.012 NA 0.89
#> x3 0.76 0.76 0.61 0.61 3.1 0.048 NA 0.61
#>
#> Item statistics
#> n raw.r std.r r.cor r.drop mean sd
#> x1 100 0.93 0.93 0.93 0.84 -0.068 1
#> x2 100 0.82 0.82 0.64 0.62 -0.014 1
#> x3 100 0.92 0.92 0.91 0.82 -0.086 1
# Changing max
length(unique(unlist(df)))
#> 142
alpha(df, max=142)
#>
#> Reliability analysis
#> Call: alpha(x = df, max = 142)
#>
#> raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
#> 0.87 0.87 0.86 0.69 6.8 0.023 -0.056 0.91 0.61
#>
#> 95% confidence boundaries
#> lower alpha upper
#> Feldt 0.82 0.87 0.91
#> Duhachek 0.83 0.87 0.92
#>
#> Reliability if an item is dropped:
#> raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
#> x1 0.74 0.74 0.59 0.59 2.8 0.052 NA 0.59
#> x2 0.94 0.94 0.89 0.89 15.5 0.012 NA 0.89
#> x3 0.76 0.76 0.61 0.61 3.1 0.048 NA 0.61
#>
#> Item statistics
#> n raw.r std.r r.cor r.drop mean sd
#> x1 100 0.93 0.93 0.93 0.84 -0.068 1
#> x2 100 0.82 0.82 0.64 0.62 -0.014 1
#> x3 100 0.92 0.92 0.91 0.82 -0.086 1
#>
#> Non missing response frequency for each item
#> -3.26244650296736 -3.25118530416862 -3.21582807651899 -3.2046792814755
#> x1 0.01 0.00 0.01 0.00
#> x2 0.00 0.00 0.00 0.00
#> x3 0.00 0.01 0.00 0.01
#> -3.01865519070304 -2.93611751782881 -2.91852790070025 -2.87985156569503
#> x1 0.00 0.01 0.00 0.00
#> x2 0.00 0.00 0.01 0.02
#> x3 0.01 0.00 0.00 0.00
#> -2.8791371226237 -2.79626223848371 -2.76382256067938 -2.64660700915812
#> x1 0.00 0.01 0.00 0.00
#> x2 0.00 0.00 0.01 0.00
#> x3 0.02 0.00 0.00 0.01
#> -2.60978853269025 -2.57044088565329 -2.53176455064807 -2.51655167979353
#> x1 0.01 0.00 0.00 0.01
#> x2 0.00 0.01 0.01 0.00
#> x3 0.00 0.00 0.00 0.00
#> -2.33838287562198 -2.2834595475517 -2.22805280492009 -2.18367753560111
#> x1 0.00 0.01 0.00 0.00
#> x2 0.01 0.00 0.00 0.01
#> x3 0.00 0.00 0.01 0.00
#> -2.10632486559068 -2.08853473684074 -1.99552269145451 -1.99029586057503
#> x1 0.00 0.00 0.00 0.00
#> x2 0.01 0.00 0.00 0.02
#> x3 0.00 0.01 0.01 0.00
#> -1.79691418554894 -1.67742000372296 -1.6234745099096 -1.53756472437787
#> x1 0.00 0.02 0.00 0.01
#> x2 0.01 0.00 0.00 0.00
#> x3 0.00 0.00 0.01 0.00
#> -1.4875035055072 -1.44432787148114 -1.39094439644402 -1.35109101858441
#> x1 0.00 0.01 0.00 0.01
#> x2 0.01 0.00 0.00 0.00
#> x3 0.00 0.00 0.01 0.00
#> -1.34443837375091 -1.30447259213605 -1.29793235105779 -1.25544549547589
#> x1 0.00 0.01 0.00 0.00
#> x2 0.00 0.00 0.00 0.01
#> x3 0.02 0.00 0.01 0.00
#> -1.25142632836468 -1.21123573923932 -1.16461731279095 -1.15841428297845
#> x1 0.00 0.01 0.01 0.00
#> x2 0.00 0.00 0.00 0.00
#> x3 0.01 0.00 0.00 0.01
#> -1.06540223759222 -1.06206382044981 -1.02338748544459 -0.925884169512874
#> x1 0.00 0.00 0.00 0.00
#> x2 0.00 0.01 0.02 0.00
#> x3 0.01 0.00 0.00 0.02
#> -0.884906754100765 -0.832872124126644 -0.791669901204036 -0.693354056047299
#> x1 0.01 0.00 0.01 0.00
#> x2 0.00 0.00 0.00 0.00
#> x3 0.00 0.01 0.00 0.01
#> -0.651814621858942 -0.636624135392414 -0.558577768962213 -0.511959342513849
#> x1 0.01 0.00 0.01 0.01
#> x2 0.00 0.01 0.00 0.00
#> x3 0.00 0.00 0.00 0.00
#> -0.50732996527484 -0.460823942581726 -0.41872248961712 -0.372104063168755
#> x1 0.00 0.00 0.02 0.03
#> x2 0.00 0.00 0.00 0.00
#> x3 0.01 0.01 0.00 0.00
#> -0.367811897195496 -0.365889790355891 -0.327213455350674 -0.325485636720391
#> x1 0.00 0.00 0.00 0.03
#> x2 0.00 0.01 0.01 0.00
#> x3 0.02 0.00 0.00 0.00
#> -0.321305874502381 -0.288537120345457 -0.278867210272026 -0.274799851809266
#> x1 0.00 0.00 0.02 0.00
#> x2 0.00 0.01 0.00 0.00
#> x3 0.01 0.00 0.00 0.01
#> -0.232248783823662 -0.228293829116151 -0.185630357375297 -0.181787806423036
#> x1 0.02 0.00 0.02 0.00
#> x2 0.00 0.00 0.00 0.00
#> x3 0.00 0.02 0.00 0.05
#> -0.172508115329804 -0.139011930926932 -0.135281783729921 -0.133831780324587
#> x1 0.00 0.04 0.00 0.00
#> x2 0.01 0.00 0.00 0.01
#> x3 0.00 0.00 0.04 0.00
#> -0.0951554453193692 -0.0923935044785677 -0.0887757610368065
#> x1 0.00 0.02 0.00
#> x2 0.04 0.00 0.00
#> x3 0.00 0.00 0.01
#> -0.0564791103141517 -0.0457750780302031 -0.0422697383436916
#> x1 0.00 0.02 0.00
#> x2 0.06 0.00 0.00
#> x3 0.00 0.00 0.02
#> -0.0178027753089342 0.000843348418161536 0.00423628434942329
#> x1 0.00 0.01 0.00
#> x2 0.01 0.00 0.00
#> x3 0.00 0.00 0.01
#> 0.0208735596962833 0.0474617748665261 0.0507423070425382 0.0595498947015008
#> x1 0.00 0.01 0.00 0.00
#> x2 0.02 0.00 0.00 0.03
#> x3 0.00 0.00 0.01 0.00
#> 0.0940802013148908 0.0972483297356525 0.0982262297067184 0.136902564711936
#> x1 0.03 0.00 0.00 0.00
#> x2 0.00 0.00 0.01 0.03
#> x3 0.00 0.01 0.00 0.00
#> 0.140698627763255 0.143754352428767 0.175578899717153 0.187317054211619
#> x1 0.03 0.00 0.00 0.01
#> x2 0.00 0.00 0.02 0.00
#> x3 0.00 0.01 0.00 0.00
#> 0.233935480659984 0.236766397814997 0.252931569727588 0.280553907108349
#> x1 0.02 0.00 0.00 0.03
#> x2 0.00 0.00 0.01 0.00
#> x3 0.00 0.04 0.00 0.00
#> 0.283272420508112 0.327172333556713 0.329778443201227 0.330284239738023
#> x1 0.00 0.03 0.00 0.00
#> x2 0.00 0.00 0.00 0.02
#> x3 0.04 0.00 0.03 0.00
#> 0.368960574743241 0.373790760005078 0.376284465894342 0.407636909748458
#> x1 0.00 0.01 0.00 0.00
#> x2 0.04 0.00 0.00 0.04
#> x3 0.00 0.00 0.02 0.00
#> 0.420409186453442 0.422790488587457 0.446313244753676 0.467027612901807
#> x1 0.02 0.00 0.00 0.01
#> x2 0.00 0.00 0.01 0.00
#> x3 0.00 0.02 0.00 0.00
#> 0.469296511280572 0.484989579758893 0.513646039350172 0.523665914764111
#> x1 0.00 0.00 0.05 0.0
#> x2 0.00 0.01 0.00 0.1
#> x3 0.07 0.00 0.00 0.0
#> 0.560264465798536 0.562308556666801 0.562342249769328 0.601018584774546
#> x1 0.03 0.00 0.00 0.00
#> x2 0.00 0.00 0.04 0.01
#> x3 0.00 0.03 0.00 0.00
#> 0.606882892246901 0.608814579359916 0.639694919779763 0.653501318695266
#> x1 0.06 0.00 0.00 0.01
#> x2 0.00 0.00 0.02 0.00
#> x3 0.00 0.02 0.00 0.00
#> 0.655320602053031 0.67837125478498 0.70011974514363 0.701826624746145
#> x1 0.00 0.00 0.01 0.00
#> x2 0.00 0.01 0.00 0.00
#> x3 0.01 0.00 0.00 0.08
#> 0.717047589790198 0.746738171591994 0.74833264743926 0.755723924795415
#> x1 0.00 0.03 0.00 0.00
#> x2 0.05 0.00 0.00 0.02
#> x3 0.00 0.00 0.03 0.00
#> 0.793356598040359 0.794400259800633 0.794838670132375 0.83307659480585
#> x1 0.02 0.00 0.00 0.00
#> x2 0.00 0.02 0.00 0.04
#> x3 0.00 0.00 0.02 0.00
#> 0.839975024488723 0.84134469282549 0.871752929811068 0.886593450937088
#> x1 0.04 0.00 0.00 0.02
#> x2 0.00 0.00 0.02 0.00
#> x3 0.00 0.04 0.00 0.00
#> 0.887850715518605 0.910429264816285 0.933211877385453 0.93435673821172
#> x1 0.00 0.00 0.03 0.00
#> x2 0.00 0.09 0.00 0.00
#> x3 0.04 0.00 0.00 0.06
#> 0.979830303833817 miss
#> x1 0.07 0
#> x2 0.00 0
#> x3 0.00 0
If you use a smaller set unique values, such as 'survey' data where responses are represented as integers in the [1,5] interval, it is easier to see what the response frequencies section of the output is doing:
# Using 'survey' data
df2 <- data.frame(x1 = sample(1:5, 100, replace = TRUE),
x2 = sample(1:5, 100, replace = TRUE),
x3 = sample(1:5, 100, replace = TRUE))
alpha(df2, max=5)
#> Warning in alpha(df2, max = 5): Some items were negatively correlated with the total scale and probably
#> should be reversed.
#> To do this, run the function again with the 'check.keys=TRUE' option
#> Some items ( x1 ) were negatively correlated with the total scale and
#> probably should be reversed.
#> To do this, run the function again with the 'check.keys=TRUE' option
#>
#> Reliability analysis
#> Call: alpha(x = df2, max = 5)
#>
#> raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
#> 0.026 0.027 0.057 0.0091 0.028 0.17 2.9 0.84 -0.042
#>
#> 95% confidence boundaries
#> lower alpha upper
#> Feldt -0.36 0.03 0.32
#> Duhachek -0.30 0.03 0.36
#>
#> Reliability if an item is dropped:
#> raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
#> x1 0.340 0.341 0.205 0.205 0.52 0.13 NA 0.205
#> x2 -0.087 -0.087 -0.042 -0.042 -0.08 0.22 NA -0.042
#> x3 -0.315 -0.315 -0.136 -0.136 -0.24 0.26 NA -0.136
#>
#> Item statistics
#> n raw.r std.r r.cor r.drop mean sd
#> x1 100 0.47 0.47 -0.38 -0.116 3.0 1.4
#> x2 100 0.63 0.61 0.31 0.048 2.9 1.5
#> x3 100 0.66 0.67 0.49 0.128 2.9 1.4
#>
#> Non missing response frequency for each item
#> 1 2 3 4 5 miss
#> x1 0.21 0.21 0.18 0.21 0.19 0
#> x2 0.23 0.25 0.14 0.17 0.21 0
#> x3 0.21 0.22 0.16 0.25 0.16 0
Created on 2022-08-19 by the reprex package (v2.0.1)