Displaying 20 results from an estimated 10000 matches similar to: "Loess question"
2005 Feb 05
1
loess problems
I have a problem either understanding what loess is doing or that loess
has a problem itself.
As the x-axis variables become more concentrated on a particular point,the
estimated loess tends to zero????. the examples below show what i am
talking about, why is that? my intution tells me
that it should tend to the mean of the variable which is been smoothed.
Here's a worked up example
x
2005 Oct 07
1
problems with loess
Hi all,
I was unable to obtained a smoothed line using the loess function.
I used the following code reported in the examples of R documentation:
cars.lo <- loess(dist ~ speed, cars)
Then I tried to plot both the data and the smoothed line
plot(cars)
lines(cars.lo)
but what I obtained is simply a broken line joining all the data points.
I tried with different spans, but the results did not
2012 Nov 20
2
Help with loess
Not sure what I'm doing wrong. Can't seem to get loess values. It looks like
loess is returning the same values as the input.
j <-loess(x1$total~as.numeric(index(x1)
plot(x1$total,type='l', ylab='M coms/y global',xlab='')
lines(loess(total~as.numeric(index(x1)),x1))
The plot statement works fine
No errors with the "lines" statement
But I don't
2009 Apr 23
1
Loess over split data
Dear R users,
I am having trouble devising an efficient way to run a loess() function
on all columns of a data.frame (with the x factor remaining the same for
all columns) and I was hoping that someone here could help me fix my
code so that I won't have to resort to using a for loop.
(You'll find the upcoming lines of code in a single block near the end
of the message.)
Here's a
2023 Mar 23
1
loess plotting problem
Thanks, John.
However, loess.smooth() is producing a very different curve compared to the
one that results from applying predict() on a loess(). I am guessing they
are using different defaults. Correct?
On Thu, 23 Mar 2023 at 20:20, John Fox <jfox at mcmaster.ca> wrote:
> Dear Anupam Tyagi,
>
> You didn't include your data, so it's not possible to see exactly what
>
2023 Mar 23
1
loess plotting problem
Dear Anupam Tyagi,
You didn't include your data, so it's not possible to see exactly what
happened, but I think that you misunderstand the object that loess()
returns. It returns a "loess" object with several components, including
the original data in x and y. So if pass the object to lines(), you'll
simply connect the points, and if x isn't sorted, the points
2012 Aug 08
1
Confidence bands around LOESS
Hi Folks,
I'm looking to do Confidence bands around LOESS smoothing curve.
If found the older post about using the Standard error to approximate it
https://stat.ethz.ch/pipermail/r-help/2008-August/170011.html
Also found this one
http://www.r-bloggers.com/sab-r-metrics-basics-of-loess-regression/
But they both seem to be approximations of confidence intervals and I was
wonder if there was
2012 May 03
2
Finding local maxima on a loess surface
If a run a LOESS model and then produce a smoothed surface: Is there any
way to determine the coordinates of the local maxima on the surface?
[[alternative HTML version deleted]]
2023 Mar 23
2
loess plotting problem
For some reason the following code is not plotting as I want it to. I want
to plot a "loess" line plotted over a scatter plot. I get a jumble, with
lines connecting all the points. I had a similar problem with "lowess". I
solved that by dropping "NA" rows from the data columns. Please help.
library(stats)
attach(gini_pci_wdi_narm)
plot(ny_gnp_pcap_pp_kd, si_pov_gini)
2011 Sep 30
2
ggplot2 - extracting values of smooth
Suppose that I'm working on Hadley's diamond dataset and I want to
review the relationship between price, colour and carat.
I might run the following:
library(ggplot2)
#plot scatter and add some hex binning
q<-qplot(carat,price,data=diamonds, geom=c("hex"),
main="Variability of Diamond Prices by Carat and Colour")
#facet to get one scatter for
2011 Sep 05
2
Need more information about VGLM
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20110905/43ff838a/attachment.pl>
2010 May 05
3
Symbolic eigenvalues and eigenvectors
Let's say I had a matrix like this:
library(Ryacas)
x<-Sym("x")
m<-matrix(c(cos (x), sin(x), -sin(x), cos(x)), ncol=2)
How can I use R to obtain the eigenvalues and eigenvectors?
Thanks,
John
[[alternative HTML version deleted]]
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
2011 Mar 24
2
Using C code in R
Hi,
I am new to R and I want to know how to use C code which contains two
functions one called inside another.I know that how to use C code in R if it
has only one function but dont know how to do it in above case. I want to
use the same in R .My C code is as follows.
//#include <R.h>
void sayHello();
void g();
void sayhello() {
Rprintf("Hello world %d\n",global);
}
void
2005 Feb 10
2
rewrite of scatter.smooth to handle NAs
I rewrote scatter.smooth to handle missing values, but I have a question
about a move I had to make. Here's the code:
Mscatter.smooth<-function (x, y, span = 2/3, degree = 1, family =
c("symmetric",
"gaussian"), xlab = deparse(substitute(x)), ylab =
deparse(substitute(y)),
ylim = range(y, prediction$y), evaluation = 50, ...)
{
if (inherits(x,
2008 Feb 03
3
Drawing a loess line
Dear all,
To draw a lowess line on a plot was a piece of cake; to draw a loess
line, however, seems not that easy. Is the loess plotting implemented
at all in relation to the loess function, or do I have to look in
add-on packages?
Thanks,
Marcin
2009 Jul 31
1
function problem
I have a series of columns that need to be evaluated in various tables. I
need to apply a function in the following manner somers2(name1,name2). name1
is a vector of x inputs for the function which correspond to a vector of y
inputs in name2.
y<-rep(c(3,4,5,8),6)
z<-rep(c(23,24,25,26,27,28),4)
name1<-sprintf("Pred_pres_%s_indpdt[,%s,,]",x,y)
2011 Mar 18
1
Difficulty with 'loess' function
Hi,
I am trying to create a loess smooth from hydrologic data. My goal is to
create a smooth line that describes discharge at a certain point in time. I
have done this using the 'lowess' function and had no problem, but I'm
having some difficulty with loess. I am inputting the date ('date') and
discharge ('q') values using the 'scan' function, then inputting
2012 Oct 10
2
history() does not work?
Hi,
> history()
gives Error in savehistory(file) : no history available to save
although I can scroll throu history with C^uparrow an C^downarrow.
How can I make history() work and/or show the current history in a file,
so that I can choose from previous commands?
The web did not throw up anything useful.
TIA --Christian
--
Christian W. Hoffmann,
CH - 8915 Hausen am Albis,
2010 Oct 26
2
anomalies with the loess() function
Hello Masters,
I run the loess() function to obtain local weighted regressions, given
lowess() can't handle NAs, but I don't
improve significantly my situation......, actually loess() performance leave
me much puzzled....
I attach my easy experiment below
#------SCRIPT----------------------------------------------
#I explore the functionalities of lowess() & loess()
#because I have