[R] fitting logit to data

Philipp Pagel p.pagel at wzw.tum.de
Mon Feb 21 17:25:41 CET 2011


On Mon, Feb 21, 2011 at 12:13:09PM +0100, Sylvia Tippmann wrote:
> Hello,
> 
> I'd like to fit a logit function to my data.
> The data is distributed like a logit (like in this plot on wikipedia http://en.wikipedia.org/wiki/File:Logit.png)
> but the values on the x-axis are not between 0 and 1.
> I don't think using a glm is the solution because I simply want to  
> infer the parameters of the logit function
> (offset, compression, slope...), so I can apply it to all my values on  
> x and get my value y.

Two ideas:

1) scale your data so it does fit in [0,1] before fitting a glm

2) Use nls() to fit whatever function you find suitable

cu
	Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
Maximus-von-Imhof-Forum 3
85354 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/



More information about the R-help mailing list