Re: [R] Spline function

2018-08-14 Thread Duncan Murdoch
On 14/08/2018 11:48 AM, Tania Morgado Garcia wrote: Hello everyone. I'm new to R and I'm using spline functions. With the command splinefun (x, y) I get the function of interpolating the values x and y. Later, I can evaluate that function for values of x by obtaining the respective values of

Re: [R] Spline function

2018-08-14 Thread Greg Snow
The uniroot function can be used to find a value in a specified interval, if it exists. On Tue, Aug 14, 2018 at 3:30 PM Tania Morgado Garcia wrote: > > Hello everyone. I'm new to R and I'm using spline functions. With the > command splinefun (x, y) I get the function of interpolating the values

Re: [R] Spline function

2018-08-14 Thread Bert Gunter
If I understand correctly, not in general possible. Suppose for a bunch of different x's the y's are all constant =0. What x would correspond to y = 1. Or suppose (x,y) pairs trace a sine function over several periods. Then there is no unique x corresponding to y = .5, say. Perhaps if you more

[R] Spline function

2018-08-14 Thread Tania Morgado Garcia
Hello everyone. I'm new to R and I'm using spline functions. With the command splinefun (x, y) I get the function of interpolating the values x and y. Later, I can evaluate that function for values of x by obtaining the respective values of y. The point is that I need the inverse operation, with

[R] Spline Function

2011-05-20 Thread Animesh Saxena
I am using R for volatility calibration (Variance Gamma distribution). My question is very basic and not at all related to mathematics! y=spline(KK,CallPrices,,fmm,,,strikes) When calling spline function it returns a list y The list contains some numbers which I have to subtract from