extending spss output?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

extending spss output?

Howard Schuman
This is a question for those who may have knowledge of how to extend and
convert SPSS output to a form convenient for a particular type of
analysis. I use the spss logistic regression program to turn age
categories into, say, 10 nominal predictors of a binary dependent
variable (Yes vs. No). I regularly include in the regressions education
(treated as linear) and one or two other variables (e.g., gender) as
controls. The SPSS output consists of the coefficients for each of the
age categories (omitting the reference category), and also for each of
the control variables, and the intercept.

At that point I have regularly been moving the coefficients into Excel
in order by means of several steps to produce the probability of Yes on
the dependent variable for each age category, adjusted to take account
of associations with education and the other controls. Finally, I use
line charts in Excel to show the relations, which are typically expected
to be non-linear. The transfer from SPSS to Excel and the subsequent
steps are tedious and somewhat error-prone, and my research calls for
doing this kind of analysis many times with different dependent
variables and in different data sets.

I wonder if there is some way to automate all or much of the procedure
within SPSS (or possibly within Excel). I'd be glad to have advice from
knowledgeable readers.          -Howard

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: extending spss output?

Bruce Weaver
Administrator
Howard Schuman wrote
This is a question for those who may have knowledge of how to extend and
convert SPSS output to a form convenient for a particular type of
analysis. I use the spss logistic regression program to turn age
categories into, say, 10 nominal predictors of a binary dependent
variable (Yes vs. No). I regularly include in the regressions education
(treated as linear) and one or two other variables (e.g., gender) as
controls. The SPSS output consists of the coefficients for each of the
age categories (omitting the reference category), and also for each of
the control variables, and the intercept.

At that point I have regularly been moving the coefficients into Excel
in order by means of several steps to produce the probability of Yes on
the dependent variable for each age category, adjusted to take account
of associations with education and the other controls. Finally, I use
line charts in Excel to show the relations, which are typically expected
to be non-linear. The transfer from SPSS to Excel and the subsequent
steps are tedious and somewhat error-prone, and my research calls for
doing this kind of analysis many times with different dependent
variables and in different data sets.

I wonder if there is some way to automate all or much of the procedure
within SPSS (or possibly within Excel). I'd be glad to have advice from
knowledgeable readers.          -Howard
If I follow, all you want is the predicted probability (of Yes) for each age group.  There is a VERY easy way to do that without going to Excel etc.  

1. Create a little data set that has all of the predictor variables (with the same names as in the actual data file), plus one FLAG variable that is set equal to 1.  (The FLAG variable will be used later to select these rows so that you can display the predicted probabilities.)  Do NOT include the outcome variable in this file.

2. In that file, make one row for each combination of the predictors for which you want a predicted probability.  

3. Use ADD FILES to add the records from the actual data set.  Those new records will have FLAG = SYSMIS, so recode SYMIS  to 0.  

4. Run your logistic regression model, and have it save the predicted probabilities (one of the options in the Save dialog).  The cases with FLAG=1 will not be used in the model, because they have no outcome variable.  But, predicted probabilities will be saved for all cases in the file that have complete data for the explanatory variables.

5. Use the FLAG variable to select the cases from the file created in step 1, and display the predicted probabilities in a table or chart.

You can also compute predicted odds from the predicted probabilities if you like, or even predicted log-odds.  The latter are sometimes better for graphing, because things that are linear in the model look linear on the graph.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).