|
|
|
||||
|
|
|||||
Note: The examples on this page were done in SPSS 15. If you are using an earlier version of SPSS, you may need to use the genlog command.
Example 1. School administrators study the attendance behavior of high school juniors at two schools. Predictors of the number of days of absence include gender of the student and standardized test scores in math and language arts.
We have attendance data on 316 high school juniors from two urban high schools in the file poissonreg.sav . The response variable of interest is days absent, daysabs. The variables math and langarts give the standardized test scores for math and language arts respectively. The variable male is a binary indicator of student gender.
Let's look at the data.
GET FILE='D:\work\data\spss\poissonreg.sav'.
DESCRIPTIVES VARIABLES=male math langarts daysabs /STATISTICS=MEAN STDDEV VAR MIN MAX .

GRAPH /HISTOGRAM=daysabs .

FREQUENCIES VARIABLES=male.

GENLIN daysabs WITH male langarts math /MODEL male langarts math INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG.



Next comes the Tests of Model Effects. This section looks the same as the section of Parameter Estimates. This is because that we have entered all the variables as continuous variables. So each one of them has just one degree of freedom. With models where there are categorical predictor variables, this section will give the over effects of categorical variables and continuous variables as well.
The Parameter Estimates follows. You will find the Poisson regression coefficients for each of the variables along with standard errors, z-scores, p-values and 95% confidence intervals for the coefficients.
Now, just to be on the safe side, let's rerun the poisson command with the covb = robust option in order to obtain robust standard errors for the Poisson regression coefficients.
GENLIN daysabs WITH male langarts math /MODEL male langarts math INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=ROBUST.

Since math is not significant in the model with robust standard errors, we will rerun the model dropping that variable.
GENLIN daysabs WITH male langarts /MODEL male langarts INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=ROBUST.


Finally, we will use the emmean option to get the predicted value in days absent for male and female. In order to use the emmean option, we will have to specify variable male to be a categorical variable. The model specified this way is the same as the one above since male is a binary variable, except the reference group for male is now switched to male = 1. That is why the sign for the parameter coefficients are reversed.
GENLIN daysabs BY male WITH langarts /MODEL male langarts INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=ROBUST /EMMEANS TABLES=male SCALE=ORIGINAL.

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services