[R] Running Omega in R

David L Carlson dcarlson at tamu.edu
Mon Jan 16 16:43:38 CET 2017


I get an additional error message when I run your example so perhaps your version is not the current (1.6.12) one? 

Loading required namespace: GPArotation
Failed with error:  ‘there is no package called ‘GPArotation’’
Error in omegah(m = m, nfactors = nfactors, fm = fm, key = key, flip = flip,  : 
  I am sorry, you need to have the  GPArotation package installed

Then I get a great deal of error output followed by the one you list. The first error is 

"Omega_h for 1 factor is not meaningful, just omega_t" (repeated 174 times). I'm copying the package maintainer as this seems like overkill.

Your problem is addressed in the first line of the manual page for omega:

"McDonald has proposed coefficient omega as an estimate of the general factor saturation of a test. One way to find omega is to do a factor analysis of the original data set, rotate the factors obliquely, do a Schmid Leiman transformation, and then find omega. "

You cannot rotate a single factor so you cannot compute omega.

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of peter dalgaard
Sent: Sunday, January 15, 2017 2:27 PM
To: Rui Barradas <ruipbarradas at sapo.pt>
Cc: John Smith <jSmith.Coursera at outlook.com>; r-help at r-project.org
Subject: Re: [R] Running Omega in R


> On 15 Jan 2017, at 20:57 , Rui Barradas <ruipbarradas at sapo.pt> wrote:
> 
> Hello,
> 
> I no nothing about package psych so if you ask whether this is the wrong list you can always try
> 
> maintainer("psych")
> [1] "William Revelle <revelle at northwestern.edu>"

...although publishing a package is not the same as issuing a blank cheque for free support, so you may want to dig a little deeper first. 

I'd check the documentation for whether the data are in the right format. In particular, can "m" be a data frame? If it wants a matrix, you probably need to give it one (m=as.matrix(construct) should do it).

-pd

> 
> Hope this helps,
> 
> Rui Barradas
> 
> Em 15-01-2017 12:32, John Smith escreveu:
>> Hi,
>> 
>> I opened a question on stack overflow I’m hoping this mailing list can help with.
>> I have a dataset below (this is made up but produces the same error I am getting)
>> 
>> structure(list(Q1 = c(4, 5, 3, 5, 4, 5, 3, 5, 5, 5, 6,
>> 3, 5, 4, 6, 5, 5, 6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 3, 6, 4, 6, 6, 6, 3, 5, 7, 5, 6, 4, 6, 7, 6, 7,
>> 4, 6, 3, 5, 7, 5, 4, 6, 6, 4, 6, 5, 5, 5, 5, 7, 7, 7, 6, 6, 6,
>> 5, 6, 6, 4, 5, 7, 6, 7, 3, 5, 6, 5, 6, 5, 5, 7, 7, 6, 6, 2, 7,
>> 6, 6, 7, 7, 5)), .Names = c("Q1", "Q2", "Q3",
>> "Q4"), row.names = c(NA, 100L), class = "data.frame")
>> 
>> 
>> When i run Cronbach Alpha with R i get a result
>> 
>> psych::alpha(construct,
>>          na.rm = TRUE,
>>          title = 'myscale',
>>          n.iter = 1000)
>> 
>> 
>> When i run Omega using R i get the following error message
>> 
>> "Error in fac(r = r, nfactors = nfactors, n.obs = n.obs, rotate = rotate, : I am sorry: missing values (NAs) in the correlation matrix do not allow me to continue.
>> Please drop those variables and try again. In addition: There were 50 or more warnings (use warnings() to see the first 50)"
>> 
>> psych::omega(m = construct,
>>       nfactors = 1, fm = "pa", n.iter = 1000, p = 0.05,
>>       title = "Omega", plot = FALSE, n.obs = 100)
>> 
>> 
>> Stackoverflow Link: http://stackoverflow.com/questions/41533231/running-omega-with-psych-library-in-r?noredirect=1#comment70278453_41533231
>> 
>> If I have the wrong mailing list, could you direct me to the appropriate one (I’m aware it might not be an R issue but more of a stats question)
>> 
>> 
>> 
>> Thank you for your time
>> 
>> 
>> 
>> 	[[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>> 
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


More information about the R-help mailing list