Displaying 20 results from an estimated 5000 matches similar to: "multidimensional (smoothing) splines"
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
2005 Jul 19
2
Taking the derivative of a quadratic B-spline
Hello,
I have been trying to take the derivative of a quadratic B-spline
obtained by using the COBS library. What I would like to do is
similar to what one can do by using
fit<-smooth.spline(cdf)
xx<-seq(-10,10,.1)
predict(fit, xx, deriv = 1)
The goal is to fit the spline to data that is approximating a
cumulative distribution function (e.g. in my example, cdf is a
2-column matrix with x
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
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)
2004 Apr 25
7
R vs Matlab: which is more "programmer friendly"?
Hi,
The department of economics at our university (Budapest) is planning a
course on numerical methods in economics. They are trying to decide
which software to use for that, and I would like to advocate R. The
other alternative is Matlab.
I have found comparisons in terms of computational time for matrix
algebra, but I don't think that is relevant: the bottleneck for
economists is usually
2004 Jul 14
0
Convex smoothing via 'Iterative Convex Minorant' ?
I've been asked, and interested myself:
Has anybody implemented the above in R or another S language dialect?
We are talking about the algorithms / methodology
by Wellner, Groeneboom and Jongbloed, e.g., from the following article
@Article{Jongbloed:1998:ICM,
author = "Geurt Jongbloed",
title = "The Iterative Convex Minorant Algorithm for
2003 Apr 23
1
Setting up Xemacs + Sweave
Dear list,
I have tried to setup my Xemacs for use with Sweave, which I indend to learn.
I have followed the instructions in the Sweave FAQ, that is to say, I put
(defun Rnw-mode ()
(require 'ess-noweb)
(noweb-mode)
(if (fboundp 'R-mode)
(setq noweb-default-code-mode 'R-mode)))
(add-to-list 'auto-mode-alist '("\\.Rnw\\'" . Rnw-mode))
(add-to-list
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],
2003 Apr 17
1
Testing for whole numbers
Is there a way in R to test if a given number is an integer, ie a
whole number? I am not referring to the data type of a number, but to
its value.
That is to say, is.whole(pi-pi+2) would be TRUE, whereas is.whole(4/3)
would be false. At the moment I am using
is.whole <- function(a) { floor(a)==a }
which is OK for real numbers, but not for complex ones (a+bi would be
a whole number if both a
2003 Oct 01
3
fitting Markov chains
I need to find a computationally simple process for the movement of
interest rates. In this simplified model, an interest rate can have
3--5 possible values, and its movement is characterized by a matrix of
transition probabilities (ie, it is a Markov process).
I would like to estimate this process from a given set of data.
For example, let the interest rate time series be:
7 3 8 2 5 9 6
2008 Jun 17
2
constrOptim with method = "L-BFGS-B"
Hi,
i need to minimize a quadratic function with boundary condidtions and one
equality condition.
In order to do that i converted the equality constraint into 2 inequality
constaints and passed everything cia constrOptim, as the manual said:
everything included in the ... will be passed to Optim that will pass it
back to fn in case it does not need it.
My code is the following:
mat <-
2002 Apr 19
4
Multidimensional scaling
A student of mine wants to use R to do some nonmetric multidimensional
scaling. According to the R FAQ, there's a package called pcurve that
computes multidimensional scaling solutions, but I was not able to locate
it the contrib page (I am a Windows user with R version 1.4.1). Can
anyone tell me whether it is possible to do nonmetric multidimensional
scaling with R, and if so, how?
John
2011 Jan 20
2
Using a list as multidimensional indexer
Hello list.
Another 'puzzle' for which I don't have a clean solution.
Say I have a multidimensional object, e.g.:
Mm<-matrix(1:6, nrow=2, dimnames=list(c("a","b"), c("g","h","i")))
And on the other hand I have a list
Ind<-list("b","g")
This holds, for each dimension, an indexer for that dimension.
Now I would
2003 Feb 27
2
multidimensional function fitting
Take a look at package mgcv. Hope this helps. --Matt
-----Original Message-----
From: RenE J.V. Bertin [mailto:rjvbertin at despammed.com]
Sent: Thursday, February 27, 2003 1:39 PM
To: r-help at stat.math.ethz.ch
Subject: [R] multidimensional function fitting
Hello,
I have been looking around for how to perform a multidimensional, arbitrary
function fit (in any case non-linear; more below),
2012 Jan 09
1
What is the function for "smoothing splines with the smoothing parameter selected by generalized maximum likelihood?
Dear all,
I am new to R, and I am a biotechnologist, I want to fit a smoothing spline
with smoothing parameter selected by generalized maximum likelihood. I was
wondering what function implement this, and, if possible how I can find the
fitted results for a certain point (or predict from the fitted spline if
this is the correct language)
--
View this message in context:
2012 May 14
3
How to apply a function to a multidimensional array based on its indices
Hello. I have a 4 dimensional array and I want to fill in the slots with
values which are a function of the inputs. Through searching the forums here
I found that the function "outer" is helpful for 2x2 matrices but cannot be
applied to general multidimensional arrays. Is there anything which can
achieve, more efficiently than the following code, the job I want?
K <-
2005 Nov 03
1
multidimensional integration not over a multidimensionalrectangle
Hi,
anyone knows about any functions in R can get multidimensional integration
not over a multidimensional rectangle (not adapt).
For example, I tried the following function f(x,n)=x^n/n!
phi.fun<-function(x,n)
{ if (n==1) {
x
}else{
integrate(phi.fun, lower=0, upper=x, n=n-1)$value
}
}
I could get f(4,2)=4^2/2!=8, but failed in f(4,3)=4^3/3! Thanks
Best,
Lynette
2011 Oct 05
2
cuhre usage ?? multidimensional integration
my=function(x){
len=1
for(i in 1:len){
y[i]=x[i]
}
g=1
w=NULL
t=NULL
for(i in 1:len)w[i]=x[i+len]
for(i in 1:len)t[i]=x[i+2*len]
for(i in 1:len)g=g*dnorm(y[i])*dnorm(w[i])*dnorm(z[i])
return(g)
}
cuhre(6,1,my,rep(-100,6),rep(100,6))
Error in crff(match.call(), integrand, "cuhre", libargs, ...) :
Additional argument not expected in the integrand function
function change to
2011 Oct 21
2
Converting data frame into multidimensional array
Consider the following data frame
X <- data.frame(Titanic)
Does anyone know of an easy way to convert X into a multidimensional
array? Example that doesn't work
X <- as.array(X, dim=c(4,2,2,2))
To do what I need, X needs to be converted into an array of dimensions
c(4,2,2,2) in this case, not a table.
Thanks in advance.
2006 Jul 17
1
multiplying multidimensional arrays (was: Re: [R] Manipulation involving arrays)
I am moving this to r-devel.
The problem and solution below posted on r-help could have been
a bit slicker if %*% worked with multidimensional arrays multiplying
them so that if the first arg is a multidimensional array it is mulitplied
along the last dimension (and first dimension for the second arg).
Then one could have written:
Tbar <- tarray %*% t(wt) / rep(wti, each = 9)
which is a bit