multiSearch: A multistart version of local searches for parameter...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/qsOpt.R

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

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

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

cores

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

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

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. Multistart searches can be done using a cluster object. Then for each generated/given obervation a number of cores>1 multistart searches is performed in parallel if fun="mclapply" using the local cores of each cluster node.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 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
 

qle documentation built on May 2, 2019, 9:55 a.m.