[R] how to interpolate a plot with a logistic curve
Simone Gabbriellini
simone.gabbriellini at gmail.com
Thu Dec 6 12:45:02 CET 2007
Dear Christian,
it works great, and it is simple to understand, thank you very much.
just a detail, is it possible to plot just the fitted curve and not
the data? it's because I would like to have data in black and the
fitted curve in red.. I don't know how to pick up the single parts, if
I simply wrote
> plot(simone.m1, log="", col="red")
everything became red..
thank in advance,
Simone
Il giorno 06/dic/07, alle ore 09:00, Christian Ritz ha scritto:
> Dear Simone,
>
> you can use the package 'drc' to fit a logistic model, that is a non-
> linear regression model based on the equation c+(d-c)/(1+exp(b(x-
> e))), to your data (below named 'simone'):
>
>
> ## Fitting a 4-parameter logistic model (also called Boltzmann model)
> simone.m1 <- drm(size~x, data=simone, fct=B.4())
>
> ## Plotting the data together with the fitted curve
> plot(simone.m1, log="")
>
>
> The fit is not great due to the bend.
>
>
> Christian
>
More information about the R-help
mailing list