sm.sigma {sm}R Documentation

Estimation of the error standard deviation in nonparametric regression

Description

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.

Usage

sm.sigma(x, y, diff.ord=2)

Arguments

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.

Details

see Section 4.3 of the reference below.

Value

the estimated standard deviation of the errors.

Side Effects

none.

References

Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.

See Also

sm.regression, sm.ancova

Examples

x <- runif(100,-2, 2)
y <- x^2 + rnorm(50)
sm.sigma(x, y)

[Package Contents]