Skip to content

Inverse Prediction with splines

2 messages · Jeffrey.Morris at sanofipasteur.com, David Winsemius

#
On Jan 20, 2011, at 2:37 PM, <Jeffrey.Morris at sanofipasteur.com> <Jeffrey.Morris at sanofipasteur.com
> wrote:

            
Why not pass the reversed x and y vectors from the spline fit to  
approxfun()?

 > pred.Spl <- predict(Sp.1, data.frame(x=seq(0,8, by=0.01)  ) )

 > approxfun(x=pred.Spl, y=seq(0,8, by=0.01) )(0.75)
[1] 1.447311

Looks plausible, anyway.