To answer my own question since no one else has responded: a little
investigating shows that proc GENMOD eliminates the sum of the log (x !)
in its
calculation of the log likelihood for Poisson regression.
Brian
Brian S. Cade
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO 80526-8818
email: brian_cade@usgs.gov
tel: 970 226-9326
Brian S Cade <cadeb@usgs.gov>
Sent by: r-help-bounces@stat.math.ethz.ch
03/19/2007 08:06 AM
To
r-help@stat.math.ethz.ch
cc
Subject
[R] likelihoods in SAS GENMOD vs R glm
List: I'm helping a colleague with some Poisson regression modeling. He
uses SAS proc GENMOD and I'm using glm() in R. Note on the SAS and R
output below that our estimates, standard errors, and deviances are
identical but what we get for likelihoods differs considerably. I'm
assuming that these must differ just by some constant but it would be nice
to have some confirmation of this. I think I recall that this might have
been discussed before on this list.
> atrich01.spatial1<- glm(ATRICH ~ X_COORD_CTR + Y_COORD_CTR
,data=bigbend.rich[bigbend.rich$YEAR.==0001,],family=poisson,contrasts=list(OBSERVER="contr.sum",VISIB="contr.sum"))
> summary(atrich01.spatial1)
Call:
glm(formula = ATRICH ~ X_COORD_CTR + Y_COORD_CTR, family = poisson,
data = bigbend.rich[bigbend.rich$YEAR. == 1, ], contrasts =
list(OBSERVER = "contr.sum",
VISIB = "contr.sum"))
Deviance Residuals:
Min 1Q Median 3Q Max
-4.390 -1.921 -0.582 1.574 7.346
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.994802 0.026926 111.225 < 2e-16 ***
X_COORD_CTR -0.111983 0.017115 -6.543 6.02e-11 ***
Y_COORD_CTR 0.000121 0.016283 0.007 0.994
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05
'.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 466.66 on 69 degrees of freedom
Residual deviance: 422.50 on 67 degrees of freedom
AIC: 756.81
Number of Fisher Scoring iterations: 5
> logLik(atrich01.spatial1)
'log Lik.' -375.4041 (df=3)
SAS Output
The GENMOD Procedure
Model Information
Data Set WORK.ONE
Distribution Poisson
Link Function Log
Dependent Variable ATRICH ATRICH
Number of Observations Read 70
Number of Observations Used 70
Criteria For Assessing Goodness
Of Fit
Criterion DF Value
Value/DF
Deviance 67 422.5009
6.3060
Scaled Deviance 67 422.5009
6.3060
Pearson Chi-Square 67 456.6382
6.8155
Scaled Pearson X2 67 456.6382
6.8155
Log Likelihood 2876.1605
LINEAR MODEL
Algorithm converged.
The GENMOD Procedure
Analysis Of Parameter
Estimates
Standard Wald 95%
Confidence Chi-
Parameter DF Estimate Error Limits
Square Pr > ChiSq
Intercept 1 2.9948 0.0269 2.9420 3.0476
12371.0 <.0001
e 1 -0.1120 0.0171 -0.1455
-0.0784 42.81 <.0001
n 1 0.0001 0.0163 -0.0318
0.0320 0.00 0.9941
Scale 0 1.0000 0.0000 1.0000
1.0000
NOTE: The scale parameter was held fixed.
Brian
Brian S. Cade
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO 80526-8818
email: brian_cade@usgs.gov
tel: 970 226-9326
[[alternative HTML version deleted]]
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]