Displaying 20 results from an estimated 21 matches for "splinedesign".
2012 Aug 02
2
Rd] Numerics behind splineDesign
On 08/02/2012 05:00 AM, r-devel-request at r-project.org wrote:
> Now I just have to grovel over the R code in ns() and bs() to figure
> out how exactly they pick knots and handle boundary conditions, plus
> there is some code that I don't understand in ns() that uses qr() to
> postprocess the output from spline.des. I assume this is involved
> somehow in imposing the boundary
2006 Dec 13
2
caching frequently used values
...following:
A list has information about a basis of a B-spline space (nodes,
order) and gridpoints at which the basis functions would be evaluated
(not necessarily the nodes). Something like this:
bsplinegrid <- list(nodes=1:8,order=4,grid=seq(2,5,by=.2))
I need the design matrix (computed by splineDesign) for various
derivatives (not necessarily known in advance), to be calculated by
the function
bsplinematrix <- function(bsplinegrid, deriv=0) {
x <- bsplinegrid$grid
Matrix(splineDesign(bslinegrid$knots, x, ord=basis$order,
derivs = rep(deriv,length(x))))
}
However...
2006 Nov 15
1
splineDesign and not-a-knot conditions
Hi,
I would like to fit an (interpolating) spline to data where the
derivatives at the endpoints of the interval are nonzero, thus the
natural spline endpoint-specification does not make sense. Books (de
Boor, etc) suggest that in this case I use not-a-knot splines.
I know what not-a-knot splines are (so if I were solving for the
coefficients directly I knew how to do this), but I don't
2016 Mar 04
2
R 3.2.4 rc issue
...> ###----------------- sparse / dense interpSpline() ---------------------------
>
> ## from help(interpSpline) -- ../man/interpSpline.Rd
> ispl <- interpSpline( women$height, women$weight)
> isp. <- interpSpline( women$height, women$weight, sparse=TRUE)
Error in splineDesign(knots, x, ord, derivs, sparse = sparse) :
splineDesign(*, sparse=TRUE) needs package 'Matrix' correctly installed
Calls: interpSpline -> interpSpline.default -> splineDesign
Execution halted
* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 1 WARNING
See
'...
2008 Jul 29
1
tensor product of equi-spaced B-splines in the unit square
Dear all,
I need to compute tensor product of B-spline defined over equi-spaced
break-points.
I wrote my own program (it works in a 2-dimensional setting)
library(splines)
# set the break-points
Knots = seq(-1,1,length=10)
# number of splines
M = (length(Knots)-4)^2
# short cut to splineDesign function
bspline = function(x) splineDesign(Knots,x,outer.ok = T)
# bivariate tensor product of bspline
btens = function(x) t(bspline(x[1]))%*%bspline(x[2])
# numebr of points to plot
ng = 51
# create vectors for plotting
xgr = seq(-1,1,length=ng)
xgr2 = expand.grid(xgr,xgr)
# generat...
2011 Mar 28
2
mgcv gam predict problem
...ghtly beyond the original 'x' range, I get
this error:
> A = runif(50,1,149)
> B = sqrt(A) + rnorm(50)
> range(A)
[1] 3.289136 145.342961
>
>
> fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE)
> predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE)
Error in splineDesign(knots, x, ord, derivs, outer.ok = outer.ok) :
the 'x' data must be in the range 3.14708 to 145.485 unless you set
'outer.ok = TRUE'
>
I've inserted the argument 'outer.ok=TRUE' as you can see, but it
hasn't helped. How can I obtain this prediction?
Thanks,
Ph...
2016 Mar 04
0
R 3.2.4 rc issue
...-------------- sparse / dense interpSpline() ---------------------------
>>
>> ## from help(interpSpline) -- ../man/interpSpline.Rd
>> ispl <- interpSpline( women$height, women$weight)
>> isp. <- interpSpline( women$height, women$weight, sparse=TRUE)
> Error in splineDesign(knots, x, ord, derivs, sparse = sparse) :
> splineDesign(*, sparse=TRUE) needs package 'Matrix' correctly installed
> Calls: interpSpline -> interpSpline.default -> splineDesign
> Execution halted
> * checking PDF version of manual ... OK
> * DONE
>
> Statu...
2016 Mar 04
1
R 3.2.4 rc issue
...---- sparse / dense interpSpline() ---------------------------
| >>
| >> ## from help(interpSpline) -- ../man/interpSpline.Rd
| >> ispl <- interpSpline( women$height, women$weight)
| >> isp. <- interpSpline( women$height, women$weight, sparse=TRUE)
| > Error in splineDesign(knots, x, ord, derivs, sparse = sparse) :
| > splineDesign(*, sparse=TRUE) needs package 'Matrix' correctly installed
| > Calls: interpSpline -> interpSpline.default -> splineDesign
| > Execution halted
| > * checking PDF version of manual ... OK
| > * DONE
| >...
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
2005 Jun 03
2
using so-library involving Taucs
...local/taucs/external/lib/linux
-L/usr/local/taucs/lib/linux -L/usr/local/lib -L/opt/gnome/lib
-L/usr/lib/R/lib -shared -fpic -o hattrace.so hattrace.o -ltaucs
-llapack -lf77blas -lcblas -latlas -lmetis -lm -lg2c -lR
I tried the following test commands:
library(splines)
library(SparseM)
B <- splineDesign(knots = 1:10, x = 4:7)
D <- diff(diag(dim(B)[2]), differences = 1)
BB <- t(B) %*% B
S <- as.matrix.ssc(BB + t(D) %*% D)
if (!is.loaded(symbol.C("hattrace"))) { dyn.load(paste("hattrace",
.Platform$dynlib.ext, sep = "")) }
out <- 0
spur <- (.C("hatt...
2012 Mar 12
1
Fwd: Re[2]: B-spline/smooth.basis derivative matrices
....
>
> 25 ??????? 2012, 15:11 ?? "vito.muggeo" <vito.muggeo at unipa.it>:
> > dear s,
> >
> > If you are willing to use B-splines placing p knots,
> say, (rather than smoothing splines
> > placing n knots), you could have a look to the
> functions splineDesign() or spline.des()
> > (argument derivs) in the package "splines".
> >
> > vito
> >
> > On Fri, 24 Feb 2012 12:28:58 -0800 (PST), Vassily
> Shvets wrote
> > > Hello,
> > > I've noticed that SPLUS seems to have a function
> for evalu...
2006 Jan 25
0
documentation mistake
dear r-help.
i want top report a mistake in the documentation help(splineDesign).
the last sentence of "value" is
" Each B-spline is defined by a set of 'ord' successive knots
so the total number of B-splines is 'length(knots)-ord'. "
it is not correct!
one b-spline is defines by a set of 'ord+1' successive knots.
take an easy examp...
2008 Jul 17
1
smooth.spline
I like what smooth.spline does but I am unclear on the output. I can see from the documentation that there are fit.coef but I am unclear what those coeficients are applied to.With spline I understand the "noraml" coefficients applied to a cubic polynomial. But these coefficients I am not sure how to interpret. If I had a description of the algorithm maybe I could figure it out but as it
2017 Sep 28
1
R 3.4.2 is released
...ing store (PR#16497).
* array(character(), 1) now gives (a 1D array with) NA as has been
documented for a long time as in the other cases of zero-length
array initialization and also compatibly with matrix(character(),
*). As mentioned there, this also fixes PR#17333.
* splineDesign(.., derivs = 4) no longer segfaults.
* fisher.test(*, hybrid=TRUE) now (again) will use the hybrid
method when Cochran's conditions are met, fixing PR#16654.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmar...
2017 Sep 28
1
R 3.4.2 is released
...ing store (PR#16497).
* array(character(), 1) now gives (a 1D array with) NA as has been
documented for a long time as in the other cases of zero-length
array initialization and also compatibly with matrix(character(),
*). As mentioned there, this also fixes PR#17333.
* splineDesign(.., derivs = 4) no longer segfaults.
* fisher.test(*, hybrid=TRUE) now (again) will use the hybrid
method when Cochran's conditions are met, fixing PR#16654.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmar...
2012 Jun 22
0
R 2.15.1 is released
...r than
.Internal(eval.with.vis). This sometimes alters tracebacks
slightly.
o install.packages("pkg_version.tgz") on Mac OS X now has sanity
checks that this is actually a binary package (as people have
tried it with incorrectly named source packages).
o splineDesign() and spline.des() in package splines have a new
option sparse which can be used for efficient construction of a
sparse B-spline design matrix (_via_ Matrix).
o norm() now allows type = "2" (the 'spectral' or 2-norm) as well,
mainly for didactical completene...
2012 Jun 22
0
R 2.15.1 is released
...r than
.Internal(eval.with.vis). This sometimes alters tracebacks
slightly.
o install.packages("pkg_version.tgz") on Mac OS X now has sanity
checks that this is actually a binary package (as people have
tried it with incorrectly named source packages).
o splineDesign() and spline.des() in package splines have a new
option sparse which can be used for efficient construction of a
sparse B-spline design matrix (_via_ Matrix).
o norm() now allows type = "2" (the 'spectral' or 2-norm) as well,
mainly for didactical completene...
2005 Apr 18
1
R-2.1.0 is released
...vectors try first methods for
class "integer"/"double" and then those for class "numeric".
The implicit classes for matrices and arrays have been changed
to be "matrix"/"array" followed by the class(es) of the
underlying vector.
o splines::splineDesign() now allows the evaluation of a B-spline
basis everywhere instead of just inside the "inner" knots, by
setting the new argument `outer.ok = TRUE'.
o Hashing has been tweaked to use half as much memory as before.
o Readline is not used for tilde expansion when R is run wit...
2005 Apr 18
1
R-2.1.0 is released
...vectors try first methods for
class "integer"/"double" and then those for class "numeric".
The implicit classes for matrices and arrays have been changed
to be "matrix"/"array" followed by the class(es) of the
underlying vector.
o splines::splineDesign() now allows the evaluation of a B-spline
basis everywhere instead of just inside the "inner" knots, by
setting the new argument `outer.ok = TRUE'.
o Hashing has been tweaked to use half as much memory as before.
o Readline is not used for tilde expansion when R is run wit...
2000 Feb 17
2
Installation of rpm file on Suse Linux 6.2 (PR#449)
...on:
create
D: file: /usr/local/lib/R/library/splines/R-ex/polySpline.R action: create
D: file: /usr/local/lib/R/library/splines/R-ex/predict.bSpline.R action:
create
D: file: /usr/local/lib/R/library/splines/R-ex/predict.bs.R action: create
D: file: /usr/local/lib/R/library/splines/R-ex/splineDesign.R action: create
D: file: /usr/local/lib/R/library/splines/R-ex/splineKnots.R action: create
D: file: /usr/local/lib/R/library/splines/R-ex/splineOrder.R action: create
D: file: /usr/local/lib/R/library/splines/R-ex/xyVector.R action: create
D: file: /usr/local/lib/R/library/splines/R/s...