Displaying 20 results from an estimated 10000 matches similar to: "cubic spline smoothers with heterogeneous variances"
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
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
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]]
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 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 =
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
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.
2005 Aug 08
0
Difference amongst spline smoothers
Dear all,
Anybody knows about the difference amongst various spline smoothers, specifically in R, 'bs' (by default a cubic spline), 'ns', smooth.spline with roughness penalty along with many other smoothers? I've consulted serveral books like 'S-plus Guide to Statistics' by Mathsoft, Ripley and Venables' Splus book and Eubank's Spline Smoothing, but I was still
2004 Apr 01
1
nls function
Hello. I am trying to fit a non-rectangular hyperbola function to data
of photosynthetic rate vs. light intensity. There are 4 parameters that
have to be estimated. I find the nls function very difficult to use
because it often fails to converge and then gives out cryptic error
messages. I have tried playing with the control parameters but this
does not always help.
Is there another
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?
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
2003 Feb 28
0
How do I find the first derivative from the cubic natural spline
Hi, Everyboday,
Does anybody know how to get the first derivative form the cubic natural
spline matrix?
Thanks !!!
Jassy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nuoo-Ting (Jassy) Molitor, MS, Junior Statistician
Division of Biostatistics
Department of Preventive Medicine
University of Southern California Tel: (323) 442-2584
1540 Alcazar St., CHP-210F Fax:
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)
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
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
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]]
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 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
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
2005 May 02
2
Restricted cubic spline function ERROR?: glm(Y~rcs(x,5))
Dear all,
Is the restricted cubic spline function working properly in the glm model?
We used glm(y~rcs(x,5), family=binomial) but it seems that for some
theoretical reasons the rcs, restricted cubic spline function can not be
fitted by a glm function. Is this correct?
Regards,
Jan
((Originally, we used lrm(y~ rcs(x,5)) but we couldn't find how to derive
the AIC value of the fitted model.