[R] Nonlinear logistic regression fitting
Seb@@t|en@B|hore| @end|ng |rom cogn|gencorp@com
Tue Jul 28 18:59:57 CEST 2020
Thanks for your input.
In my analysis, the MM model is not intended to fit continuous data but must be used within a logistic regression model of binary data. So, while useful in itself, the suggested example does not exactly apply.
I appreciate your time
From: Rui Barradas <ruipbarradas using sapo.pt>
Sent: Tuesday, July 28, 2020 12:42
To: Sebastien Bihorel <Sebastien.Bihorel using cognigencorp.com>; r-help using r-project.org <r-help using r-project.org>
Subject: Re: [R] Nonlinear logistic regression fitting
glm might not be the right tool for the MM model but nls is meant to fit
And, after an on-line search, there is also package drc, function drm.
I will use the data and examples in the links below. (The second gave me
right, it uses nls.)
S <- c(0,1,2,5,8,12,30,50)
# reaction rate
v <- c(0,11.1,25.4,44.8,54.5,58.2,72.0,60.1)
kinData <- data.frame(S, v)
#--- package drc fit
# use the two parameter MM model (MM.2)
drm_fit <- drm(v ~ S, data = kinData, fct = MM.2())
#--- nls fit
MMcurve <- formula(v ~ Vmax*S/(Km + S))
nls_fit <- nls(MMcurve, kinData, start = list(Vmax = 50, Km = 2))
SconcRange <- seq(0, 50, 0.1)
nls_Line <- predict(nls_fit, list(S = SconcRange))
plot(drm_fit, log = '', pch = 17, col = "red", main = "Fitted MM curve")
lines(SconcRange, nls_Line, col = "blue", lty = "dotted")
Hope this helps,
�s 15:13 de 28/07/2020, Sebastien Bihorel via R-help escreveu:
> I need to fit a logistic regression model using a saturable Michaelis-Menten function of my predictor x. The likelihood could be expressed as:
> L = intercept + emax * x / (EC50+x)
> Which I guess could be expressed as the following R model
> ~ emax*x/(ec50+x)
> As far as I know (please, correct me if I am wrong), fitting such a model is to not doable with glm, since the function is not linear.
> A Stackoverflow post recommends the bnlr function from the gnlm (https://stackoverflow.com/questions/45362548/nonlinear-logistic-regression-package-in-r)... I would be grateful for any opinion on this package or for any alternative recommendation of package/function.
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Este e-mail foi verificado em termos de v�rus pelo software antiv�rus Avast.
[[alternative HTML version deleted]]
More information about the R-help