vkgmss.residuals.cdf.estim

From cvmgof v1.0.0 by
0th

Percentile

Kernel estimation of the error distribution

This function computes the kernel (Nadaraya-Watson) estimation of the error distribution.

Usage
vkgmss.residuals.cdf.estim(u, data.X, data.Y, bandwidth,
		kernel.function = kernel.function.epan)
Arguments
u

a numeric vector.

data.X

a numeric data vector used to obtain the nonparametric estimator of the error distribution.

data.Y

a numeric data vector used to obtain the nonparametric estimator of the error distribution.

bandwidth

bandwidth used to obtain the nonparametric estimator of the error distribution.

kernel.function

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

Details

Inappropriate bandwidth or u choices can produce "NaN" values in error distribution estimates.

References

I. Van Keilegom, W. Gonzalez Manteiga, and C. Sanchez Sellero. Goodness-of-fit tests in parametric regression based on the estimation of the error distribution. Test, 17, 401:415, 2008.

R. Azais, S. Ferrigno and M-J Martinez. cvmgof: An R package for Cram<U+00E9>r-von Mises goodness-of-fit tests in regression models. 2018. Preprint in progress.

Aliases
  • vkgmss.residuals.cdf.estim
Examples
# NOT RUN {
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

########################################################################

# Estimation of residuals cdf

bandwidth = 0.75 # Here, the bandwidth is arbitrarily fixed

egrid = seq(-5,5,by=0.1)
res.cdf = vkgmss.residuals.cdf.estim(egrid,data.X,data.Y,0.5)

plot(egrid,res.cdf , type='l',xlab='e',ylab='CDF(e)')

# }
Documentation reproduced from package cvmgof, version 1.0.0, License: CeCILL

Community examples

Looks like there are no examples yet.