Poisson Regression

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

Poisson Regression

Heather-2
Hi,
I am using SPSS v. 25 and want to run a Poisson Regression. The dependent variable is childhood blood lead level given in integers (0, 1, 2, 3 etc) and independent variables airborne lead deposition, housing age, etc. Will SPSS automatically transform the dependent variable into count data and then run the regression? If so, what prompts should I enter. Thanks, H
=====================
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: Poisson Regression

Andy W
SPSS just drops non-integer values and gives a warning for GENLIN. No need to
even specify variables as integer format, e.g. FORMATS Count (F7.0). Example
below.

*************************************************************.
SET SEED 10.
INPUT PROGRAM.
LOOP Id = 1 TO 1000.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
DATASET NAME Sim.
EXECUTE.

COMPUTE X1 = RV.NORMAL(0,1).
COMPUTE X2 = RV.UNIFORM(1,10).
COMPUTE X3 = RV.BERNOULLI(0.5).
COMPUTE Lambda = EXP(1 + 0.3*X1 + 0.1*X2 - 2*X3).
COMPUTE Y = RV.POISSON(Lambda).
EXECUTE.

* Generalized Linear Models.
GENLIN Y WITH X1 X2 X3
  /MODEL X1 X2 X3 INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG
  /PRINT DESCRIPTIVES SOLUTION.

*Apparently SPSS drops non-fractional values.
IF $casenum < 11 Y = Y + 0.2.
* Generalized Linear Models.
GENLIN Y WITH X1 X2 X3
  /MODEL X1 X2 X3 INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG
  /PRINT DESCRIPTIVES SOLUTION.

*If that happens just either truncate or round values (if they should really
be integer).
COMPUTE Y2 = TRUNC(Y).
GENLIN Y2 WITH X1 X2 X3
  /MODEL X1 X2 X3 INTERCEPT=YES DISTRIBUTION=POISSON LINK=LOG
  /PRINT DESCRIPTIVES SOLUTION.
*************************************************************.



-----
Andy W
[hidden email]
http://andrewpwheeler.wordpress.com/
--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Poisson Regression

Rich Ulrich
In reply to this post by Heather-2
"Blood levels in integers" is /not/  something that can not, even in theory,
be "transformed into count data", either automatically or by hand.

Andy points out that the program will treat the integers as counts. However, it
will also assume that it has the inherent variability of those small counts, 0-3, etc.,
which might be true-enough to get results that aren't obviously wrong - depending
on what the variance actually is.

Your available reason for doing Poisson regression seems to be that "these numbers
look like they might be distributed kind-of-Poisson."  But you haven't (even) stated
that this is true.  For instance -- Are there too many zeroes?

"Blood levels" are frequently corrected by taking logs. The presence of "0" says
that I would consider using an add-on (to avoid taking the log of 0); or I might
want to analyze separately the data in two sets - zero vs other, and log(other).  Of
course, these are just two possibilities. If "experts" can classify the blood levels into
something that looks like equal intervals, I could use arbitrary re-grouping into several
equal-interval scores and do ordinary regression.

Hope this helps.
--
Rich Ulrich



From: SPSSX(r) Discussion <[hidden email]> on behalf of Heather <[hidden email]>
Sent: Wednesday, January 30, 2019 1:35 PM
To: [hidden email]
Subject: Poisson Regression
 
Hi,
I am using SPSS v. 25 and want to run a Poisson Regression. The dependent variable is childhood blood lead level given in integers (0, 1, 2, 3 etc) and independent variables airborne lead deposition, housing age, etc. Will SPSS automatically transform the dependent variable into count data and then run the regression? If so, what prompts should I enter. Thanks, H
=====================
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
===================== 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