Re: [R] logit GLM without intercept

From: Michael Dewey <info_at_aghmed.fsnet.co.uk>
Date: Wed, 23 Apr 2008 09:42:54 +0100

At 16:56 21/04/2008, Robert Junker wrote:
>Dear Statisticians,
>
>
>
>I would like to analyse my data with a GLM with binomial error distribution
>and logit link function. The point is that I want a model fitted without
>intercept, i.e. the fitted curve should start at y=0.5 for x=0.
>
>I tried it with the following code:
>
>
>
>glm(value~0+ppm, binomial)

Others have already answered your question but for future reference you might like to
(a) do ?predict.glm which will tell you how to get predictions for any values of your predictors (this may be useful in more complex situations) (b) consider grouping the data as you have repeated values of your x variable and using the cbind(successes,failures) format for y, see ?glm

Of course you also need to ask how you _know_ that the response is 0.5 but we will take your word for that.

>
>
>Does this code yield the correct model or is there another possibility? I’d
>appreciate it very much if you could help me out with this. I attached some
>example data.
>
>
>
>
>
>Thanks & all the best
>
> Robert
>
>
>
>
>
>
>
>
>
>
>
>--------------------
>Robert Junker
>Department of Animal Ecology & Tropical Biology
>University of Würzburg Biozentrum, Am Hubland
>97074 Würzburg, Germany
>
>
>
>
>
>

Michael Dewey
http://www.aghmed.fsnet.co.uk



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 23 Apr 2008 - 08:54:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Apr 2008 - 09:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive