The function estimates the discrete and continuous regression in a single value or in a grid using associated kernels. Different associated kernels are available: extended beta, gamma, lognormal, reciprocal inverse Gaussian (for continuous data), DiracDU (for categorical data), binomial and also discrete triangular (for count data).
reg.fun(Vec, ...)
# S3 method for default
reg.fun(Vec, y, type_data = c("discrete", "continuous"),
ker = c("bino", "triang", "dirDU", "BE", "GA", "LN", "RIG"),
h, x = NULL, a0 = 0, a1 = 1, a = 1, c = 2, ...)
Returns a list containing:
The data sample, explanatory variable
The data sample, response variable
The size of the sample
The asociated kernel
The bandwidth
The grid where the regression is computed
The estimated values
The coefficient of determination
The explanatory variable.
The response variable.
The sample data type.
The associated kernel: "dirDU" DiracDU,"bino" binomial, "triang" discrete triangular, etc.
The bandwidth or smoothing parameter.
The single value or the grid where the regression is computed.
The left bound of the support used for extended beta kernel. Default value is 0 for beta kernel.
The right bound of the support used for extended beta kernel. Default value is 0 for beta kernel.
The arm in Discrete Triangular kernel. The default value is 1.
The number of categories in DiracDU. The default value is 2.
Further arguments
W. E. Wansouwé, S. M. Somé and C. C. Kokonendji
The associated kernel estimator \(\widehat{m}_n\) of \(m\) is defined in the above sections; see also Kokonendji and Senga Kiessé (2011). The bandwidth parameter in the function is obtained using the cross-validation technique for the seven associated kernels. For binomial kernel, the local Bayesian approach is also implemented; see Zougab et al. (2014).
Kokonendji, C.C. and Senga Kiessé, T. (2011). Discrete associated kernel method and extensions, Statistical Methodology 8, 497 - 516.
Kokonendji, C.C., Senga Kiessé, T. and Demétrio, C.G.B. (2009). Appropriate kernel regression on a count explanatory variable and applications, Advances and Applications in Statistics 12, 99 - 125.
Zougab, N., Adjabi, S. and Kokonendji, C.C. (2014). Bayesian approach in nonparametric count regression with binomial kernel, Communications in Statistics - Simulation and Computation 43, 1052 - 1063.
data(milk)
x=milk$week
y=milk$yield
##The bandwidth is the one obtained by cross validation.
h<-0.10
## We choose binomial kernel.
if (FALSE) {
m_n<-reg.fun(x, y, "discrete",ker="bino", h)
}
Run the code above in your browser using DataLab