[R] second try; writing user-defined GLM link function

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Apr 17 18:47:57 CEST 2006


Mark Herzog <mherzog at prbo.org> writes:

> I was a little hesitant to post to everyone until I figured out why 
> there is a discrepancy in the intercept estimates when compared to the 
> same model run in SAS vs. R.  Everything else comes out correctly, 
> including the other coefficient estimates... so perhaps it is just the 
> numerical method used.  I think glm in R is using IWLS, and SAS is using ML.
 
(ML is not a numerical method, just the goal of it. IWLS maximizes the
likelihood insofar as it converges.)

> If anyone has another idea feel free to let me know. 

Watch out for the parametrization: In SAS the intercept (in *this*
context!, it is different in other procs...) corresponds to
parastat==1 and patsize==small, and I wager that at least the former
is vice-versa in R, quite possibly both. 


> #                                Standard Wald 95%   Chi-
> #Parameter   DF  Estimate Error        Limits       Square Pr > ChiSq
> ##Intercept   1  2.6973   0.2769   2.1546  3.2399   94.92  <.0001
> #parastat0    1 -1.0350   0.5201  -2.0544  -0.0155  3.96   0.0466
> #parastat1    0  0.0000   0.0000   0.0000  0.0000     .      .
> #patsizelarge 1  1.0844   0.5094   0.0861  2.0827   4.53   0.0333
> #patsizesmall 0  0.0000   0.0000   0.0000  0.0000     .       .
> #Scale        0  1.0000   0.0000   1.0000  1.0000
> #
> #NOTE: The scale parameter was held fixed.


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list