Type: | Package |
Title: | Variance Estimation using Difference-Based Methods |
Version: | 1.0.0 |
Date: | 2017-03-05 |
Author: | Wenlin Dai <wenlin.dai@kaust.edu.sa>, Tiejun Tong <tongt@hkbu.edu.sa>. |
Maintainer: | Wenlin Dai <wenlin.dai@kaust.edu.sa> |
Description: | Generating functions for both optimal and ordinary difference sequences, and the difference-based estimation functions. |
Depends: | R (≥ 3.3.0) |
License: | GPL-2 |
NeedsCompilation: | no |
Packaged: | 2017-03-05 08:25:29 UTC; daiw0a |
Repository: | CRAN |
Date/Publication: | 2017-03-05 09:44:46 |
Optimal Difference Sequence
Description
Generate an optimal difference sequence with order r(<=10).
Usage
optseq(r)
Arguments
r |
the order of the generated difference sequence. |
Value
The generated optimal difference sequence.
References
Hall, P., Kay, J. W. and Titterington, D. M. (1990). Asymptotically optimal difference-based estimation of variance in nonparametric regression, Biometrika 77: 521 - 528.
Examples
r<-2
optseq(r)
Ordinary Difference Sequence
Description
Generate an ordinary difference sequence with order r.
Usage
ordseq(r)
Arguments
r |
the order of the generated difference sequence. |
Value
The generated ordinary difference sequence.
References
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.
Examples
r<-2
ordseq(r)
Estimate Residual Variance with Differene-Based Method.
Description
Estimate residual variance with differene-based method.
Usage
vardif(x, y, type, r, m)
Arguments
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. |
Value
u |
numeric The estimated variance. |
References
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.
Examples
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)