Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Christian Ritz
Hi Mike, the model you consider is a special case of the four-parameter logistic model where the lower and upper asymptotes are fixed at 0.5 and 1, respectively. Therefore, this (dose-response) model can fitted using the R package 'drc': library(drc) xy.m <- drm(y~x, fct = L.4(fixed=c(NA,0.5,

Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Mike Lawrence
Ah, perfect! Thanks so much Ken. In the meantime I played with developing an optim() driven ML search (included below for posterity), but the glm() + mafc approach is faster and apparently yields identical results. # First generate some data # Define a modified logistic functio

Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Ken Knoblauch
Mike Lawrence thatmike.com> writes: > Where f(x) is a logistic function, I have data that follow: > g(x) = f(x)*.5 + .5 > How would you suggest I modify the standard glm(..., family='binomial') > function to fit this? Here's an example of a clearly ill-advised attempt to > simply use the standard

Re: [R] Fitting a modified logistic with glm?

2008-11-09 Thread Rubén Roa-Ureta
Mike Lawrence wrote: On Sat, Nov 8, 2008 at 3:59 PM, Rubén Roa-Ureta <[EMAIL PROTECTED]> wrote: ... The fit is for grouped data. ... As illustrated in my example code, I'm not dealing with data that can be grouped (x is a continuous random variable). Four points: 1) I've showed y

Re: [R] Fitting a modified logistic with glm?

2008-11-08 Thread Mike Lawrence
On Sat, Nov 8, 2008 at 3:59 PM, Rubén Roa-Ureta <[EMAIL PROTECTED]> wrote: > ... > The fit is for grouped data. > ... As illustrated in my example code, I'm not dealing with data that can be grouped (x is a continuous random variable). -- Mike Lawrence Graduate Student Department of Psychology

Re: [R] Fitting a modified logistic with glm?

2008-11-08 Thread Rubén Roa-Ureta
Mike Lawrence wrote: Hi all, Where f(x) is a logistic function, I have data that follow: g(x) = f(x)*.5 + .5 How would you suggest I modify the standard glm(..., family='binomial') function to fit this? Here's an example of a clearly ill-advised attempt to simply use the standard glm(..., famil

[R] Fitting a modified logistic with glm?

2008-11-08 Thread Mike Lawrence
Hi all, Where f(x) is a logistic function, I have data that follow: g(x) = f(x)*.5 + .5 How would you suggest I modify the standard glm(..., family='binomial') function to fit this? Here's an example of a clearly ill-advised attempt to simply use the standard glm(..., family='binomial') approach: