"Gudrun Jonasdottir" <[EMAIL PROTECTED]> writes:

> Dear R-help list members,
> 
> I am currently trying to fit a generalized linear model using a binomial
> with the canonical link. The usual solution is to use the R function glm()
> in the package "stats". However, I run into problem when I want to fit a
> glm without an intercept. It is indicated that the solution is in changing
> the function glm.fit (also in "stats"), by specifying intercept=FALSE. I
> have not been successful in getting any output though.
> 
> Any suggestion on how to fit a glm with no intercept?

Use -1 in the model formula.

  x <- sample(0:1,10,rep=T)
  d <- runif(10)
  summary(glm(x~d-1,family=binomial))

> �N�r inget annat hj�lper, l�s instruktionsboken.�
> - Canns axiom

.. i n�rvarande fall: "An Introduction to R", Ch.11.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - ([EMAIL PROTECTED])             FAX: (+45) 35327907

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to