I use the library method loess
of the R programming language for non parametric data fitting. The dataset is two-dimensional. I have not found any proper documentation of the method parameter weights
.
My data points are normally distributed random variables, and I also have an estimate of their respective standard deviations. I am wondering whether the parameter weights
allows me to supply R with the details of the standard deviations. In other words: I wonder whether the individual weights in weights
are (relative) measures of data quality, so that the fit can be improved if some measure of data uncertainty is supplied via the parameter weights
.
EDIT: I suspect the entries in weights
are used as weights in the weighted least squares regressions of local datasets in the LOESS procedure (maybe as additional weight prefactors for the (position dependent) kernel functions?). This would suggest that for the case of data points which are independent normally distributed random variables, but still have different noise levels (i.e. different standard deviations) (as in my case), the weights should be chosen as 1/\sigma_{i}^2
, where \sigma_{i}
is the standard deviation of the respective random variable/data point. If someone knows for sure, that would be nice to know.