multiSearch {qle}R Documentation

A multistart version of local searches for parameter estimation

Description

The function is a multistart version of searchMinimizer which selects the best root of the quasi-score (if there is any) or a local minimum from all found minima according to the criteria described in the vignette.

Usage

multiSearch(x0 = NULL, qsd, ..., nstart = 10, optInfo = FALSE,
  multi.start = FALSE, cl = NULL, pl = 0L, verbose = FALSE,
  cores = getOption("mc.cores", 2L))

Arguments

x0

numeric, NULL default, list, vector or matrix of starting parameters

qsd

object of class QLmodel

...

arguments passed to searchMinimizer

nstart

number of random samples from which to start local searches (if 'x0'=NULL, then ignored)

optInfo

logical, FALSE (default), whether to store original local search results

multi.start

logical, FALSE (default), whether to perform a multistart local search always otherwise only if first local search did not converge

cl

cluster object, NULL (default), of class MPIcluster, SOCKcluster, cluster

pl

print level, use pl>0 to print intermediate results

verbose

if TRUE (default), print intermediate output

cores

integer, number of local CPU cores used, default is options(mc.cores,1L)

Details

The function performs a number of local searches depending which local method 'method' was passed to searchMinimizer. Either the starting points are given by 'x0' or are generated as an augmented design based on the sample set stored in 'qsd'. The function evaluates all found solutions and selects the one which is best according to the criteria defined in the vignette. If none of the criteria match, then the parameter for which the lowest value of the criterion function was found is returned.

Value

Object of class QSResult and attribute 'roots', i.e. the matrix of estimated parameters for which any of the available minimization methods has been successfully applied. If 'codeoptInfo' is TRUE, then the originally estimtation reuslts are also returned. The best solution is stored as an attribute named 'par' if found any.

Author(s)

M. Baaske

See Also

checkMultRoot

Examples

 data(normal)
 x0 <- c("mu"=3.5,"sigma"=1.5)
 S0 <- multiSearch(x0=x0,qsd,method=c("qscoring","bobyqa"),
           opts=list("ftol_stop"=1e-9,"score_tol"=1e-3),nstart=4,
            optInfo=TRUE,verbose=TRUE)

 roots <- attr(S0,"roots")
 id <- attr(roots,"id")
 stopifnot(!is.na(id)) 
 id  # index of best root found in matrix roots
 attr(roots,"par")  # the final parameter estimate w.r.t. id
 

[Package qle version 0.17-3 Index]