[R] compute Mcdonald's omega ω
William Revelle
lists at revelle.net
Mon Jun 11 13:23:57 CEST 2012
Dear codecat,
To track down where the trouble is, try
lapply(my.data,is.numeric)
That will tell you which column of your data is giving you problems.
It is possible that you read the data in from SPSS and did not turn off the use.value.labels switch.
On Jun 11, 2012, at 1:55 AM, codec cat wrote:
> Hi
>
> I keep having this error when I used omega(my.data)
> Error in cor(m, use = "pairwise") : 'x' must be numeric
>
> I'm quite sure my data is numeric as I have tried several methods such as opening csv in notepad and make sure the number is not string, also tried SPSS and make sure the numbers are set to numeric..
>
> can somebody advice me what is wrong.
>
>
>
> Thanks.
>
>
>
>
> On 11 June 2012 04:17, William Revelle <lists at revelle.net> wrote:
> Dear "codecat"
>
> You can get the most recent version of psych from CRAN. The current version is 1.2.4.
>
> Then, the help page for omega should be of use
>
> library(psych)
> ?omega
>
> In addition, try the vignette for the psych package.
>
> Or, as of today, there is a more detailed instruction for newbies on using the psych package and R to find omega
>
> http://personality-project.org/r/tutorials/R_for_omega.pdf
>
> Let me know if any of this helps.
>
> Bill
>
>
> On Jun 10, 2012, at 4:00 PM, codec cat wrote:
>
> > Dear all
> >
> > I am a newbie to R and I would appreciate it very much if someone can
> > give me some advice on this.
> >
> > Please note that I am not a programmer so some of the questions might
> > sound really stupid.
> >
> >
> > I would like to compute McDonald's omega calculation using R, I'm
> > aware I can use the omega function in the psych package.
> >
> > But I'm really not sure how to do it.
> >
> >
> > I have read these two articles that explain about omega-
> >
> >
> > http://personality-project.org/r/html/omega.html and
> > http://personality-project.org/r/r.omega.html
> >
> >
> > But I'm still not sure how to do it.
> >
> >
> > Can someone correct me what I have gone wrong.
> >
> >
> > I'm following the instruction from this site and I have downloaded the
> > psych package- http://personality-project.org/r/
> >
> >
> > *1. Load and read the data*
> >
> >
> > datafilename <- file.choose() # use the OS to find the file
> >
> > person.data <- read.table(datafilename,header=TRUE) #read the data file
> >
> >
> >
> > *2. Use the code examples from http://personality-project.org/r/r.omega.html*
> >
> >
> > Copy and paste the whole code from this website in the R console
> >
> >
> >
> > I know I must have understood Step 2 incorrectly, but I am really not
> > sure what to do with the omega function.
> >
> >
> > Can someone give me more specific help on this please.
> >
> >
> > Thanks.
> >
> > [[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.
> >
>
> William Revelle http://personality-project.org/revelle.html
> Professor http://personality-project.org
> Department of Psychology http://www.wcas.northwestern.edu/psych/
> Northwestern University http://www.northwestern.edu/
> Use R for psychology http://personality-project.org/r
> It is 5 minutes to midnight http://www.thebulletin.org
>
>
>
>
>
William Revelle http://personality-project.org/revelle.html
Professor http://personality-project.org
Department of Psychology http://www.wcas.northwestern.edu/psych/
Northwestern University http://www.northwestern.edu/
Use R for psychology http://personality-project.org/r
It is 5 minutes to midnight http://www.thebulletin.org
More information about the R-help
mailing list