sm.sigma {sm} | R Documentation |
This function uses ideas of local differencing to estimate the standard deviation of the errors in a nonparametric regression model. Simple first-order differencing of pairs of neighbouring observations, or a method based on pseudo-residuals constructed from three neighbouring observations, may be used.
sm.sigma(x, y, diff.ord=2)
x |
a vector of covariate values. |
y |
a vector of response values. |
diff.ord |
an integer defining the degree of differencing to be applied in the esimtation process. When this argument is set to 1, the method of Rice, based on the squared differences of pairs of neighbouring observations, is used. When the argument is set to 2, the method of Gasser, Sroka and Jennen-Steinmetz, based on differences between each observation and a linear interplotation from its two neighbours, is used. |
see Section 4.3 of the reference below.
the estimated standard deviation of the errors.
none.
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.
x <- runif(100,-2, 2) y <- x^2 + rnorm(50) sm.sigma(x, y)