similar to: Taking the derivative of a quadratic B-spline

Displaying 20 results from an estimated 7000 matches similar to: "Taking the derivative of a quadratic B-spline"

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
2004 Jul 12
3
Smooth monotone estimation on R
Hi all, I'm looking for smooth monotone estimation packages, preferably using splines. I downloaded the 'cobs' package and intend to use it, but since it offers only quadratic splines based on L1 minimization, I'd like to compare its performance to that of a more 'mainstream' cubic-spline, L2-norm minimizing spline. Preferably a smoothing spline. Does anyone know of such
2012 Feb 24
1
evaluating derivative matrices of spline functions
Hello, I've noticed that SPLUS has a function for evaluating the derivative matrices of splines. I've also noticed that there's a function in R for evaluating matrices from smooth.spline; maybe someone knows if something has been written to evaluate matrices from 'smooth.basis'? regards, s
2010 Jul 06
2
numerical derivative R help
I fit my CDF to sum of exponentials and now I want to take the numerical derivative of this function to obtain probability density.I will really appreciate your help reagrding the error messages I am getting which I don't understand. * * > fitterma <- function(xtime) { a <- -0.09144115 b <- -0.01335756 c <- -2.368057 d <- -0.00600052
2006 Nov 04
1
Error when using cobs library
Dear R-Users, I have problems with the cobs library. When doing the cobs example, I get the folling error message: example(cobs) cobs> x <- seq(-1, 3, , 150) cobs> y <- (f.true <- pnorm(2 * x)) + rnorm(150)/10 cobs> con <- rbind(c(1, min(x), 0), c(-1, max(x), 1), c(0, 0, 0.5)) cobs> Rbs <- cobs(x, y, constraint = "increase", pointwise = con)
2012 Feb 24
1
B-spline/smooth.basis derivative matrices
Hello, I've noticed that SPLUS seems to have a function for evaluating derivative matrices of splines. I've found the R function that evaluates matrices from 'smooth.spline'; maybe someone has written something to do the same with smooth.basis? regards, s
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
2012 Mar 12
1
Fwd: Re[2]: B-spline/smooth.basis derivative matrices
--- On Mon, 3/12/12, aleksandr shfets <a_shfets at mail.ru> wrote: > From: aleksandr shfets <a_shfets at mail.ru> > Subject: Fwd: Re[2]: [R] B-spline/smooth.basis derivative matrices > To: "Vassily Shvets" <shv736 at yahoo.com> > Received: Monday, March 12, 2012, 5:15 PM > > > > -------- ???????????? ????????? > -------- > ?? ????:
2007 May 21
2
comparing fit of cubic spline
I want to compare the fit of a quadratic model to continuous data, with that of a cubic spline fit. Is there a way of computing AIC from for e.g. a GAM with a smoothing spine, and comparing this to AIC from a quadratic model? Cheers ****************************************** Tom Reed PhD Student Institute of Evolutionary Biology 102 Ashworth Laboratories Kings Buildings University of
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
2012 Nov 15
1
create function to solve derivative
Readers, A data set comprises A B C 10 6 .2 20 7 .4 30 8 .16 40 9 .0256 My requirement is to obtain the derivative for values of A with respect to B, create a function in R and plot this derivative against another variable (e.g. values in column C). Have searched the mailing list and found reference to a function 'D', but the help accessed via '?D' and '?deriv' does not
2010 Apr 14
1
Selecting derivative order penalty for thin plate spline regression (GAM - mgcv)
Hi, I am using GAMs (package mgcv) to smooth event rates in a penalized regression setting and I was wondering if/how one can select the order of the derivative penalty. For my particular problem the order of the penalty (parameter "m" inside the "s" terms of the formula argument) appears to have a larger effect on the AIC/deviance of the estimated model than the
2002 Feb 20
2
How to get the penalized log likelihood from smooth.spline()?
I use smooth.spline(x, y) in package modreg and I would like to get value of penalized log likelihood and preferable also its two parts. To make clear what I am asking for (and make sure that I am asking for the right thing) I clarify my problem trying to use the same notation as in help(smooth.spline): I want to find the natural cubic spline f(x) such that L(f) = \sum_{k=1}{n} w[k](y[k] -
2005 Sep 22
1
multidimensional (smoothing) splines
Hi, I am approximation a value function (in dynamic programming) V: R^n->R. In different versions of the problem, n is between 2 and 5. I would like to use splines to use this, I checked the mailing list and CRAN but couldn't find anything that would help me (Tps in fields is too slow, cobs would be really nice but seems to be one-dimensional). Is there any package that would at least
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
2005 Mar 01
1
constraining initial slope in smoother.spline
Hello. I want to fit a smoother spline (or an equivalent local regression method) to a series of data in which the initial value of the 1st derivative (slope) is constrained to a specific value. Is it possible to do this? If so, how? Bill Shipley [[alternative HTML version deleted]]
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 >
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
2006 Jul 31
1
questions regarding spline functions
Greetings, A couple general questions regarding the use of splines to interpolate depth profile data. Here is an example of a set of depths, with associated attributes for a given soil profile, along with a function for calculating midpoints from a set of soil horizon boundaries: #calculate midpoints: mid <- function(x) { for( i in 1:length(x)) { if( i > 1) { a[i] = (x[i] -
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