Starting with SPSS (1/22/09)

 Return to PSYC 4650 Opening page


Preliminary Scanning of Data

SPSS can be useful in doing some preliminary scanning of NHIS 02 to determine which diagnoses and questions might be useful to study.


Open SPSS on a computer in a university lab. Open SPSS NHIS 02 in the S drive.  S:\COAS\PSYC\LABS\Fernald\NHIS 02 DISK



Select Variable View then adjust and repair variable characteristics, e.g., specify numeric vs. string variables, label names, ordinal, missing values, etc.


Help Screens


Every operation of SPSS has help screens that can assist you. Click on “Help” in the tool bar for instructions and examples.


Missing Values—Set Missing Values Before Analyzing Data


Before doing final analysis of your data, set the missing values properly. This is to tell the program what data values to treat as “missing”  Sometimes  NHIS questions will have alternative  answers  such as “refused to answer,” “not ascertained,” “don’t know”. These types of responses should be excluded from your analysis. Specify the codes for these answers on the Variable view pages. Under column “missing” click on the far right of the cell of the variable you are adjusting, and follow the directions for entering missing values for that item.


Before starting, make sure the variables you are working with area correctly designated as “String” vs. “Numeric” variables--under TYPE


Numeric variable are true numbers (e.g., age, weight, test scores) which can vary along a continuum and can be added, subtracted,  etc.)


String variables are numbers which do not have numeric properties but just stand for names or  categories, like 1==male, 2=female)


Create a file in the H drive for storing info on UNCC computer labs if you haven’t already done so.


Selecting cases for comparison groups


Decide which diagnostic groups you will focus on (e.g., ADHD), based on frequencies and other info from the NHIS 02 Data Set Documentation.


Select a key question for creating groups (E.g., add2—“Has Dr. ever told you your child had ADHD or ADD”?)


Highlight those variables and move them to the top of the list of variables, so they are easy to access.

Data—Select cases

Highlight the appropriate variable (e.g., add2) and move it to the open box by clicking on right arrow.

IF-- complete the if statement, such as “if add2=1”---then “Continue”

“Unselected cases are” –  “Filtered


Return to “data view” screen, and check for approximate number of cases, and any irregularities in case selection procedure.


Then go back and check "If unselected, cases are deleted.”


“Save as”  a new file with clear specific title, including a date and maybe a time

(e.g., ADD2 Gp 92204 230).


Frequency distributions are a good way to get a view the data before it has been broken down or manipulated.


Analyze-- Descriptive--Frequencies

            Dependent variable

            Stats --none


            Format-Compare variable

            Organize by output variable


Comparing several groups—creating more than one group


Often you will want to compare means of two or more groups. First, you need to create the groups you will be comparing.


Creating two groups from one question

Sometimes one item will be useful for creating groups- e.g., (add2—has Dr. ever told you your child has ADHD or ADD?) Group 1- (yes) could be the ADHD group and group 2 (no) could be the control group.


Creating groups from more than one questions

Other times you might want to use different questions for creating your groups e.g. Asthma vs. ADHD. This procedure is a little more complex.


You might want create a new variable e.g. “Diagnosis” where ADD (add2) is one diagnosis and Asthma (cashmev) s the other diagnosis.


Follow these steps to do this


Transform—Recode—Into Different variables—Output Variable—Change--Old and new Values

Add2 becomes Diagnos

Add2: Old 1 becomes new 1 (for Diagnos) Then OK


Cashmev becomes Diagnos   (At start of the next step, Remove any changes that already appear.)

Cashmev: Old1 becomes new 2 (for Diagnos) Then OK


For new variable Diagnos—Change label (“Diagnosis”) and values (“1=ADD/ADHD) 2=Asthma”) on the variable view page.


Return to PSYC 4650 opening page