loessenv
Loess smooth with upper and lower envelopes for assessing the variance. This finds the loeww smooth based on
the observed data in X and Y. The fitted values are calcuated for the given X0 domain.
Input Arguments:
- X, and Y are vectors containing the observed data.
- X0 is the domain over which to evaluate the smooth.
- ALPHA is the smoothing parameter, ranges between 0 and 1.
- DEG is the degree of the local fit. Use 1 for linear and 2 for quadratic.
- FLAG indicates whether or not the robust loess is used. FLAG = 1 indicates a robust loess. FLAG = 0 indicates
regular loess.
Output Arguments:
- YHAT is the vector of fitted values.
- XLO, YLO is the lower envelope.
- XUP, YUP is the upper envelope.
Synopsis
[YHAT,YLO,XLO,YUP,XUP] = LOESSENV(X,Y,XO,ALPHA,DEG,FLAG)
References:
Cleveland, W. S. and Robert McGill. 1984. “The many faces of a scatterplot,” Journal of the American Statistical
Association, 79:807-822.
EDA Toolbox: Contents