Allow the user to specify details for the different nonlinear robust regression algorithms in nlrob.

nlrob.control(method,
              psi = c("bisquare", "lqq", "welsh", "optimal", "hampel", "ggw"),
              init = c("S", "lts"),
              optimizer = "JDEoptim", optArgs  = list(),
              ...)

Arguments

method

character string specifying the method

psi

string specifying the psi-function which defines the estimator.

init

for some methods, currently, "MM" only, a string specifying the initial estimator.

optimizer

currently only "JDEoptim" from package DEoptimR.

optArgs

a list of optional arguments to the optimizer. Currently, that is JDEoptim from package DEoptimR.

...

optional arguments depending on method, such as fnscale, tuning.chi or both tuning.chi.tau and tuning.chi.scale; for method = "MM" also optim.control to be passed to the optim(.., hessian=TRUE) call. Internally, nlrob.control() will choose (or check) defaults for the psi/rho/chi related tuning parameters, also depending on the method chosen; see e.g., the ‘Examples’.

Value

a list with several named components. The contents depend quite a bit on the method.

See also

nlrob; for some details, nlrob.algorithms.

Examples

## Show how the different 'method's  have different smart defaults :
str(nlrob.control("MM"))
#> List of 9
#>  $ method          : chr "MM"
#>  $ init            : chr "S"
#>  $ psi             : chr "bisquare"
#>  $ fnscale         : NULL
#>  $ tuning.chi.scale: num 1.55
#>  $ tuning.psi.M    : num 4.69
#>  $ optim.control   : list()
#>  $ optimizer       : chr "JDEoptim"
#>  $ optArgs         : list()
str(nlrob.control("MM", psi = "hampel"))# -> other tuning.psi.M and tuning.chi.scale defaults
#> List of 9
#>  $ method          : chr "MM"
#>  $ init            : chr "S"
#>  $ psi             : chr "hampel"
#>  $ fnscale         : NULL
#>  $ tuning.chi.scale: num [1:3] 0.318 0.742 1.695
#>  $ tuning.psi.M    : num [1:3] 1.35 3.16 7.21
#>  $ optim.control   : list()
#>  $ optimizer       : chr "JDEoptim"
#>  $ optArgs         : list()
str(nlrob.control("MM", psi = "lqq", tol = 1e-10))# other tuning.psi.M & tuning.chi.scale defaults
#> List of 9
#>  $ method          : chr "MM"
#>  $ init            : chr "S"
#>  $ psi             : chr "lqq"
#>  $ fnscale         : NULL
#>  $ tuning.chi.scale: num [1:3] 0.402 0.268 1.5
#>  $ tuning.psi.M    : num [1:3] 1.473 0.982 1.5
#>  $ optim.control   : list()
#>  $ optimizer       : chr "JDEoptim"
#>  $ optArgs         : list()
str(nlrob.control("tau"))
#> List of 7
#>  $ method          : chr "tau"
#>  $ psi             : chr "bisquare"
#>  $ fnscale         : NULL
#>  $ tuning.chi.scale: NULL
#>  $ tuning.chi.tau  : NULL
#>  $ optimizer       : chr "JDEoptim"
#>  $ optArgs         : list()
str(nlrob.control("tau",psi= "lqq"))
#> List of 7
#>  $ method          : chr "tau"
#>  $ psi             : chr "lqq"
#>  $ fnscale         : NULL
#>  $ tuning.chi.scale: NULL
#>  $ tuning.chi.tau  : NULL
#>  $ optimizer       : chr "JDEoptim"
#>  $ optArgs         : list()
str(nlrob.control("CM")) # tuning.chi undefined, unneeded
#> List of 6
#>  $ method    : chr "CM"
#>  $ psi       : chr "bisquare"
#>  $ fnscale   : NULL
#>  $ tuning.chi: NULL
#>  $ optimizer : chr "JDEoptim"
#>  $ optArgs   : list()
str(nlrob.control("CM", psi= "optimal"))
#> List of 6
#>  $ method    : chr "CM"
#>  $ psi       : chr "optimal"
#>  $ fnscale   : NULL
#>  $ tuning.chi: NULL
#>  $ optimizer : chr "JDEoptim"
#>  $ optArgs   : list()
str(nlrob.control("mtl"))
#> List of 5
#>  $ method   : chr "mtl"
#>  $ fnscale  : NULL
#>  $ cutoff   : num 2.5
#>  $ optimizer: chr "JDEoptim"
#>  $ optArgs  : list()