Hello,
I have a series of x/y and a model. I can interpolate a new value of x
using this model, but I get funny results if I give the y and look for
the correspondent x:
```
> x = 1:10
> y = 2*x+15
> model <- lm(y~x)
> predict(model, data.frame(x=7.5))
1
30
> predict(model, data.frame(y=26))
1 2
model2 <- lm( x~y )
predict(model2, data.frame(y=26))
model2 is however not the inverse of model... if you need that then you need to
handle that some other way than using predict, such as an invertible monotonic
spline (or in this case a little algebra).
On January 26, 2021 1:11:39 AM PST, Lui
I see, so predict is mono-directional: only gives x with a know y but
not the other way round. Thank you
On Tue, Jan 26, 2021 at 10:20 AM Jeff Newmiller
wrote:
>
> model2 <- lm( x~y )
> predict(model2, data.frame(y=26))
>
> model2 is however not the inverse of model... if you need that then you n
Hello,
You can predict y on x, not the other way around, like you are doing in
the second call to predict.lm.
The 10 values you are getting are the predicted values on the original x
values, just see that x=7.5 gives ypred=30, right in the middle of x=7
and x=8 -> ypred=29 and ypred=31.
As
> Marcel Baumgartner
> on Tue, 26 Jan 2021 08:55:48 +0100 writes:
> Dear all, my colleague posted our issue on stackoverflow:
> Calling R script from Python does not save log file in
> version 4 - Stack Overflow
>
[https://stackoverflow.com/questions/65887485/calling
A couple of Window solutions
https://community.rstudio.com/t/problems-with-r-4-0-0-windows-error-package-or-namespace-load-failed-for-stats-in-indl-x-as-logical-local-as-logical-now/62958
https://github.com/rdotnet/rdotnet/issues/62
No idea if they are of any use.
On Mon, 25 Jan 2021 at 19:43, J
Hello all,
I'm a long time R user, but recently also using Python. I noticed that
RStudio rolled out Python through reticulate. It's great so far!
My question is, how do you debug in Python?
In R, I simply step through the code script in my console with cmd+enter.
But you can't do that with Pyth
7 matches
Mail list logo