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, and a little program with suggested lines of R code.

 

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.

 

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.

 

Note of June 2018: the creation of this csv file can be a bit less than straightforward. Refer to this document for comments and assistance.

 

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

 

Omega-IScoresCSV

 

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).

 

A sample of the R code produced by the macro is shown below. This will be saved in a file called Omega-IScoresProg.R (please see the first link below, under "related tidbits", to read more about using R with the files created by the macro).

 

Omega1-Rcode-29Nov17

 

When the code above is run, a plot of factor loadings will be output to a file named "OmegaFactorLoadings.png". A text file will also be created and saved as "OmegaAnalysisOutput.txt. Examples of the output are shown on the next page.

 

Both of these files will be saved in the folder where the Omega-IScores.csv file resides (the full path and name of this folder is seen above, in setwd line -- the Omega1 macro determines this, there's not really a need to "Put the path to your working directory in the line below", but users may of course do that if needed).

 

Another way to get omega results involves the use of the Rmd file downloaded by the macro; take the first "Related tidbits" link below to read more, and use the second link below to get a copy of the file without having to use the macro.  It's possible to have the results formatted as a webpage or a Word document -- read the 'detailed discussion' mentioned in the first link below.

 


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.

 

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 support@lertap.com