Package 'VarED'

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: 2024-11-18 06:42:01 UTC
Source: CRAN

Help Index


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)