Displaying 20 results from an estimated 10000 matches similar to: "loess prediction algorithm"
2013 Jan 08
1
Problem getting loess tricubic weights
Hi
I am trying to get the tricube weights from the loess outputs as I need to
calculate an error function which requires the weight.
So I have used the following example from the R:
cars.lo <- loess(dist ~ speed, cars, span=0.5, degree=1, family="symmetric")
Then i try to get the weights:
cars.lo$weights
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2012 Mar 24
0
Loess CI
I am trying to (semi) calculate the confidence intervals for a loess smoother
(function: loess()), but have been thus far unsuccessful.
The CI for the loess predicted values, yhat, are apparently
yhat +- t*s * sqrt(w^2), where s is the residual sum of squares and w is the
weight function
Correct me of I'm wrong, but R uses the tricubic function (1-abs(z)^3)^3,
where z = (x-xi)/h, where h
2012 Mar 10
1
How to improve the robustness of "loess"? - example included.
Hi,
I posted a message earlier entitled "How to fit a line through the
"Mountain crest" ..."
I figured loess is probably the best way, but it seems that the
problem is the robustness of the fit. Below I paste an example to
illustrate the problem:
tmp=rnorm(2000)
X.background = 5+tmp; Y.background = 5+ (10*tmp+rnorm(2000))
X.specific = 3.5+3*runif(1000);
2009 Aug 20
1
Calculating loess value
Hello,
I'm attempting to evaluate the accuracy of the probability predictions
for my model. As previously discussed here, the AUC is not a good
measure as I'm not concerned with classification accuracy but
probability accurcy.
It was suggested to me that the loess function would be a good measure
to look at.
I can see some libraries (Design) will plot the loess function as a
curve
2012 Apr 03
2
How does predict.loess work?
Dear R community,
I am trying to understand how the predict function, specifically, the
predict.loess function works.
I understand that the loess function calculates regression parameters at
each data point in 'data'.
lo <- loess ( y~x, data)
p <- predict (lo, newdata)
I understand that the predict function predicts values for 'newdata'
according to the loess regression
2007 Feb 08
1
Point estimate from loess contour plot
Hi,
I was wondering if anyone knows of a way by which one can estimate values
from a contour plot created by using the loess function? I am hoping to
use the loess contour plot as a means of interpolation to identify
the loess created values at points at pre-defined (x,y) locations.
Could anyone point me in the right direction please?
Thanks.
Laura Quinn
Institute of Atmospheric Science
School
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)
2010 Oct 05
2
loess and NA
Hi everyone.
I'm trying to do a loess with missing value on independant variable.
doc = c(2.27904, 2.59536, 7.44696, NA, 6.24264, 4.58400, 5.79192, 5.39502,
7.41216, 4.09440, 4.22868, 4.24620, 5.43804, 1.95528);
distance = c(26.5,56.5, 90.3, 123.0, 147.5, 176.0, 215.7, 229.3, 252.0,
325.3, 362.0, 419.3, 454.6, 470.0);
myloess = loess(doc ~ distance, na.action = na.omit);
plot(distance,
2000 Nov 15
2
loess documentation
Hi all,
I 've got a question about the usage of loess in the modreg package.
The documentation (loess.html) states that the smoothing window is
either set by span or enp.target. If span is used, the details section
of the docs state...
<SNIP>
DETAILS
Fitting is done locally. That is, for the fit at point x, the fit is
made using points in a neighbourhood of x, weighted by their
2000 Nov 15
2
loess documentation
Hi all,
I 've got a question about the usage of loess in the modreg package.
The documentation (loess.html) states that the smoothing window is
either set by span or enp.target. If span is used, the details section
of the docs state...
<SNIP>
DETAILS
Fitting is done locally. That is, for the fit at point x, the fit is
made using points in a neighbourhood of x, weighted by their
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
2012 Mar 06
1
LOESS confidence interval
Dear all,
I'm trying to construct confidence intervals for a LOWESS estimation (by not using bootstrapping).
I have checked previous posts and other material online and I understand that the main procedure is:
my.count<- seq(...)
fit<- loess (y ~ x, data=z)
pred<- pred(fit, my.count, se=TRUE)
and then the plotting.
However, it's not working; as confidence
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]]
2007 Feb 13
1
Missing variable in new dataframe for prediction
Hi,
I'm using a loop to evaluate several models by taking adjacent variables from my dataframe.
When i try to get predictions for new values, i get an error message about a missing variable in my new dataframe.
Below is an example adapted from ?gam in mgcv package
library(mgcv)
set.seed(0)
n<-400
sig<-2
x0 <- runif(n, 0, 1)
x1 <- runif(n, 0, 1)
x2 <- runif(n, 0, 1)
x3 <-
2010 May 05
0
A question regarding the loess function
Hello,
I was hoping that someone familiar with the implementation details of the
loess algorithm might be able to help me resolve some difficulties I am
having. I am attempting to reproduce some of the functionality of the
loess() function in C++. My primary motivation is that I would like to
understand the algorithm in detail.
So far I have managed to create a working port in C++ for the
2007 Apr 03
3
Testing additive nonparametric model
I have estimated a multiple nonparametric regression using the loess
command in R. I have also estimated an additive version of the model using
the gam function. Is there a way of using the output of these two models to
test the restrictions imposed by the additive model?
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
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
>
2011 Jul 12
1
LOESS function Newton optimization
I have a question about running an optimization function on an existing LOESS
function defined in R. I have a very large dataset (1 million observations)
and have run a LOESS regression. Now, I want to run a Newton-Raphson
optimization to determine the point at which the slope change is the
greatest.
I am relatively new to R and have tried several permutations of the maxNR
and nlm functions with
2006 Feb 07
2
Prediction method for lowess,loess,lokerns,lpepa,ksmooth
Hi Every Body,
I don't know why some regression functions have no related prediction function. For example lowess, loess, lokerns, lpridge, lpepa, and ksmooth.
What could help? Is there any global or wrapper function so that can help?
Regards,
Amir Safari
---------------------------------
[[alternative HTML version deleted]]