R question

16 views
Skip to first unread message

Oded Rozenberg

unread,
Jul 3, 2014, 8:38:48 AM7/3/14
to israel-r-...@googlegroups.com
I do not understand why I get different results for GLM in WINDOWS and LINUX.  Are there different prams in those operating systems ??  I printed below the summaries of the same data​.  Is there a command in R that gives me all the parameters that the glm function uses ?  Thanks, Oded.

​In Linux:​

​> log2 <- glm(CW ~P1+P2+P3+P4+P5+P6+P7+P8+P9+P10+P11+P12, family=quasibinomial)
Warning message:
glm.fit: algorithm did not converge​


glm(formula = CW ~ P1 + P2 + P3 + P4 + P5 + P6 + P7 + P8 + P9 +
    P10 + P11 + P12, family = quasibinomial)

Deviance Residuals:
     Min        1Q    Median        3Q       Max
-1.31495  -0.07362  -0.00913  -0.00317   0.31917

Coefficients: (8 not defined because of singularities)
             Estimate Std. Error t value Pr(>|t|)
(Intercept)    -13.19      40.62  -0.325   0.7515
P1                 NA         NA      NA       NA
P2             792.00  157999.74   0.005   0.9961
P3                 NA         NA      NA       NA
P4             319.36   41536.58   0.008   0.9940
P5                 NA         NA      NA       NA
P6                 NA         NA      NA       NA
P7                 NA         NA      NA       NA
P8            -928.25  138005.98  -0.007   0.9948
P9            2595.84    1415.53   1.834   0.0939 .
P10                NA         NA      NA       NA
P11                NA         NA      NA       NA
P12                NA         NA      NA       NA
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for quasibinomial family taken to be 0.183363)

    Null deviance: 50.5551  on 15  degrees of freedom
Residual deviance:  3.7161  on 11  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 25
​ 

In Windows , the same script gives :
Deviance Residuals: 
   Min      1Q  Median      3Q     Max  
 0.000   0.000   0.000   1.883  86.552  

Coefficients: (8 not defined because of singularities)
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -4.492e+15  4.523e+14  -9.931 7.92e-07 ***
P1                  NA         NA      NA       NA    
P2          -6.084e+16  1.672e+18  -0.036    0.972    
P3                  NA         NA      NA       NA    
P4           1.037e+16  4.209e+17   0.025    0.981    
P5                  NA         NA      NA       NA    
P6                  NA         NA      NA       NA    
P7                  NA         NA      NA       NA    
P8           7.131e+16  1.508e+18   0.047    0.963    
P9           1.177e+16  1.468e+16   0.802    0.439    
P10                 NA         NA      NA       NA    
P11                 NA         NA      NA       NA    
P12                 NA         NA      NA       NA    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for quasibinomial family taken to be 3.066002e+14)

    Null deviance:    50.555  on 15  degrees of freedom
Residual deviance: 11240.355  on 11  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 20

amit gal

unread,
Jul 3, 2014, 9:01:06 AM7/3/14
to israel-r-...@googlegroups.com
My (educated) guess is that the heart of the problem is the computing process (which is iterative, until convergence). you can see that the number of iterations is different in the two outputs. also, the first model seem to not converge, while this message is absent in the second output (not sure if it is you that dropeed it, or whether it had actually converged). maybe there are some differences in the internal parameters that govern how the algorithm is calculated. or maybe there are some differences in the underlying libraries that perform the actual mathematical computations.




--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-g...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oded Rozenberg

unread,
Jul 3, 2014, 5:15:11 PM7/3/14
to israel-r-...@googlegroups.com
Thanks Amit,
you are right, the second output did not give this worning.  Do you know how I find the internal parameters that govern the glm model ? in order for me to determine which is best for me.  Even though the first model did not converged, it seems that it gave batter results (the second try gives estimations of zero to all the lines in the matrix).

Oded
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages