similar to: constraining initial slope in smoother.spline

Displaying 20 results from an estimated 9000 matches similar to: "constraining initial slope in smoother.spline"

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.
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
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
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.
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
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 =
2007 Nov 25
1
GAM with constraints
Hi, I am trying to build GAM with linear constraints, for a general link function, not only identity. If I understand it correctly, the function pcls() can solve the problem, if the smoothness penalties are given. What I need is to incorporate the constraints before calculating the penalties. Can this be done in R? Any help would be greately appreciated. -- View this message in context:
2013 Mar 23
1
Time trends with GAM
Hi all, I am using GAM to model time trends in a logistic regression. Yet I would like to extract the the fitted spline from it to add it to another model, that cannot be fitted in GAM or GAMM. Thus I have 2 questions: 1) How can I fit a smoother over time so that I force one knot to be at a particular location while letting the model to find the other knots? 2) how can I extract the matrix
2004 Mar 01
1
non-negative least-squares
Hi all, I am trying to do an inversion of electromagnetic data with non-negative least squares method (Tikhonov regularisation) and have got it programmed in S-Plus. However I am trying to move all my scripts from S-Plus to R. Is there an equivalent to nnls.fit in R? I think this can be done with pcls? Right? S-Plus script: A, L and data are matrices, lambda is a vector of possible lambda
2002 Mar 27
1
non-decreasing smoother
Hello Is there a simple way of fitting a 'smooth curve' to a time series with the additional constraint that the first derivative be not negative? I know that if I choose a "large enough" window for a moving average sort of filter on my data I end up with a non-decreasing curve anyway, but I'm wondering if there is a pre-built method that can include the constraint from
2011 Aug 04
1
Plotting just a portion of a smoother graph in ggplot2
Hi, I am using ggplot2 to with the following code: gmathk2 <- qplot(time,math,colour=Kids,data=kids.ach.lm.k5,geom="smooth",method="lm",formula=y~ns(x,1)) + opts(title="Smoother Plot: Math K-5") + xlab("Time") + ylab("Math") + scale_colour_brewer(pal="Set1"); gmathk2 This plots all the smoother for all the x values. What I'd like
2010 Dec 06
1
use pcls to solve least square fitting with constraints
Hi, I have a least square fitting problem with linear inequality constraints. pcls seems capable of solving it so I tried it, unfortunately, it is stuck with the following error: > M <- list() > M$y = Dmat[,1] > M$X = Cmat > M$Ain = as.matrix(Amat) > M$bin = rep(0, dim(Amat)[1]) > M$p=qr.solve(as.matrix(Cmat), Dmat[,1]) > M$w = rep(1, length(M$y)) > M$C = matrix(0,0,0)
2003 Sep 26
1
least squares regression using (inequality) restrictions
Dear R Users, I would like to make a lesast squares regression similar to that what is done by the command "lm". But additionally, I would like to impose some restrictions: 1) The sum of all regression coefficients should be equal to 1. 2) Each coefficient should assume a value between 0 and 1. (inequality restrictions) Which command is the best to use in order to solve this problem
2008 Aug 05
2
95% CI bands on a Lowess smoother
Hi there, I'm plotting some glass RI values just by plotting plot(x) then I put on my lowess smoother lines(lowess(x)) now I want to put on some 95% Confidence Interval bands of the lowess smoother, but don't know how?? Thanks -- Gareth Campbell PhD Candidate The University of Auckland P +649 815 3670 M +6421 256 3511 E gareth.campbell@esr.cri.nz gcam032@gmail.com [[alternative
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   
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 Apr 14
2
GAMM : how to use a smoother for some levels of a variable, and a linear effect for other levels?
Hi, I was reading the book on "Mixed Effects Models and Extensions in Ecology with R" by Zuur et al. In Section 6.2, an example is discussed where a gamm-model is fitted, with a smoother for time, which differs for each value of ID (4 different bird species). In earlier versions of R, the following code was used BM2<-gamm(Birds~Rain+ID+
2011 Sep 20
2
Multivariate spline regression and predicted values
Hello, I am trying to estimate a multivariate regression of Y on X with regression splines. Y is (nx1), and X is (nxd), with d>1. I assume the data is generated by some unknown regression function f(X), as in Y = f(X) + u, where u is some well-behaved regression error. I want to estimate f(X) via regression splines (tensor product splines). Then, I want to get the predicted values for some new
2004 Jun 02
1
oh323: Failed to create smoother
Hello, I tried to get the oh323 drivers running. The driver loads, but as soon as a H323 voice communication should be started, following error occurs: -- Executing Playback("OH323/R1", "invalid") in new stack Jun 3 01:26:20 ERROR[294931]: chan_oh323.c:1933 oh323_write: OH323/R1: Failed to create smoother. Jun 3 01:26:20 WARNING[294931]: file.c:539
2007 Jul 13
1
spatstat - Fitting a Strauss model with trend determined by kernel density smoother
Dear r-help, I would like to use the 'ppm' function of the 'spatstat' package to fit a Strauss inhibition model. I understand that I can specify a parametric model for the "background" trend, but how would I specify a trend which is estimated using a Kernel density smoother? In particular, I would like to use the 'kde' function of the 'ks' package to