0% found this document useful (0 votes)
108 views

Computer Lab For Calculating Cronbach's Alpha and Installing Mplus

1. The document provides instructions for a computer lab to calculate Cronbach's alpha in SAS and install the demo version of Mplus. 2. It describes downloading two datasets from a class website, importing one into SAS and running a Cronbach's alpha analysis using the genetictesting.sas program. 3. It also gives steps to install the Mplus demo version and run an exploratory factor analysis on the genetic testing data using the mplusgenetictesting.inp program after converting the data to comma delimited format.

Uploaded by

kunkumabala
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Computer Lab For Calculating Cronbach's Alpha and Installing Mplus

1. The document provides instructions for a computer lab to calculate Cronbach's alpha in SAS and install the demo version of Mplus. 2. It describes downloading two datasets from a class website, importing one into SAS and running a Cronbach's alpha analysis using the genetictesting.sas program. 3. It also gives steps to install the Mplus demo version and run an exploratory factor analysis on the genetic testing data using the mplusgenetictesting.inp program after converting the data to comma delimited format.

Uploaded by

kunkumabala
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

September 18, 2007

Computer Lab for calculating Cronbach’s alpha and Installing Mplus

Goals for today’s lab


1. To run an analysis of Cronbach’s alpha in SAS (or in SPSS if you prefer), which
includes the steps of: downloading data from the web, reading it into SAS, then
running the program.
2. To get Mplus Demo version installed onto your laptop.

Step 0: Create a “pubh7435” folder on the desktop where you can keep work that is done
throughout the semester.

Calculating Cronbach’s alpha

1. Download 2 datasets from the class Data website at


http://www.biostat.umn.edu/~melanie/PH7435/DATA/index.html. Get the
Concerns with genetic testing data “genetictestingrawdata.xls”, and get the “raw
data for USA q29a-q29h” which is also an Excel file. (the .xls extension indicates
it is an Excel file). Also download the “genetictesting.sas” and
“mplusgenetictesting.inp” programs by right-clicking on them and saving to your
folder.

2. Open SAS and import the genetictesting data. To import the dataset
“genetictestingrawdata.xls”, click on the File button then on Import Data… A
wizard pops up asking you what type of file it is, usually by default it is on
“Microsoft Excel”, if so click Next, then it will pop-up a window with a Browse
button which you can use to find the genetictestingrawdata.xls data on your
computer (remember you put it in the pubh7435 folder on your desktop). Find the
file, click on it and say Ok. Then SAS will ask you which table you want to
import (this is because there are actually 3 sheets in the .xls file, but only the first
one has any data on it), so we want Sheet1$. If you click on Options… you’ll see
what SAS is doing by default, make sure that the “Use data in the first row as
SAS variable name” has a checkmark next to it. Then say OK, and Next. The
next panel asks you to “Choose the SAS destination” and the cursor is located in
the “Member” fill-in. In the member slot is where you type in a name for the
dataset you are importing. You should give it a simple name that can be used to
call it from within SAS. I like to call my datasets very simply, e.g. “a”. But you
can call it anything, like “mygenetictestingdata”, you just can’t put blanks in the
name. This will be the name SAS uses to call the data when running procedures.
Once you’ve typed in a name, click Finish. In the log window, if all went well, it
should say “NOTE: WORK.A was successfully created.”
3. Run the “genetictesting.sas” program downloaded from the class data website.
Scroll through the results in the output Window, these are results we have seen in
class. Proc Corr with the alpha option gives us Cronbach’s alpha analysis and
Proc Factor gives us eigenvalues (along with a lot of other output we will examine
later). To run the program in the program Editor click on Run then Submit, or
simply click on the running man icon.

4. If you have time after installing the Demo version of Mplus below, try running
a similar Cronbach’s alpha analysis of the “raw data for USA q29a-q29h” data.

Installing Demo version of Mplus onto the computer

1. Go to www.statmodel.com and click on Mplus Demo Version on the left hand


side. Go about halfway down the page and click on mpdzip.exe and follow the
steps to install it.
2. If you have time, try running an Mplus program to do EFA on the genetic testing
data. MPLUS CANNOT READ EXCEL FILES!!!! It is necessary to put the data
into a comma delimited format in order to read it into Mplus. It is also necessary
to delete the first line of the dataset which contains the variable names. Mplus
can only read in numeric quantities and you must specify the column variable
names in the program itself, not in the dataset. So, open the
“genetictestingrawdata.xls” in Excel, delete the first row and then us Save As…
to save the file as a .csv (Comma Delimited) format.
3. Run the “mplusgenetictesting.inp” program downloaded from the class website.
Open Mplus, read the program in, change the file is line so that it appropriately
references the location of your newly created .csv file. NOTE: Mplus only allows
each line of the program to be 80 characters wide, if the program line is very long,
get rid of spaces, and or use a carriage return to put it on the next line. In the
lower right hand corner of Mplus it says which line and column your cursor is on.
Once you have the program ready, try running it by clicking Run in the menu bar.

You might also like