[R] Fitting a modified logistic with glm?

Christian Ritz ritz at life.ku.dk
Sun Nov 9 18:03:04 CET 2008


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, 1, NA)), type = "binomial")

plot(x,y)
lines(x[x.ord], fitted(fit)[x.ord], col = "red", lwd = 3)  # psyphy fit

plot(xy.m, add = TRUE, log = "", col = 3, type = "fit", lwd = 3)




Christian



More information about the R-help mailing list