# iterchoiceA: Selection of the number of iterations for iterative bias... In ibr: Iterative Bias Reduction

## Description

The function `iterchoiceA` searches the interval from `mini` to `maxi` for a minimum of the function which calculates the chosen `criterion` (`critAgcv`, `critAaic`, `critAbic`, `critAaicc` or `critAgmdl`) with respect to its first argument (a given iteration `k`) using `optimize`. This function is not intended to be used directly.

## Usage

 ```1 2``` ```iterchoiceA(n, mini, maxi, eigenvaluesA, tPADmdemiY, DdemiPA, ddlmini, ddlmaxi, y, criterion, fraction) ```

## Arguments

 `n` The number of observations. `mini` The lower end point of the interval to be searched. `maxi` The upper end point of the interval to be searched. `eigenvaluesA` Vector of the eigenvalues of the symmetric matrix A. `tPADmdemiY` The transpose of the matrix of eigen vectors of the symmetric matrix A times the inverse of the square root of the diagonal matrix D. `DdemiPA` The square root of the diagonal matrix D times the eigen vectors of the symmetric matrix A. `ddlmini` The number of eigenvalues (numerically) equals to 1. `ddlmaxi` The maximum df. No criterion is calculated and `Inf` is returned. `y` The vector of observations of dependant variable. `criterion` The criteria available are GCV (default, `"gcv"`), AIC (`"aic"`), corrected AIC (`"aicc"`), BIC (`"bic"`) or gMDL (`"gmdl"`). `fraction` The subdivision of the interval [`mini`,`maxi`].

## Details

See the reference for detailed explanation of A and D. The interval [`mini`,`maxi`] is splitted into subintervals using `fraction`. In each subinterval the function `fcriterion` is minimzed using `optimize` (with respect to its first argument) and the minimum (and its argument) of the result of these optimizations is returned.

## Value

A list with components `iter` and `objective` which give the (rounded) optimum number of iterations (between `Kmin` and `Kmax`) and the value of the function at that real point (not rounded).

## Author(s)

Pierre-Andre Cornillon, Nicolas Hengartner and Eric Matzner-Lober.

## References

Cornillon, P.-A.; Hengartner, N.; Jegou, N. and Matzner-Lober, E. (2012) Iterative bias reduction: a comparative study. Statistics and Computing, 23, 777-791.

Cornillon, P.-A.; Hengartner, N. and Matzner-Lober, E. (2013) Recursive bias estimation for multivariate regression smoothers Recursive bias estimation for multivariate regression smoothers. ESAIM: Probability and Statistics, 18, 483-502.

Cornillon, P.-A.; Hengartner, N. and Matzner-Lober, E. (2017) Iterative Bias Reduction Multivariate Smoothing in R: The ibr Package. Journal of Statistical Software, 77, 1–26.

`ibr`, `iterchoiceA`