Re: [R] logit GLM without intercept

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue, 22 Apr 2008 16:54:02 +0100 (BST)

On Tue, 22 Apr 2008, gorgasal_at_gmx.de wrote:

> Hi Robert,
>
> you can exclude the intercept by including "-1" in the formula:
>
> value <- as.numeric(runif(20)<.4)
> ppm <- rnorm(20)
> glm(value~ppm-1,family=binomial)

Yes, but that is the same as 0 + ppm, which I tend to think is more intuitive.

In so far as I understand the original question (what is 'y'?), either 0+ppm or ppm-1 will predict probability p = 0.5 at ppm = 0.

>
> HTH
> Stephan
>
>
>> 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)
>>
>> 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
>
> --
>
> ______________________________________________
> 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.
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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 Tue 22 Apr 2008 - 16:45:30 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 Tue 22 Apr 2008 - 17:30:31 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