| Title: | Variance Estimation using Difference-Based Methods |
|---|---|
| Description: | Generating functions for both optimal and ordinary difference sequences, and the difference-based estimation functions. |
| Authors: | Wenlin Dai <[email protected]>, Tiejun Tong <[email protected]>. |
| Maintainer: | Wenlin Dai <[email protected]> |
| License: | GPL-2 |
| Version: | 1.0.0 |
| Built: | 2026-05-07 05:07:03 UTC |
| Source: | https://github.com/cran/VarED |
Generate an optimal difference sequence with order r(<=10).
optseq(r)optseq(r)
r |
the order of the generated difference sequence. |
The generated optimal difference sequence.
Hall, P., Kay, J. W. and Titterington, D. M. (1990). Asymptotically optimal difference-based estimation of variance in nonparametric regression, Biometrika 77: 521 - 528.
r<-2 optseq(r)r<-2 optseq(r)
Generate an ordinary difference sequence with order r.
ordseq(r)ordseq(r)
r |
the order of the generated difference sequence. |
The generated ordinary difference sequence.
Hall, P., Kay, J. W. and Titterington, D. M. (1990). Asymptotically optimal difference-based estimation of variance in nonparametric regression, Biometrika 77: 521 - 528.
Dette, H., Munk, A. and Wagner, T. (1998). Estimating the variance in nonparametric regression - what is a reasonable choice?, Journal of the Royal Statistical Society, Series B 60: 751 - 764.
r<-2 ordseq(r)r<-2 ordseq(r)
Estimate residual variance with differene-based method.
vardif(x, y, type, r, m)vardif(x, y, type, r, m)
x |
numeric Equally spaced design points. |
y |
numeric Responses |
type |
character Taking "opt" or "ord", default as "ord" |
r |
numeric The order of employed difference sequence. |
m |
numeric The bandwidth or the number of regressors. |
u |
numeric The estimated variance. |
Tong, T. and Wang, Y. (2005). Estimating residual variance in nonparametric regression using least squares, Biometrika 92: 821 - 830.
Wenlin Dai, Tiejun Tong and Lixing Zhu (2017) Optimal sequence or ordinary sequence? A unified framework for variance estimation in nonparametric regression, Statistical Science.
x<-1:100/100 y<-5*sin(2*pi*x)+rnorm(100)*0.5 type="ord" r<-2 m<-10 vardif(x,y,type,r,m)x<-1:100/100 y<-5*sin(2*pi*x)+rnorm(100)*0.5 type="ord" r<-2 m<-10 vardif(x,y,type,r,m)