Displaying 20 results from an estimated 6000 matches similar to: "Difference amongst spline smoothers"
2002 Oct 22
2
cubic spline smoothers with heterogeneous variances
Hello. I have data (plant weights over time) that are non-linear and in
which the variance increases over time. I have to estimate the first
derivatives of plant weight given time (i.e. growth rate) and their se,
using a regression smoother, and I have been considering cubic spline
smoothers. However, I do not know if this can be done given that the error
variance would increase over time.
2004 Nov 10
2
cubic spline/smoother with nlme
Greetings, I would like to use a cubic spline
or smoother to model the fixed effects within
nlme. So far the only smoother I have been able
to get to run successfully in nlme is smooth().
I tried smooth.spline:
fixed=list(lKa~1,lCL~smooth.spline(BSA, df=3))
the error I got was the following.
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames, : invalid
2010 Jun 04
1
package mgcv inconsistency in help files? cyclic P-spline "cs" not cyclic?
Dear all,
I'm a bit stunned by the behaviour of a gam model using cyclic
P-spline smoothers. I cannot provide the data, as I have about 61.000
observations from a time series.
I use the following model :
testgam <- gam(NO~s(x)+s(y,bs="cs")+s(DD,bs="cs")+s(TT),data=Final)
The problem lies with the cyclic smoother I use for seasonal trends.
The variable Final$y is a
2010 Mar 05
0
Assistance with pointers to code for B-spline derivatives (S-plus related).
Hi.
I have been using the splines package for my work, in particular, the bs() function and associated predict() method. I now find myself in need of the derivatives of this beast.
In the man page for predict.bSpline I found `predict(object, x, nseg=50, deriv=0, ...)' but alas this is not implemented (deriv= is ignored). I contacted the package maintainers who were most helpful. Bill
2006 Jun 24
3
getting the smoother matrix from smooth.spline
Can anyone tell me the trick for obtaining the smoother matrix from smooth.spline when there are non-unique values for x. I have the following code but, of course, it only works when all values of x are unique.
## get the smoother matrix (x having unique values
smooth.matrix = function(x, df){
n = length(x);
A = matrix(0, n, n);
for(i in 1:n){
y = rep(0, n); y[i]=1;
yi =
2010 Dec 03
1
mgcv package plot superimposing smoothers
Dear R help list,
I'm fitting a 'variable coefficient model' in the MGCV package and I want to
plot the different smoothers I get for each factor level in one graph.
So, I do something like this to fit the gam:
Mtest <- gam(outcome ~ s(age, by=as.numeric(gender==0)) +
s(age,by=as.numeric(gender==1))+factor(Gender))
Then I can plot the smoother for gender=0:
plot(Mtest,select=1)
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] -
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
2005 Jan 05
1
cubic spline smoother with heterogeneous variance.
Hello. I want to estimate the predicted values and standard errors of
Y=f(t) and its first derivative at each unique value of t using the
smooth.spline function. However, the data (plant growth as a function
of time) show substantial heterogeneity of variance since the variance
of plant mass increases over time. What is the consequence of such
heterogeneity of variance in terms of bias in the
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]]
2012 Oct 26
0
Seasonal smoothing of data with large gaps (mgcv)
Hi,
I have a set of measurements that are made on a daily basis over many
years. I would like to produce a *non-parametric* smooth of these data to
estimate the seasonal cycle - to achieve this, I have been using the cyclic
cubic splines from the mgcv package. This works superbly in most
situations, but not all.
The problem is that for various practical reasons the data is not available
all year
2006 Dec 21
0
Spline models in sspir
Dear R-Help,
I'm trying to learn the sspir package for state space modeling. Has
anyone coded a cubic spline smoother (continuous time) in state space
format in sspir? The syntax for setting up the various matrices would be
really helpful.
Best
Simon
--
Simon D.W. Frost, D.Phil.
Assistant Adjunct Professor of Pathology
University of California, San Diego
Mailcode 8208
UCSD Antiviral
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.
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
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 Apr 09
1
How to get the penalty matrix for natural cubic spline?
Hi, all
I am trying to get the basis matrix and penalty matrix for natural
cubic splines. In the "splines" package of R,"ns" can
generate the B-spline basis matrix for a natural cubic spline. How can
I get the basis matrix and penalty matrix for natural cubic
spline.
Thanks a lot!
Lee
[[alternative HTML version deleted]]
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
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) +
2010 May 14
1
Cubic B-spline, how to numerically integrate?
(corrected version of previous posting)
I fit a GAM to turtle growth data following methods in Limpus & Chaloupka
1997 (http://www.int-res.com/articles/meps/149/m149p023.pdf).
I want to obtain figures similar to Fig 3 c & f in Limpus & Chaloupka
(1997), which according to the figure legend are "expected size-at-age
functions" obtained by numerically integrating
2005 Nov 28
2
Robust fitting
Good evening,I am Marta Colombo, student of "Politecnico di Milano". I'm studying Local Regression Techniques such as loess, smoothing splines and kernel smoothers. Choosing "symmetric" for the argument "family" in loess function it is possible to produce a robust estimate , in function smooth.spline and ksmooth I didn't find this possibility. Well, is there a