similar to: RFC: spline / splinefun (etc) amalgamation

Displaying 20 results from an estimated 10000 matches similar to: "RFC: spline / splinefun (etc) amalgamation"

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
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
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?
2009 Sep 24
1
basic cubic spline smoothing
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have written in c++, so I would like to match the results with R (for my unit tests) I am following http://www.nabble.com/file/p25569553/SPLINES.PDF SPLINES.PDF where we have a list of points (xi, yi), the yi points are random such that: y_i = f(x_i) +
2011 Feb 05
3
spline interpolation
Hello R-help I have the following data for a standard curve concentration(nM),fluorescence 0,48.34 2,58.69 5,70.83 10,94.73 20,190.8 50,436.0 100, 957.9   (1)Is there function in R to plot a spline. (2)How can I interpolation,say 1000 point from 0nM-100nM and store this as a data frame of concentration,fluorescence (3)How can I modify the code below so that instead of retrieving a concentration
2006 Jun 24
2
smoothing splines and degrees of freedom
Hi, If I set df=2 in my smooth.spline function, is that equivalent to running a linear regression through my data? It appears that df=# of data points gives the interpolating spline and that df = 2 gives the linear regression, but I just want to confirm this. Thank you, Steven
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
2011 Aug 25
3
Application of results from smooth.spline outside R
Hi, I want to use the result from smooth.spline outside R. I take my data ,which is 180 point stored in x and y s <- smooth(x,y) I can know use to e.g. find the interpolated value at e.g. x=500 predict (s,500) My problem is, that i don't know how to implement the predict function. I have looked at literature, but i cannot connect the output of the smooth.spline() to an actual spline
2009 Aug 12
3
Obtaining the value of x at a given value of y in a smooth.spline object
I have some data fit to a smooth.spline object as follows: (x=vector of data for the predictor variable, y=vector of data for the response variable) fit <- smooth.spline(x,y) Now, given a spline fit point y_new, I want to be able to find out what value of x_new yielded this fit value. How to do so? (This problem is the inverse of the predict.smooth.spline function, which takes x_new as input
2012 Dec 01
3
cubic spline
Hallo, I'm facing a problem and I would really appreciate your support. I have to translate some Matalb code in R that I don't know very well but I would like to. I have to interpolate 5 point with a cubic spline function and then I expect my function returns the Y value as output a specific X value inside the evaluation range. Let's suppose that: 1- *X = [-10, -5, 0, 5, 10]* 2
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
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
2005 Jul 07
2
Brewer colours
Anyone who is interested in using optimal colour palettes should look at the work of Cindy Brewer: www.colorbrewer.org I have written code to use her colour schemes in R. It is included below. Perhaps someone may find this interesting enough to work into a package. Included also is a function showpalette, which was posted here a while back. I don't remember who wrote it. I have copied all
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
2004 Mar 03
8
need help with smooth.spline
Dear R listers, When using smooth.spline to interpolate data, results are generally good. However, some cases produce totally unreasonable results. The data are values of pressure, temperature, and salinity from a probe that is lowered into the ocean, and the objective is to interpolate temperature and salinity to specified pressures. While smooth.spline provides excellent values at the
2006 Nov 07
1
multivariate splines
Hi, I am looking for an R package that would calculate multivarite (mostly 2d and 3d, tensor) cubic interpolating splines, so that I could evaluate these splines (and their derivatives) at many points (unkown at the time of calculating the spline polynomials) repeatedly. To make things concrete, I have an array V with dim(V) = k and gridpoint vectors grid=list(...), length(grid[[i]])==k[i],
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
2019 May 08
3
[R] approx with NAs --> new argument 'na.rm=TRUE' ?!
>>>>> Robert Almgren >>>>> on Fri, 3 May 2019 15:45:44 -0400 writes [ __ to R-help __ -- here diverted to R-devel on purpose] > There is something I do not think is right in the approx() > function in base R, with method="constant" and in the > presence of NA values. I have 3.6.0, but the behavior > seems to be the same in
2016 May 01
2
Storage of byte code-compiled functions in sysdata.rda
Hi r-devels, we are seeing a new problem with our packages RobAStRDA (just new on CRAN, thanks to Uwe and Kurt!) and RobExtremes (to be submitted). It must be something recent with the way you internally treat/store byte-code compiled functions, as we have no problems with R-3.1.3, but do see an "Error in fct(x) : byte code version mismatch" with R-devel SVNrev r70532. Background:
2009 Sep 24
0
basic cubic spline smoothing (resending because not sure about pending)
Hello, I come from a non statistics background, but R is available to me, and I needed to test an implementation of smoothing spline that I have written in c++, so I would like to match the results with R (for my unit tests). I am following Smoothing Splines, D.G. Pollock (available online) where we have a list of points (xi, yi), the yi points are random such that: y_i = f(x_i) + e_i