similar to: problems with splinefun()

Displaying 20 results from an estimated 10000 matches similar to: "problems with splinefun()"

2006 Mar 17
1
Derivative of a splinefun function.
Is there a way of calculating the derivative of a function returned by splinefun()? Such a function is a cubic spline, whence it has a calculable derivative, but is there a (simple) way of getting at it? One workaround that I have thought of is to take a fine grid of points, evaluate the function returned by splinefun() at these points, put an interpolating spline through these points using
1998 May 25
2
RFC: spline / splinefun (etc) amalgamation
At present R has separate functions "spline" and "splinefun". The first of these carries out spline interpolation of a data set and returns the interpolated values; the second returns the interpolating function itself (approx and approxfun are similar). I would like to combine these into a single function "spline" with an (optional) argument which determines which
2010 Feb 15
1
Non-monotonic spline using splinefun(method = "monoH.FC")
Hi, In my version of R, the stats package splinefun code for fitting a Fritsch and Carlson monotonic spline does not appear to guarantee a monotonic result. If two adjoining sections both have over/undershoot the way the resulting adjustment of alpha and beta is performed can give modified values which still do not satisfy the required constraints. I do not think this is due to finite precision
2006 Feb 10
1
3-d splinefun
hello, is it possible to do something like splinefun(x,y), but with a 3rd dim? for example, if i have a 2-dim system like: x<-1:100 y<-rexp(100,1) func<-splinefun(x,sort(y)) func(n) # returns interpolated value of y (after sorting) given x=n # i can check this by: plot(x,sort(y)) lines(spline(x,sort(y))) Can i do the same thing with an x,y, and z? i have found the akima
2010 Mar 12
1
Usage of apply function with two matrices
Hello, I am struggling to overcome following problem: I have matrix Vf and matrix V, which both have 3 columns and I want to create a spline function basing on coordinates from this matrices (more precisely coordinates of function nr 1: x are taken from Vf[,1] and y are taken from V[,1] respectively), because function apply() base on 1 argument I made it in this way:
2008 Oct 06
1
splinefun gives incorrect derivs when extrapolating to the left (PR#13132)
This is a low priority bug that has been around for a while, but I came acr= oss it again while alpha testing 2.8. The resulting function for splinefun gives incorrect deriv values when x is= less than the smallest x-value used to create the function (at least in on= e circumstance), but does the correct thing for x greater than the largest = x-value. Here is an example: > x <- 1:10 >
2008 Oct 07
0
splinefun gives incorrect derivs when extrapolating to the (PR#13138)
--MP_/Rxf/JAvsQx5JLkhZFc9Jmn4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline G'day Greg, On Mon, 6 Oct 2008 19:50:13 +0200 (CEST) Greg.Snow at imail.org wrote: > This is a low priority bug that has been around for a while, but I > came across it again while alpha testing 2.8. Indeed, that bug must have been around since
2008 Oct 07
0
splinefun gives incorrect derivs when extrapolating to the (PR#13139)
--MP_/kvy20nVajVG/n.8m=_ZjLAX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, 7 Oct 2008 19:31:03 +0800 Berwin A Turlach <berwin at maths.uwa.edu.au> wrote: > The attached patch (against the current SVN version of R) implements > the latter strategy. With this patch applied, "make check > FORCE=FORCE" passes
2000 Sep 04
2
bug in spline()? (PR#653)
BUG IN SPLINE()? Version R-1.0.1, system i486,linux If the spline(x,y,method="natural") function is given values outside the range of the data, it does not give a warning. Moreover, the extrapolated value reported is not the ordinate of the natural spline defined by (x,y). Example. Let x <- c(2,5,8,10) and y <- c(1.2266,-1.7606,-0.5051,1.0390). Then interpolate/extrapolate with
2010 Feb 18
0
Error in coding for splinefun(method = "monoH.FC") (PR#14215)
Full_Name: Tim Heaton Version: 2.8.1 OS: linux-gnu Submission from: (NULL) (143.167.4.162) Hi, In my version of R, the stats package splinefun code for fitting a Fritsch and Carlson monotonic spline does not guarantee a monotonic result. If two adjoining sections both have over/undershoot the way the resulting adjustment of alpha and beta is performed can give modified values which still do
2002 Sep 09
1
Monotonic interpolation
Has anyone got a function for smooth monotonic interpolation of a univariate function? I'm after something like the NAG function PCHIM which does monotonic Hermite interpolation. Alternatively, montononic cubic spline interpolation. Please reply directly. Rob Hyndman ___________________________________________________ Rob J Hyndman Associate Professor & Director of Consulting
2009 Mar 31
2
How to generate natural cubic spline in R?
Suppose I have two var x and y,now I want to fits a natural cubic spline in x to y,at the same time create new var containing the smoothed values of y. How can I get it?
2013 Jul 24
1
Alpha channel in colorRamp() and colorRampPalette()
Hi all, I had the need to create a colorbar considering the alpha channel of the colors, but colorRamp() and colorRampPalette() ignored the alpha argument in rgb(). So I performed some minor modifs. in their codes, as to support the interpolation using the alpha channel. I guess that those simple modifications might be useful for other people, so perhaps it would be worth to add them to
2011 May 27
1
finding derivative of a data series in R
Dear All, I tried following for getting derivative of a polynomial in R i<- -10:10 x<-i*i*i+3*i*i+2 fun_spline<-splinefun(i,x) plot(x,type="l") lines(x,fx_spline(x, deriv=1), col='green') lines(x,fx_spline(x, deriv=2), col='green') Now when I plot 3*i*i + 6*i and 6*i + 6 the plot was not same for first deivative. where as the 2nd derivative was same Is this a
2017 Aug 26
0
Find maxima of a function
> On 26 Aug 2017, at 16:39, niharika singhal <niharikasinghal1990 at gmail.com> wrote: > > Hi, > > Thanks for your mail, and time > > It is not working for some arguments, when mean value is like >6. > > > case > > mc0 <- c(0.08844446,0.1744455,0.1379778,0.1209769,0.1573065,0. > 1134463,0.2074027) > > rv
2005 Jan 11
1
Standard error for the area under a smoothed ROC curve?
Hello, I am making some use of ROC curve analysis. I find much help on the mailing list, and I have used the Area Under the Curve (AUC) functions from the ROC function in the bioconductor project... http://www.bioconductor.org/repository/release1.5/package/Source/ ROC_1.0.13.tar.gz However, I read here... http://www.medcalc.be/manual/mpage06-13b.php "The 95% confidence interval for
2007 Oct 05
2
Splines
I want to fit a cubic spline of x on y. where : x [1] 467 468 460 460 450 432 419 420 423 423 y [1] 1 2 3 4 5 6 7 8 9 10 using the syntax spline(y, x) I got following output : $x [1] 1.000000 1.310345 1.620690 1.931034 2.241379 2.551724 2.862069 [8] 3.172414 3.482759 3.793103 4.103448 4.413793 4.724138 5.034483 [15] 5.344828 5.655172
2005 Jul 24
1
Buglet in src/appl/splines.c (PR#8030)
--AZaLVt6Pw+ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Dear all, I was looking at "splinefun" and the underlying C code and believe that there is a memory access error in the C routine "spline_eval". Specifically, on line 368 and following the following code appears: if(ul < x[i] || x[i+1] < ul)
2010 Mar 06
1
Possible to use array of spline functions for storing data?
Dear listeRs; I am hoping to provide myself the ability to interpolate mortality estimates within intervals for a range of conditions and ages. I have four mortality tables derived from the Society of Actuaries 2001 VBT tables that contains interval mortality rates by starting age and year of duration. I would like to flexibly interpolate using a large set (~4MM) of ages and conditions
2012 Feb 17
1
time series manipulation what functions are "best"
Newbie question - mechanical engineer trying to learn R I've had success with plotting time series data and even made a heat map using R Graphs Cookbook by Mittal. I have a new problem - I need to align a number of time series data "columns" to the desired regular exact time stamp vector. The target time vector could be finer or more course than the typical time stamp spacing found.