I am trying to work on this dataset (see below) using Poisson Regression.
According to the textbook (Ramsey, The Statistical Sleuth 2nd ed), the esimates should be: intercept -1.582 age 0.0687 I did get the same result with SAS proc genmod. However, I cannot obtain the same result with General log linear model in SPSS. I specify the ID as factor, age as covariate, and matings as cell structure. In the model I only put in the main effect of age. The result wasn't even close (age actually shows negative estimate). Did I overlook somthing? Any input would be welcome. Thanks for your time. Ken <><><>SYNTAX<><><> DATA LIST LIST /id(F8) age(F8) matings(F8). BEGIN DATA. 1.00 27.00 .00 2.00 28.00 1.00 3.00 28.00 1.00 4.00 28.00 1.00 5.00 28.00 3.00 6.00 29.00 .00 7.00 29.00 .00 8.00 29.00 .00 9.00 29.00 2.00 10.00 29.00 2.00 11.00 29.00 2.00 12.00 30.00 1.00 13.00 32.00 2.00 14.00 33.00 4.00 15.00 33.00 3.00 16.00 33.00 3.00 17.00 33.00 3.00 18.00 33.00 2.00 19.00 34.00 1.00 20.00 34.00 1.00 21.00 34.00 2.00 22.00 34.00 3.00 23.00 36.00 5.00 24.00 36.00 6.00 25.00 37.00 1.00 26.00 37.00 1.00 27.00 37.00 6.00 28.00 38.00 2.00 29.00 39.00 1.00 30.00 41.00 3.00 31.00 42.00 4.00 32.00 43.00 .00 33.00 43.00 2.00 34.00 43.00 3.00 35.00 43.00 4.00 36.00 43.00 9.00 37.00 44.00 3.00 38.00 45.00 5.00 39.00 47.00 7.00 40.00 48.00 2.00 41.00 52.00 9.00 END DATA. EXE . |
Dear Ken,
You can use the syntax below: WEIGHT BY matings . GENLOG id WITH age /MODEL = POISSON /PRINT = ESTIM CORR COV /PLOT = RESID( ADJRESID ) NORMPROB( ADJRESID ) /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5) /DESIGN age . ----- Original Message ----- From: "Ken Chui" <[hidden email]> To: <[hidden email]> Sent: Friday, April 13, 2007 1:29 AM Subject: Poisson log-linear regression >I am trying to work on this dataset (see below) using Poisson Regression. > > According to the textbook (Ramsey, The Statistical Sleuth 2nd ed), the > esimates should be: > > intercept -1.582 > age 0.0687 > > I did get the same result with SAS proc genmod. However, I cannot obtain > the same result with General log linear model in SPSS. > > I specify the ID as factor, age as covariate, and matings as cell > structure. > In the model I only put in the main effect of age. The result wasn't even > close (age actually shows negative estimate). > > Did I overlook somthing? Any input would be welcome. > > Thanks for your time. > > Ken > > <><><>SYNTAX<><><> > > DATA LIST LIST /id(F8) age(F8) matings(F8). > BEGIN DATA. > 1.00 27.00 .00 > 2.00 28.00 1.00 > 3.00 28.00 1.00 > 4.00 28.00 1.00 > 5.00 28.00 3.00 > 6.00 29.00 .00 > 7.00 29.00 .00 > 8.00 29.00 .00 > 9.00 29.00 2.00 > 10.00 29.00 2.00 > 11.00 29.00 2.00 > 12.00 30.00 1.00 > 13.00 32.00 2.00 > 14.00 33.00 4.00 > 15.00 33.00 3.00 > 16.00 33.00 3.00 > 17.00 33.00 3.00 > 18.00 33.00 2.00 > 19.00 34.00 1.00 > 20.00 34.00 1.00 > 21.00 34.00 2.00 > 22.00 34.00 3.00 > 23.00 36.00 5.00 > 24.00 36.00 6.00 > 25.00 37.00 1.00 > 26.00 37.00 1.00 > 27.00 37.00 6.00 > 28.00 38.00 2.00 > 29.00 39.00 1.00 > 30.00 41.00 3.00 > 31.00 42.00 4.00 > 32.00 43.00 .00 > 33.00 43.00 2.00 > 34.00 43.00 3.00 > 35.00 43.00 4.00 > 36.00 43.00 9.00 > 37.00 44.00 3.00 > 38.00 45.00 5.00 > 39.00 47.00 7.00 > 40.00 48.00 2.00 > 41.00 52.00 9.00 > END DATA. > EXE . > |
In reply to this post by Ken Chui
Hi Ken
Since I went a bit "delete-happy" with the messages (I had over 400 stored I hadn't looked at), I don't know if you got a reply to your message dated 12 april. Here it goes mine: DATA LIST FREE /id(F8) age(F8) matings(F8). BEGIN DATA. 1 27 0 2 28 1 3 28 1 4 28 1 5 28 3 6 29 0 7 29 0 8 29 0 9 29 2 10 29 2 11 29 2 12 30 1 13 32 2 14 33 4 15 33 3 16 33 3 17 33 3 18 33 2 19 34 1 20 34 1 21 34 2 22 34 3 23 36 5 24 36 6 25 37 1 26 37 1 27 37 6 28 38 2 29 39 1 30 41 3 31 42 4 32 43 0 33 43 2 34 43 3 35 43 4 36 43 9 37 44 3 38 45 5 39 47 7 40 48 2 41 52 9 END DATA. RECODE matings (0=1E-06) . WEIGHT BY matings . GENLOG id WITH age /MODEL = POISSON /PRINT = ESTIM /PLOT = NONE /DESIGN age . As you can see, you have to give a very low weight to 0 frequencies (replace them by 1E-06) and then weight your dataset by MATINGS. The result GENLOG gives is the same as the textbook. KC> I am trying to work on this dataset (see below) using Poisson Regression. KC> According to the textbook (Ramsey, The Statistical Sleuth 2nd ed), the KC> esimates should be: KC> intercept -1.582 KC> age 0.0687 KC> I did get the same result with SAS proc genmod. However, I cannot obtain KC> the same result with General log linear model in SPSS. KC> I specify the ID as factor, age as covariate, and matings as cell structure. KC> In the model I only put in the main effect of age. The result wasn't even KC> close (age actually shows negative estimate). -- Regards, Dr. Marta García-Granero,PhD mailto:[hidden email] Statistician --- "It is unwise to use a statistical procedure whose use one does not understand. SPSS syntax guide cannot supply this knowledge, and it is certainly no substitute for the basic understanding of statistics and statistical thinking that is essential for the wise choice of methods and the correct interpretation of their results". (Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind) |
Free forum by Nabble | Edit this page |