[R] GLM fitting

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Fri Jan 28 15:55:53 CET 2005


Vito:

Please plot your data:

y <- c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0)
x <- c(37, 35, 33, 40, 45, 41, 42, 20, 21, 25, 27, 29, 18)
plot(x, y)

You will see that ANY step function between 29 < x < 33 will describe these
observations perfectly.


Charles Annis, P.E.
 
Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Vito Ricci
Sent: Friday, January 28, 2005 5:14 AM
To: r-help at stat.math.ethz.ch
Subject: [R] GLM fitting

DeaR R-useRs,

I'm trying to fit a logist model with these data:

> dati
   y  x
1  1 37
2  1 35
3  1 33
4  1 40
5  1 45
6  1 41
7  1 42
8  0 20
9  0 21
10 0 25
11 0 27
12 0 29
13 0 18

I use glm(), having this output:

> g<-glm(y~x,family=binomial,data=dati)
Warning messages: 
1: Algorithm did not converge in: glm.fit(x = X, y =
Y, weights = weights, start = start, etastart =
etastart,  
2: fitted probabilities numerically 0 or 1 occurred
in: glm.fit(x = X, y = Y, weights = weights, start =
start, etastart = etastart,  
> g

Call:  glm(formula = y ~ x, family = binomial, data =
dati) 

Coefficients:
(Intercept)            x  
    -348.23        11.23  

Degrees of Freedom: 12 Total (i.e. Null);  11 Residual
Null Deviance:      17.94 
Residual Deviance: 7.011e-10    AIC: 4 

I don't understand the meaning of warning. Can anyone
help me? Many thanks.
Cheers,
Vito


=====
Diventare costruttori di soluzioni
Became solutions' constructors

"The business of the statistician is to catalyze 
the scientific learning process."  
George E. P. Box

Top 10 reasons to become a Statistician

     1. Deviation is considered normal
     2. We feel complete and sufficient
     3. We are 'mean' lovers
     4. Statisticians do it discretely and continuously
     5. We are right 95% of the time
     6. We can legally comment on someone's posterior distribution
     7. We may not be normal, but we are transformable
     8. We never have to say we are certain
     9. We are honestly significantly different
    10. No one wants our jobs


Visitate il portale http://www.modugno.it/
e in particolare la sezione su Palese
http://www.modugno.it/archivio/palese/

______________________________________________
R-help at 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




More information about the R-help mailing list