Missing Values

Five things you need to know before learning Structural Equation Modeling

March 14th, 2016 by

By Manolo Romero Escobar

If you already know the principles of general linear modeling (GLM) you are on the right path to understand Structural Equation Modeling (SEM).

As you could see from my previous post, SEM offers the flexibility of adding paths between predictors in a way that would take you several GLM models and still leave you with unanswered questions.

It also helps you use latent variables (as you will see in future posts).

GLM is just one of the pieces of the puzzle to fit SEM to your data. You also need to have an understanding of:
(more…)


3 Pieces of SPSS Syntax to Keep Handy

October 23rd, 2009 by

I hope you’re getting started using SPSS Syntax by hitting that Paste button when you use the menus.

But there are a few parts of SPSS you can’t do that with. Specifically, there are syntax commands for doing all the variable definitions that you usually fill out in the “Variable View” window. But there are no Paste buttons there, so you have to know how to write the syntax from scratch.

I find the three variable definitions that I use the most are defining Variable Labels, Value Labels and Missing Data codes. The syntax is simple and logical for all three, so I’m going to just give you the basic code, which you can keep on hand and edit as you need.

For a data set with the variables Gender, Smoke, and Exercise, with the following definitions:

Gender: 0=Male, 1=Female
Smoke: 1=Never 2=Sometimes 3=Daily
Exercise: 1=Never 2=Sometimes 3=Daily

For all three variables, 999 = a user-defined missing value

We could use the following code to give descriptive variable labels, encode the value labels, and define the missing data:

VARIABLE LABELS
GENDER ‘Participant Gender’
SMOKE ‘Does Participant ever Smoke Cigarettes?’
EXERCISE ‘How Often Does Participant Exercise for a30 Minute Period?’.

Notice two things:
1. I could put all three Variable labels in the same Variable Label statement
2. There is a period at the end of the statement. This is required.

VALUE LABELS
GENDER 0 ‘Male’ 1 ‘Female
/SMOKE EXERCISE
1 ‘Never’
2 ‘Sometimes’
3 ‘Daily’.

MISSING VALUES
GENDER SMOKE EXERCISE (999).

Since all three variables have the same missing data code, I could include them all in the same statement.

There are, of course syntax rules for all of these commands, but you can easily look them up in the Command Syntax Manual.

Want to learn more? If you’re just getting started with data analysis in SPSS, or would like a thorough refresher, please join us in our online workshop Introduction to Data Analysis in SPSS.