# Questions tagged [loess]

LOESS (or LOWESS) stands for locally weighted scatterplot smoothing. It is a form of local (k-nearest neighbor) kernel regression

104 questions
Filter by
Sorted by
Tagged with
1 vote
60 views

### Correlation alternatives / How to go about testing this relationship?

I have a large set of temperature data from upstream and downstream gauges. I am trying to find the influence of dam release on downstream temperatures. To do this, I am comparing correlation between ...
47 views

### Manual Calculation using STL Decomposition

Does anyone know how to manually perform calculations using STL Decomposition? I have this data: Date Count 2017-01-31 68 2017-02-28 59 2017-03-31 75 2017-04-30 71 2017-05-31 70 2017-06-30 68 ...
1 vote
37 views

### How can I do GAM piecewise in R? [closed]

I have some data $(x_i,y_i)_{i=1}^N$ which looks like a sigmoid curve in the xy-plane. Kind of like this: I think my data is homoscedastic normal distributed. My data has much larger variance than ...
• 113
62 views

### LOESS using predicted means from a linear mixed model

What aspects do I need to consider when plotting a smooth curve with the LOESS method (geom_smooth) using predicted means from a linear mixed model? My data consists of longitudinal psychological ...
• 43
550 views

### How to obtain seasonally-adjusted time series data using STL in Python

On the section "STL decomposition" in the 2nd edition of Forecasting: Principles and Practice, it says that the seasadj() function can be used to compute ...
• 107
428 views

### How does lowess handle gaps in time series?

I have been using the lowess smoother to calculate trends for time series data for a while now but until now my data was always without gaps. I now have to work with data where there are quite large ...
• 177
79 views

### Assessing differences in slope of a loess (or any smoother) fit

I have continuous data for x (for example "time") and y with several groups. I would like to show/test that the slope of groupC changes over time (is positive and rises) while groups A and B ...
• 29
553 views

### Timeseries - How are the window/span size and 'frac' in LOWESS related?

Many software implementations of locally weighted scatterplot smoothing (LOWESS), such as those in Python and R, require a frac parameter as an input. I am confused as to how frac is mathematically ...
• 105
135 views

### Loess regression on genomic data

I am struggling with R loess function in R. I have a dataframe on which I would locally weighted polynomial regression For each ‘Gene’ is associated a Count (log10 transformed) which gives information ...
1 vote
296 views

### Loess line interpretation

I'm sorry for this noob question, but I'm following a practical to draw a plot of Boston Housing data set after using Gradient Boosting Machine to train the data, but I don't understand how to ...
• 13
1 vote
647 views

### Predicition interval for LOESS smoothed data

Is the concept of a prediction interval for non-parameteric fits such as LOESS meaningful? I can't see why it wouldn't be - and the fact that it is implemented in R also implies it is. https://mclust-...
• 11
7k views

### How do I interpret or explain loess plot?

I used the following R code: ...
• 329
49 views

### Can this be considered as a trend?

I have this time series with a trend line plotted in R using the lowess function, f=0.2 (I couldn't use stl or decompose function because this data is measured annually). Although this seems to fit ...
• 203
1 vote
327 views

### Can I use predictions from LOESS as a form of predictor transformation in logistic regression?

I am wondering if I can use the predictions from LOESS as a form of predictor transformation in logistic regression? For example, if one of the predictors is X, then can I use predict(loess(Y~X)) as a ...
1 vote
45 views

### R comparing effect between two regression lines

I'm trying to make sense of how to do something here in R and how to think through a method to answer a business question. I have an original data frame that has information about advertising money ...
• 89
1 vote
592 views

### R: "family" and "degree" specification in loess fitting

I can't understand the difference between the possible specifications of the family option in the loess command in R. This is ...
• 111
2k views

### Statistics on LOESS smoothing

I'm trying to make sense of a data set which contains thousands of independent measurements of intensity in the form of a scatterplot. These measurements are dependent on two major variables: ...
• 101
1 vote
162 views

### Bootstrapping GAM LOESS models with Multiple Predictors [closed]

I have a data set with multiple predictors and am using a GAM model in conjunction with LOESS. I am trying to replicate this but include the bootstrap process as well. The following code is the ...
• 11
1 vote
722 views

### STL decomposition of a daily time series (only business days)

I'm currently working with a daily (business days) time series which has a monthly seasonality and an overall positive trend over the last two years. I want to estimate the error component of the time ...
• 11
44 views

### Taking the mean of several data entries on same date to make one

I am analyzing the number of likes of several influencers over time and I want to plot it to see if there is a trend. Some influencers post several times on the same date, and then overall several ...
• 1
1 vote
307 views

### What smoothing parameter makes sense for a LOESS calibration curve?

I am creating a calibration curve to asses the fit of a logistic regression. Does it make more sense to use the local or global optimum smoothing parameter for the LOESS line? The orange line uses ...
• 2,176
1 vote
848 views

### How to Assess Linearity assumption of logit in logistic regression

In Applied Lineare Regression, (Hosmer, Lemeshow, Sturdivant 3rd ed.) Ch. 4, they present "Purposeful Selection." Part of step 5 is to assess the validity of the linearity assumption of the logit vs ...
• 1,138
6k views

### How is slope calculated in a calibration plot?

I am using logistic regression with white cell count and temperature as predictors and hospital admission>3 days as the outcome of interest. I'm using the rms package in R to assess calibration (curve ...
• 59
3k views

### Why so much difference in SE areas in these graphs

I am using ggplot with Python for showing regression/correlation. With method='lm' (means "linear model"), I get following graph: And with method='loess', I get following: The width of SE area is ...
• 10.1k
476 views

### Should I use a confidence interval or a prediction interval around the LOESS fitted curve?

A Freakonometrics blog post shows how to use a LOESS regression of the residuals of a logistic model on the predicted values of the logistic model to assess the linearity of the predictors used in the ...
• 2,176
4k views

### What is the difference between Local Linear Regression (LLR) and Locally Estimated Scatterplot Smoothing (LOESS)?

I've looked into nonparametric regression packages in R and Python and came across two estimation methods that are relevant for my problem (i.e. replicating the semiparametric estimation in Carneiro, ...
• 153
132 views

### Loess preprocessing for robust quadratic regression?

It seems to me that we could fit a quadratic curve to the predictions of a LOESS curve in order to obtain a parametric model approximating the non-parametric LOESS model. Is this something that is ...
• 2,277
1 vote
841 views

### What is represented by the y-axis in a loess smoothing curve?

I'm working on the Titanic data and I plotted local regression curves for a couple predictors. ...
• 549
6k views

### Rules of thumb for partial residual (component + residual) plots as diagnostics for linearity?

Here are the standard R diagnostic plots of a multiple linear regression model that includes an autoregressive term at lag-1 (i.e. AR(1)). I have logged & z-scored my input data. Ben Bolker says ...
• 129
1 vote
140 views

### How to detect an increase in a loess model fitted value at the end

Sorry if the question is trivial, but I'm not finding a proper idea for this issue. I'd like to find if a series of fitted value of a loess is increasing in the end. I'm working with some data like ...
• 227
9k views

### Decomposing a time series with some zero values

There are many techniques to decompose a time series into trend, seasonal, and remainder components. I was wondering if these techniques can be applied without worry to time series which have some ...
• 2,147
84 views

### Machine Learning to filter similar loess curves from a large dataset

I think I have a good dataset to apply machine learning. I have a bunch of scatter plots and I generated a loess for each. Each loess is stored as a series of Y coordinates that correspond to X ...
• 101
5k views

### Difficulty plotting a loess smooth: what causes these problems?

I'm very new at this and I don't actually understand the differences between the plotting methods, but loess seems to be giving me the most informative graphs, ...
• 21
207 views

### STL function in R: is it possible to make it backward looking?

I would like to smooth modeling input time series data using the stl function in R. Based on my understanding, the function performs a local regression using data ...
• 125
309 views

### Why does stl() decomposition require integer frequency?

I need to decompose and forecast weekly series with around 10 years of data. In this data leap years play an important role so I need the have non-integer frequency, frequency = (365.25/7) By reading ...
657 views

### Expectation of Median of Absolute Random Variables

Let $X_1, X_2,..., X_n$ from $N(0,\sigma^2)$. What I want to get is not $E(median(|X|))$ , but $E(median(|X_1|,|X_2|,...,|X_n|))$ Reason why I need it is because I'm studying LOWESS, and in using ...
311 views

### Seasonal weights of a time series: stl function versus subtracting average values

Say that we are dealing with a time series of 25 years of daily measurements of a variable with seasonal cycles, e.g. it reaches higher values in winter than in summer. The objective is to compute ...
• 209
947 views

### How are the local polynomials in LOESS regression joined to make a smooth curve?

I am trying to understand LOESS regression. I've read the Wikipedia and Wolfram articles on it, and the R help for the loess() function. I think I understand now how the local polynomials are derived,...
• 151
445 views

### goodness of fit / likelihood of data given model for loess

Question How can I compute the likelihood of a set of data points given a LOESS fit (of the same and/or other data points)? Alternative Are there other (better?) ways to assess how 'good' a LOESS ...
• 119
5k views

### Could the equation of the curve provided by LOESS be obtained?

Considering the LOESS fitting done with the following R code: ...
• 429
2k views

### Use loess regression with many zero values

I have measuments of vegetation coverage on Y plotted against surface height (and hence flooding frequency) on X. The vegetation often has two herb layers, which are estimated seperately. If only one ...
• 207
534 views

### Should I capitalize GAM, MARS and LOESS?

I have to mention GAM (generalized additive models), MARS (multivariate adaptive regression splines), and LOESS in an academic paper. I think GAM and MARS are capitalized in most cases, but not sure ...
• 1,097
2k views

### Explanation of what Nate Silver said about loess

In a question I asked recently, I was told that it was a big "no-no" to extrapolate with loess. But, in Nate Silver's most recent article on FiveThirtyEight.com he discussed using loess for making ...
• 1,077
690 views

### Prediction Interval for Loess Forecast

I have consulted this question on the basis of prediction intervals for loess (How to calculate prediction intervals for LOESS?). However, I am unaware of whether it is proper or possible to use ...
• 1,077
2k views

### Confidence interval of first derivative of a loess smooth

I have plotted the evolution of parameter vs time. I would however prefer to plot the change in these parameter vs time. Here I have seen how to predict a confidence interval for a loess smooth and ...
• 1,019
1 vote
755 views

### Weights in Loess

I have a good working knowledge of how the loess model works but am curious as to how weights work in conjunction with the model. Obviously, this method weights locally, but many statistical packages (...
• 1,077
5k views

### How does a LOESS model do its prediction?

I understand the theory behind LOESS, but how does it do prediction without coefficients? I'd like to use LOESS prediction, but need to be able to explain it.
• 745
8k views

### Fitting a smoothed curve to a noisy data

I have a variable with sales data over time. It is very noisy at a disaggregate level but if you look at it as a whole, you can see a smoothing curve that follows a polynomial pattern. Is there a way ...
• 295
337 views

### Unexpected low values in LOESS regression

The following plot is generated using the scatterplot function from R's car package. The ...
• 151
1 vote