On Fri, 4 Jan 2002, Anne York wrote:
> I am comparing the Splus and R fits of a simple glm.
> In the following, foo is generated from rbinom with size = 20 p = 0.5.
> The coefficients (and SE's0 of the fitted models are the same, but the
> estimated deviances are quite different. Could someone please tell me why
> they are so different? I am using R version 1.3.1 and Splus 2000 release 3
> on windows 2000.
I can't reproduce your S-PLUS results. I get under 3.4 and 6.0:
Coefficients:
Value Std. Error t value
(Intercept) -0.1502822 0.1002824 -1.498589
Null Deviance: 26.47916 on 19 degrees of freedom
Residual Deviance: 26.47916 on 19 degrees of freedom
so are you sure you did the same thing? The coefficients are *not* the
same, BTW (there is a sign change).
>
> ++++++++++++++++++++++
> foo <- c(9, 4, 10, 7, 11, 13, 8, 6, 11, 14, 11,
> 10, 7, 9, 13, 7, 9, 6, 10, 10)
>
> foo.glm <- glm(cbind(foo,20-foo)~1,family=binomial)
>
> In Splus:
>
> summary(foo.glm)
>
> Coefficients:
> Value Std. Error t value
> (Intercept) 0.1502822 0.1002824 1.498589
>
> (Dispersion Parameter for Binomial family taken to be 1 )
>
> Null Deviance: 21.89527 on 19 degrees of freedom
>
> Residual Deviance: 21.89527 on 19 degrees of freedom
>
>
> In R:
>
> summary(foo.glm)
>
> Coefficients:
> Estimate Std. Error z value Pr(>|z|)
> (Intercept) -0.1503 0.1003 -1.499 0.134
>
> (Dispersion parameter for binomial family taken to be 1)
>
> Null deviance: 26.479 on 19 degrees of freedom
> Residual deviance: 26.479 on 19 degrees of freedom
> AIC: 96.44
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Anne E. York
> National Marine Mammal Laboratory
> Seattle WA 98115-0070 USA
> e-mail: anne.york at noaa.gov
> Voice: +1 206-526-4039
> Fax: +1 206-526-6615
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._