Johannes Moser
2014-Feb-14 22:24 UTC
[R] psych package - Cronbach`s Alpha - warning message
Dear R-help, I try to estimate alpha for a factor that loads onto two items, using the psych-package (newest version). The data is from the boston housing data set. The problem I face can be reproduced by the following approximation of the correlation matrix: library("psych") tt <- cbind(c(1,0.58) , c(0.58,1)) colnames(tt) = rownames(tt) = list("V1" , "V2") alpha(tt) R Version 3.0.2 (2013-09-25) 64 Bit - Platform: Windows 7 Professional, 64 bit I have tried on two different Windows computers - same warning messages: In matrix(unlist(drop.item), ncol = 6, byrow = TRUE) : data length [10] is not a sub-multiple or multiple of the number of columns [6] What is the reason for the warning? Is it to be taken seriously? How can I avoid this warning? I would be very thankful for any ideas or advice! Thank you a lot in advance!!! [[alternative HTML version deleted]]
Many of the statistics reported don't make sense with only two items--for example the alpha if an item is dropped makes no sense because dropping an item leaves only one remaining. Best, Ista On Fri, Feb 14, 2014 at 5:24 PM, Johannes Moser <joh.mo at web.de> wrote:> Dear R-help, > > I try to estimate alpha for a factor that loads onto two items, using > the psych-package (newest version). > The data is from the boston housing data set. > > The problem I face can be reproduced by the following approximation of > the correlation matrix: > > library("psych") > tt <- cbind(c(1,0.58) , c(0.58,1)) > colnames(tt) = rownames(tt) = list("V1" , "V2") > alpha(tt) > > > R Version 3.0.2 (2013-09-25) 64 Bit - Platform: Windows 7 > Professional, 64 bit > I have tried on two different Windows computers - same warning messages: > > In matrix(unlist(drop.item), ncol = 6, byrow = TRUE) : data length [10] > is not a sub-multiple or multiple of the number of columns [6] > > What is the reason for the warning? > Is it to be taken seriously? > How can I avoid this warning? > > I would be very thankful for any ideas or advice! > Thank you a lot in advance!!! > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
JLucke at ria.buffalo.edu
2014-Feb-17 15:05 UTC
[R] psych package - Cronbach`s Alpha - warning message
I too don't understand the error message. However Coefficient Alpha is easily calculated. To wit: library("psych") tt <- cbind(c(1,0.58) , c(0.58,1)) colnames(tt) = rownames(tt) = list("V1" , "V2") p <- nrow(tt) alpha <- p/(p-1) * (1-sum(diag(tt))/sum(tt)) Numerous caveats regarding using C-Alpha apply. And because you have the factor loading you have the reliability of the factor. You don't need C-Alpha. Johannes Moser <joh.mo@web.de> Sent by: r-help-bounces@r-project.org 02/14/2014 05:24 PM To r-help@r-project.org, cc Subject [R] psych package - Cronbach`s Alpha - warning message Dear R-help, I try to estimate alpha for a factor that loads onto two items, using the psych-package (newest version). The data is from the boston housing data set. The problem I face can be reproduced by the following approximation of the correlation matrix: library("psych") tt <- cbind(c(1,0.58) , c(0.58,1)) colnames(tt) = rownames(tt) = list("V1" , "V2") alpha(tt) R Version 3.0.2 (2013-09-25) 64 Bit - Platform: Windows 7 Professional, 64 bit I have tried on two different Windows computers - same warning messages: In matrix(unlist(drop.item), ncol = 6, byrow = TRUE) : data length [10] is not a sub-multiple or multiple of the number of columns [6] What is the reason for the warning? Is it to be taken seriously? How can I avoid this warning? I would be very thankful for any ideas or advice! Thank you a lot in advance!!! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]