reg.fun {Ake} | R Documentation |

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, ...)
## Default S3 method:
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, ...)
```

`Vec` |
The explanatory variable. |

`y` |
The response variable. |

`type_data` |
The sample data type. |

`ker` |
The associated kernel: "dirDU" DiracDU,"bino" binomial, "triang" discrete triangular, etc. |

`h` |
The bandwidth or smoothing parameter. |

`x` |
The single value or the grid where the regression is computed. |

`a0` |
The left bound of the support used for extended beta kernel. Default value is 0 for beta kernel. |

`a1` |
The right bound of the support used for extended beta kernel. Default value is 0 for beta kernel. |

`a` |
The arm in Discrete Triangular kernel. The default value is 1. |

`c` |
The number of categories in DiracDU. The default value is 2. |

`...` |
Further arguments |

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).

Returns a list containing:

`data` |
The data sample, explanatory variable |

`y` |
The data sample, response variable |

`n` |
The size of the sample |

`kernel` |
The asociated kernel |

`h` |
The bandwidth |

`eval.points` |
The grid where the regression is computed |

`m_n` |
The estimated values |

`Coef_det` |
The coefficient of determination |

W. E. Wansouwé, S. M. Somé and C. C. Kokonendji

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.
## Not run:
m_n<-reg.fun(x, y, "discrete",ker="bino", h)
## End(Not run)
```

[Package *Ake* version 1.0.1 Index]