Skip to content
Prev 389378 / 398502 Next

how to predict X given Y using logit regresion in R?

Actually,
I think it worked with chemCal, it was the drawing that was a bit
rough. I sort it with:
```
library(MASS)
lod <- dose.p(model,p=.95)
plot(positivity ~ concentration, data = df, log = "x",
xlab=expression(bold(paste("Concentration (c/", mu, "L)"))),
ylab=expression(bold("Proportion of positivity")))
newdata <- data.frame(concentration=seq(min(df$concentration),
max(df$concentration),by=0.01))
newdata$positivity = predict(model, newdata, type="response")
abline(h=0.95, lty=3)
abline(v=lod, lty=3)
points(positivity ~ concentration, data = newdata, type="l")
text(lod+0.2, 0.87, labels = round(lod, 2), cex = 0.9)
```


Case closed
On Sat, Oct 2, 2021 at 4:33 PM Luigi Marongiu <marongiu.luigi at gmail.com> wrote: