Re: [R] how to predict X given Y using logit regresion in R?

2021-10-02 Thread Luigi Marongiu
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

Re: [R] how to predict X given Y using logit regresion in R?

2021-10-02 Thread Luigi Marongiu
Hello, I also tried with ``` library(MASS) > dose.p(model,p=.95) Dose SE p = 0.95: 1.70912 96.26511 ``` which is closer to the expected 1.72 but with a very large error (I expected 1.10-2.34). Is this regression correct? On Sat, Oct 2, 2021 at 10:14 AM Luigi Marongiu wrote:

Re: [R] how to predict X given Y using logit regresion in R?

2021-10-02 Thread Luigi Marongiu
I tried with: ``` library(chemCal) inverse.predict(model, 0.95) > inverse.predict(model, 0.95) $Prediction [1] 0.4565871 $`Standard Error` [1] 5.525725e-10 $Confidence [1] 1.758532e-09 $`Confidence Limits` [1] 0.4565871 0.4565871 ``` but the value 0.457 does not sound good, it should be about

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

2021-10-02 Thread Luigi Marongiu
Hello, I have set a glm model using probit. I would like to use it to predict X given Y. I have followed this example: ``` f2<-data.frame(age=c(10,20,30),weight=c(100,200,300)) f3<-data.frame(age=c(15,25)) f4<-data.frame(age=18) mod<-lm(weight~age,data=f2) > predict(mod,f3) 1 150 > predict(mod,f4)