similar to: spline curves in R

Displaying 20 results from an estimated 30000 matches similar to: "spline curves in R"

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) +
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
2011 Aug 16
0
Cubic splines in package "mgcv"
re: Cubic splines in package "mgcv" I don't have access to Gu (2002) but clearly the function R(x,z) defined on p126 of Simon Wood's book is piecewise quartic, not piecewise cubic. Like Kunio Takezawa (below) I was puzzled by the word "cubic" on p126. As Simon Wood writes, this basis is not actually used by mgcv when specifying bs="cr". Maybe the point is
2008 Oct 10
1
how to evaluate a cubic Bezier curve (B-spline?) given the four control points
I'm trying to use R to determine the quality of a cubic Bezier curve approximation of an elliptical arc. I know the four control points and I want to compute (x,y) coordinates of many points on the curve. I can't find anything in either the base distribution or CRAN that does this; all the spline-related packages seem to be about *fitting* piecewise Bezier curves to a data set.
2013 Nov 01
0
Impose constraint on first order derivative at a point for cubic smoothing spline
Hello,        Dr. Simon Wood told me how to force a cubic spline passing through a point. The code is as following. Anyone  who knows how I can change the code to force the first derivative to be certain value. For example, the first derivative of the constrained cubic spline equals 2 at point (0, 0.6).        I really appreciate your help!        Thanks!                 Best             Victor   
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],
2011 Aug 06
1
How to estimate confidential intervals for the derivatives of cubic smoothing spline
Dear all, I want to use smooth.spline to construct a cubic smoothing spline and its first derivative to my data. However, the predict.smooth.spline does not seem to provide a SE for both the fitted values and their derivatives. How should I calculate it? Thank you very much, Bingzhang
2003 Aug 14
2
Using spline parameters to generate data
# I need to generate some data. I'm modeling some time series that follow a # negative exponential decay (mostly). I have 20 samples that can easily be fit with cubic splines. # What I want to do is generate many thousands of similar samples using the parameters from the splines # For instance one data sample looks not unlike this: foo.curve <- 1 * exp(-0.01 * 1:500) + 0.5
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 Mar 06
1
Constrained cubic smoothing spline
Hello everone,            Anyone who knows how to force a cubic smoothing spline to pass through a particular point?            I found on website  someone said that we can use "cobs package" to force the spline pass through certain points or impose shape           constraints (increasing, decreasing). However,  this package is using  B-spline and can only do linear and quadratic
2007 Feb 06
0
R equivalent to Matlab spline(x,y,xx)
Hello I am currently translating some Matlab code into R and would like to know what people would recommend as the equivalent in R for spline(x,y,xx) in matlab. The latter performs a cubic spline interpolation where x,y are the given data vectors and xx is the new abscissa vector. It allows for the definition of end conditions in y, which is very useful. I tried using spline and splinefun from
2013 Mar 11
1
Use pcls in "mgcv" package to achieve constrained cubic spline
Hello everyone,          Dr. wood told me that I can adapting his example to force cubic spline to pass through certain point.          I still have no idea how to achieve this. Suppose we want to force the cubic spline to pass (1,1), how can I achieve this by adapting the following code? # Penalized example: monotonic penalized regression spline ..... # Generate data from a monotonic truth.
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
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 Dec 08
1
I want to get smoothed splines by using the class gam
Hi all, I try to interpolate a data set in the form: time Erg 0.000000 48.650000 1.500000 56.080000 3.000000 38.330000 4.500000 49.650000 6.000000 61.390000 7.500000 51.250000 9.000000 50.450000 10.500000 55.110000 12.000000 61.120000 18.000000 61.260000 24.000000 62.670000 36.000000 63.670000 48.000000 74.880000 I want to get smoothed splines by using the class gam The first way I tried , was
2006 Jan 03
1
need to know some basic functionality features of R-Proj
Hi, I am new-comer to statistics and R-Project. I would like to know if these features can be attained in R-Project.Please help. 1) beta 1 and Beta 2, or gamma one and gamma two for skewness and kurtosis, respectively, including standard errors and tests for significance (relative to values for a Gaussian distribution). 2) linear correlation 3) quadratic regression 4) polynomial regression
2010 Apr 19
0
Natural cubic splines produced by smooth.Pspline and predict function in the package "pspline"
Hello, I am using R and the smooth.Pspline function in the pspline package to smooth some data by using natural cubic splines. After fitting a sufficiently smooth spline using the following call: (ps=smooth.Pspline(x,y,norder=2,spar=0.8,method=1) [the values of x are age in years from 1 to 100] I tried to check that R in fact had fitted a natural cubic spline by checking that the resulting
2011 Nov 22
0
plotting output from LME with natural cubic spline
I have used LME to fit a mixed effects model on my data. The data has 274 subjects with 1 to 6 observations per subject. Time is not linearly associated with the outcome, so I used ns to fit a natural cubic spline with 3 auto knots. Subject and the natural cubic time of spline are both treated as random effects. This model has run without any problem, but now I would like to plot trajectories for
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
2010 Apr 02
4
Derivative of a smooth function
Dear All, I've been?searching for?appropriate codes to compute the rate of change and the curvature?of ?nonparametric regression model whish was denoted by a smooth function?but?unfortunately?don't manage to?do?it. I presume that such characteristics from a smooth curve can be determined by the first and second derivative operators. The following are the example of fitting a