Displaying 20 results from an estimated 10000 matches similar to: "smooth.spline vs loess"
2002 Jan 13
2
function for rank of a matrix ?
Hello R'users,
I have a quick question. I wanted to know if there exist a function in R
to compute the rank of a matrix. I could not find anything about it.
Thank you,
Raphael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: raph.vcf
Type: text/x-vcard
Size: 303 bytes
Desc: Card for Raphael Gottardo
Url :
2005 Jul 12
1
getting panel.loess to use updated version of loess.smooth
I'm updating the loess routines to allow for, among other things,
arbitrary local polynomial degree and number of predictors. For now,
I've given the updated package its own namespace. The trouble is,
panel.loess still calls the original code in package:stats instead of
the new loess package, regardless of whether package:loess or
package:lattice comes first in the search list. If I
2001 Jul 10
1
gls function, very old results
Hello R-users,
I am currently trying to learn how to use the function gls of the nlme
library. I fitted the following model:
Generalized least squares fit by REML
Model: response ~ array + dye + genes + variety + variety * genes +
array * genes + dye * genes
Data: data
I have 11 arrays, 2 dyes, 2 varieties, 3200 genes, and 2 replications
for each.
Therefore I should have the corresponding
2000 Mar 28
1
loess.smooth dumps core
Has the loess.smooth() function changed? It used to work, but now it causes R
to abort with a segmentation fault. I stole the function points.lines() from
V&R 1st ed. pp. 67--68, but now it only works if I remove the line with
loess.smooth. Here's the function I'm using:
points.lines <- function(x, y, ...)
{
cor1 <-round(cor(x, y, use="pairwise"), digits=2)
2006 Mar 17
1
smooth.spline
I have noticed a slightly puzzling behaviour exhibited by
smooth.spline(). If I do
sss <- smooth.spline(x,y)
for a certain pair of data vectors x and y, and then do
length(sss$x)
I get the result ``18''. However if I do
length(unique(x))
I get ``27''. Trying to force smooth.spline() to use more knots I
tried
sss <- smooth.spline(x,y,all.knots=TRUE)
but again
2007 Sep 19
3
Smooth line in graph
Hi,
I?m trying to get smooth curves connecting points in a plot using
"spline" but I don?t get what I whant.
Eg.:
x<-1:5
y <- c(0.31, 0.45, 0.84, 0.43, 0.25)
plot(x,y)
lines(spline(x,y))
Creates a valley between the first and second points, then peaks at 3rd,
and another valley between 4th and 5th. I?m trying to get a consistently
growing curve up to the 3rth point and then a
2009 Mar 28
1
Find inflection points using smooth.spline
Is there any way to identify or infer the inflection points in a smooth
spline object? I am doing a comparison of various methods of time-series
analysis (polynomial regression, spline smoothing, recursive partitioning)
and I am specifically interested in obtaining the julian dates associated
with the inflection points inferred by the various models.
Tyler
e.g.
2012 Feb 15
1
smooth.spline() unique 'x' values error
Hello.
I'm getting an unexpected result when running smooth.spline(). Here is a simple example that replicates the error I'm getting:
> aa <- c(1, 2, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 13, 14)
> bb <- 1:length(aa)
> plot(aa, bb)
> smooth.spline(aa, bb)
Error in smooth.spline(aa, bb) : need at least four unique 'x' values
As you can see from the example, my
2006 Mar 16
1
running median and smoothing splines for robust surface f itting
loess() should be able to do robust 2D smoothing.
There's no natural ordering in 2D, so defining running medians can be
tricky. I seem to recall Prof. Koenker talked about some robust 2D
smoothing method at useR! 2004, but can't remember if it's available in some
packages.
Andy
From: Vladislav Petyuk
>
> Hi,
> Are there any multidimenstional versions of runmed() and
>
2008 Jun 05
1
Smooth Spline
Hi,
I have three original curves as follows,
n<-seq(20,200,by=10)
t<-c(0.1138, 0.1639, 0.2051, 0.2473, 0.2890, 0.3304, 0.3827, 0.4075, 0.4618, 0.4944,
0.5209, 0.5562, 0.5935, 0.6197, 0.6523, 0.6771, 0.6984, 0.7209, 0.7453)
es<-c(0.3682, 0.4268, 0.5585, 0.6095, 0.7023, 0.7534, 0.8225, 0.8471, 0.8964, 0.9098, 0.9371, 0.9514, 0.9685, 0.9747, 0.9812, 0.9859, 0.9905, 0.9923, 0.9940)
2011 Aug 25
3
Application of results from smooth.spline outside R
Hi,
I want to use the result from smooth.spline outside R.
I take my data ,which is 180 point stored in x and y
s <- smooth(x,y)
I can know use to e.g. find the interpolated value at e.g. x=500
predict (s,500)
My problem is, that i don't know how to implement the predict function. I
have looked at literature, but i cannot connect the output of the
smooth.spline() to an actual spline
2012 Mar 12
1
Fwd: Re[2]: B-spline/smooth.basis derivative matrices
--- On Mon, 3/12/12, aleksandr shfets <a_shfets at mail.ru> wrote:
> From: aleksandr shfets <a_shfets at mail.ru>
> Subject: Fwd: Re[2]: [R] B-spline/smooth.basis derivative matrices
> To: "Vassily Shvets" <shv736 at yahoo.com>
> Received: Monday, March 12, 2012, 5:15 PM
>
>
>
> -------- ???????????? ?????????
> --------
> ?? ????:
2005 Apr 27
0
smooth.spline(): residuals(), fitted(),...
It has bothered me for quite some time that a smoothing spline
fit doesn't allow access to residuals or fitted values in
general, since after
fit <- smooth.spline(x,y, *)
the resulting fit$x is really equal to the unique (up to 1e-6
precision) sorted original x values and fit$yin (and $y) is accordingly.
There are several possible ways to implement the missing
feature. My current
2003 May 23
2
predict.smooth.spline
I'm using R 1.7.0 on linux. With this version of R the package modreg is
automatically loaded at start of session. However attempting to use
predict.smooth.spline() produces Error: couldn't find function
predict.smooth.spline.
The function smooth.spline() is OK. What am I missing?
======================================
I.White
ICAPB, University of Edinburgh
Ashworth Laboratories, West
2006 Apr 05
1
predict.smooth.spline.fit and Recall() (Was: Re: Return function from function and Recall())
Hi,
forget about the below details. It is not related to the fact that
the function is returned from a function. Sorry about that. I've
been troubleshooting soo much I've been shoting over the target. Here
is a much smaller reproducible example:
x <- 1:10
y <- 1:10 + rnorm(length(x))
sp <- smooth.spline(x=x, y=y)
ypred <- predict(sp$fit, x)
# [1] 2.325181 2.756166 ...
2009 Nov 06
3
order of points in spline
Hello everyone,
I was trying to fit a spline to some points and I was quite surprised to
find out that the function spline does not take into account the order of
the points themselves, but orders them by x.
For instance, I have:
x <- c(262, 275, 264, 250, 247, 242, 238, 233)
y <- c(422, 389, 359, 308, 269, 229, 191, 176)
plot(x, y, xlim=c(0, 500), ylim=c(0,500))
s <- spline(x,y)
2002 Jul 08
0
Hodrick-Prescott-Filter as smooth.spline
Could someone, please, write me, how to compute the spar-value for the
smooth.spline-routine to get the same HP-filtered time-series with a
parameter lambda for a function (see mail "Hodrick-Prescott-Filter
example" from ggrothendieck at yifan.net):
hpf <- function(y,lambda{
eye <- diag(length(y))
d <- diff(eye,d=2)
z <- solve(eye+lambda*crossprod(d),y)}
?
Second, is
2001 Apr 26
3
Installing smooth.spline command
Hello
I have installed R-0.90.1 on my Linux (Redhat 6.2) machine,
unfortunately I am not able to use a number of commands like e.g.
smooth.spline and predict.smooth.spline.
The error messages being given by is:
Error: Object "smooth.spline" not found
With the command library() I have checked or the libraries for the
smoothing functions are there, as shown below.
--------
>
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] -
2006 Sep 08
0
boundary constraints with smooth.spline
Hi R Community.
I would like to use smooth.spline to fit a set of data and constrain the
endpoints of the fit to have specific derivatives. I know this is
possible with cubic splines, but I can't figure out how to specify this
with arguments to the smooth.spline function. In general, is it possible
to specify a set of "knots" w/locations and derivatives to constrain the
fit? I