This macro is designed to set things up for a 'McDonald' omega reliability analysis using the psych toolbox from CRAN, the repository of R packages. It creates a 'csv' data file suitable for use with applications such as JASP and SPSS, and small scripts for use with R and RStudio.


It also caters to users who have an interest in using the TAM package in R with an eye to IRT analyses (item response theory). Read more about this extended capability by jumping to this topic.


Note: it is also possible to get an estimate of omega by using the "Item scores and correlations" option within Lertap, an option that produces the "IStats" report.  These reports will have omega output towards the end.  Examples are found in this working paper.


The procedure mentioned below was followed in the production of this little paper comparing coefficients alpha and omega.


The macro begins by looking in the currently open Excel workbook for an IScores worksheet.  If it can't find one, it then looks for an IStats worksheet and uses it to create an IScores sheet. Note that the workbook should have been saved before the macro is used.


The macro then moves on; it'll create a special 'csv' data file based on the IScores worksheet, and a small text file with several lines of R code designed for use with the psych toolbox. Both of these files will be saved in the same folder the workbook itself is in. If an internet connection is active, the macro will also download an "Rmd" file to be used with RStudio (please refer to this paper).


The csv file will always be called Omega-IScores.csv. Excel will of course open this file, but it may also be opened using a text editor, such as the "Notepad" app found in Windows, or "TextEdit" on a Mac.  JASP and SPSS will open it too.


An example of the csv file as displayed in Excel is shown below:




Note the columns above: "ID code", followed by columns with the item scores for each item -- in this case, the items were labeled "T1" through "T39". (The data come from "Mente", one of the Lertap sample datasets.)


The first column above is actually not wanted and should be deleted before continuing. If it's not deleted, "ID code" will be processed as an item scores field, and the output from the omega routine in the toolbox will be in error.


It is very common for the first column in Lertap data sheets to contain ID information for each record, so care must be taken -- delete the ID column if it exists, then save the workbook again (sometimes it's necessary to ask Excel to save this csv workbook twice, depending on the version of Excel).


As mentioned above, the macro will produce scripts for use with R and RStudio, saving them as small files in the folder where the workbook itself is located.  Use of these scripts is exemplified in the "test drives" found towards the bottom of this document.  They're quick and easy to use -- examples of the output produced by the scripts may be admired here (the link leads to a Word document that will download to your computer).


Related tidbits:


A detailed discussion / description of using R in conjunction with the Omega1 macro is available here.


Refer to this document for a discussion of issues that may arise when creating the Omega-IScores.csv file.


The Rmd file mentioned above is called "Omega-From-IScores.Rmd"; it may be downloaded from here.


The R file, "Omega-IScoresProg.R", is also available for downloading.


Another Rmd file, added in early 2021, makes it possible to get an estimate of McDonald's omega using a closed-form method, much like that used in the latest version of SPSS.  Refer to this working paper.  The file itself is "ClosedFormOmega1.Rmd", available as a download here.  Note that the fact that SPSS uses this method does not imply that it's the preferred way to calculate omega (see the working paper).  


Be sure to have a look at this paper; it exemplifies the use of the omega routine in the Psych toolbox, and has links to sample output. (The next page also displays sample output.)


A general discussion of the use of Lertap's special macros is in this topic.


Help? Write to