df.bandwidth.selection.linkfunction: Bandwidth selection of the link function under the null...

Description Usage Arguments Author(s) References Examples

View source: R/df.R

Description

This function computes the optimal bandwidth of the link function under the null hypothesis.

Usage

1
2
df.bandwidth.selection.linkfunction(data.X.H0, data.Y.H0, linkfunction.H0,
		kernel.function = kernel.function.epan, verbose = TRUE)

Arguments

data.X.H0

a numeric data vector used to obtain the nonparametric estimator of the conditional distribution function under the null hypothesis.

data.Y.H0

a numeric data vector used to obtain the nonparametric estimator of the conditional distribution function under the null hypothesis.

linkfunction.H0

regression function under the null hypothesis

kernel.function

kernel function used to obtain the nonparametric estimator of the conditional distribution function. Default option is "kernel.function.epan" which corresponds to the Epanechnikov kernel function.

verbose

If TRUE, the R function plots the link function (regression function) under the null hypothesis and the local linear link function estimation on a same graph. Default option is TRUE.

Author(s)

Romain Azais, Sandie Ferrigno and Marie-Jose Martinez

References

G. R. Ducharme and S. Ferrigno. An omnibus test of goodness-of-fit for conditional distributions with applications to regression models. Journal of Statistical Planning and Inference, 142, 2748:2761, 2012.

R. Azais, S. Ferrigno and M-J Martinez. cvmgof: An R package for Cramer-von Mises goodness-of-fit tests in regression models. Submitted. January 2021.hal-03101612

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Uncomment the following code block
#
# set.seed(1)
#
# # Data simulation
# n = 25 # Dataset size
# data.X = runif(n,min=0,max=5) # X
# data.Y = 0.2*data.X^2-data.X+2+rnorm(n,mean=0,sd=0.3) # Y
#
# ########################################################################
#
# # Bandwidth selection under H0
#
# # We generate a dataset under H0 to estimate the optimal bandwidth under H0
#
# linkfunction.H0 = function(x){0.2*x^2-x+2}
#
# data.X.H0 = runif(n,min=0,max=5)
# data.Y.H0 = linkfunction.H0(data.X.H0)+rnorm(n,mean=0,sd=0.3)
#
# h.opt.df = df.bandwidth.selection.linkfunction(data.X.H0 , data.Y.H0,linkfunction.H0)

cvmgof documentation built on Jan. 16, 2021, 5:40 p.m.