multiStart: Nonlinear Optimization or Root-Finding with Multiple Starting...

Description Usage Arguments Details Value References See Also Examples

View source: R/multiStart.R

Description

Start BBsolve or BBoptim from multiple starting points to obtain multiple solutions and to test sensitivity to starting values.

Usage

1
2
3
4
5
  multiStart(par, fn, gr=NULL, action = c("solve", "optimize"), 
	method=c(2,3,1),  lower=-Inf, upper=Inf,
	project=NULL, projectArgs=NULL, 
	control=list(),  quiet=FALSE, details=FALSE, ...) 
  

Arguments

par

A real matrix, each row of which is an argument to fn, indicating initial guesses for solving a nonlinear system fn = 0 or for optimizing the objective function fn.

fn

see BBsolve or BBoptim.

gr

Only required for optimization. See BBoptim.

action

A character string indicating whether to solve a nonlinear system or to optimize. Default is “solve”.

method

see BBsolve or BBoptim.

upper

An upper bound for box constraints. See spg

lower

An lower bound for box constraints. See spg

project

A projection function or character string indicating its name. The projection function that takes a point in R^n and projects it onto a region that defines the constraints of the problem. This is a vector-function that takes a real vector as argument and returns a real vector of the same length. See spg for more details.

projectArgs

A list with arguments to the project function.

control

See BBsolve and BBoptim.

quiet

A logical variable (TRUE/FALSE). If TRUE warnings and some additional information printing are suppressed. Default is quiet = FALSE Note that the control variable trace and quiet affect different printing, so if trace is not set to FALSE there will be considerable printed output.

details

Logical indicating if the result should include the full result from BBsolve or BBoptim for each starting value.

...

arguments passed fn (via the optimization algorithm).

Details

The optimization or root-finder is run with each row of par indicating initial guesses.

Value

list with elements par, values, and converged. It optionally returns an attribute called “details”, which is a list as long as the number of starting values, which contains the complete object returned by dfsane or spg for each starting value.

References

R Varadhan and PD Gilbert (2009), BB: An R Package for Solving a Large System of Nonlinear Equations and for Optimizing a High-Dimensional Nonlinear Objective Function, J. Statistical Software, 32:4, http://www.jstatsoft.org/v32/i04/

See Also

BBsolve, BBoptim, dfsane, spg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use a preset seed so the example is reproducable. 
require("setRNG")
old.seed <- setRNG(list(kind="Mersenne-Twister", normal.kind="Inversion",
    seed=1234))

# Finding multiple roots of a nonlinear system
brownlin <- function(x) {
# Brown's almost linear system(A.P. Morgan, ACM 1983)
# two distinct solutions if n is even
# three distinct solutions if n is odd  
  	n <- length(x)
  	f <- rep(NA, n)
	nm1 <- 1:(n-1)
	f[nm1] <- x[nm1] + sum(x) - (n+1)
	f[n] <- prod(x) - 1 
	f
}

p <- 9
n <- 50
p0 <- matrix(rnorm(n*p), n, p)  # n starting values, each of length p
ans <- multiStart(par=p0, fn=brownlin)
pmat <- ans$par[ans$conv, 1:p] # selecting only converged solutions
ord1 <- order(abs(pmat[,1]))
round(pmat[ord1, ], 3)  # all 3 roots can be seen

# An optimization example
rosbkext <- function(x){
n <- length(x)
j <- 2 * (1:(n/2))
jm1 <- j - 1
sum(100 * (x[j] - x[jm1]^2)^2 + (1 - x[jm1])^2)
}

p0 <- rnorm(50)
spg(par=p0, fn=rosbkext)
BBoptim(par=p0, fn=rosbkext)

pmat <- matrix(rnorm(100), 20, 5)  # 20 starting values each of length 5 
ans <- multiStart(par=pmat, fn=rosbkext, action="optimize")
ans
attr(ans, "details")[[1]]  # 

pmat <- ans$par[ans$conv, 1:5] # selecting only converged solutions
round(pmat, 3)

Example output

Loading required package: setRNG
Parameter set :  1 ... 
  Successful convergence.
Parameter set :  2 ... 
  Successful convergence.
Parameter set :  3 ... 
  Successful convergence.
Parameter set :  4 ... 
  Successful convergence.
Parameter set :  5 ... 
  Successful convergence.
Parameter set :  6 ... 
  Successful convergence.
Parameter set :  7 ... 
  Successful convergence.
Parameter set :  8 ... 
  Successful convergence.
Parameter set :  9 ... 
  Successful convergence.
Parameter set :  10 ... 
  Successful convergence.
Parameter set :  11 ... 
  Successful convergence.
Parameter set :  12 ... 
  Successful convergence.
Parameter set :  13 ... 
  Successful convergence.
Parameter set :  14 ... 
  Successful convergence.
Parameter set :  15 ... 
  Successful convergence.
Parameter set :  16 ... 
  Successful convergence.
Parameter set :  17 ... 
  Successful convergence.
Parameter set :  18 ... 
  Successful convergence.
Parameter set :  19 ... 
  Successful convergence.
Parameter set :  20 ... 
  Successful convergence.
Parameter set :  21 ... 
  Successful convergence.
Parameter set :  22 ... 
  Successful convergence.
Parameter set :  23 ... 
  Successful convergence.
Parameter set :  24 ... 
  Successful convergence.
Parameter set :  25 ... 
  Successful convergence.
Parameter set :  26 ... 
  Successful convergence.
Parameter set :  27 ... 
  Successful convergence.
Parameter set :  28 ... 
  Successful convergence.
Parameter set :  29 ... 
  Successful convergence.
Parameter set :  30 ... 
  Successful convergence.
Parameter set :  31 ... 
  Successful convergence.
Parameter set :  32 ... 
  Successful convergence.
Parameter set :  33 ... 
  Successful convergence.
Parameter set :  34 ... 
  Successful convergence.
Parameter set :  35 ... 
  Successful convergence.
Parameter set :  36 ... 
  Successful convergence.
Parameter set :  37 ... 
  Successful convergence.
Parameter set :  38 ... 
  Successful convergence.
Parameter set :  39 ... 
  Successful convergence.
Parameter set :  40 ... 
  Successful convergence.
Parameter set :  41 ... 
  Successful convergence.
Parameter set :  42 ... 
  Successful convergence.
Parameter set :  43 ... 
  Successful convergence.
Parameter set :  44 ... 
  Successful convergence.
Parameter set :  45 ... 
  Successful convergence.
Parameter set :  46 ... 
  Successful convergence.
Parameter set :  47 ... 
  Successful convergence.
Parameter set :  48 ... 
  Successful convergence.
Parameter set :  49 ... 
  Successful convergence.
Parameter set :  50 ... 
  Successful convergence.
        [,1]   [,2]   [,3]   [,4]   [,5]   [,6]   [,7]   [,8]   [,9]
 [1,] -0.705 -0.705 -0.705 -0.705 -0.705 -0.705 -0.705 -0.705 16.347
 [2,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [3,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [4,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [5,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [6,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [7,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [8,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
 [9,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[10,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[11,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[12,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[13,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[14,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[15,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[16,]  0.975  0.975  0.975  0.975  0.975  0.975  0.975  0.975  1.229
[17,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[18,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[19,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[20,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[21,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[22,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[23,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[24,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[25,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[26,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[27,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[28,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[29,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[30,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[31,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[32,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[33,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[34,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[35,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[36,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[37,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[38,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[39,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[40,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[41,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[42,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[43,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[44,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[45,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[46,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[47,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[48,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[49,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
[50,]  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000  1.000
iter:  0  f-value:  22648.33  pgrad:  9061.209 
iter:  10  f-value:  44.83298  pgrad:  168.1783 
iter:  20  f-value:  29.42533  pgrad:  2.073708 
iter:  30  f-value:  26.56617  pgrad:  52.06237 
iter:  40  f-value:  23.01367  pgrad:  6.263308 
iter:  50  f-value:  21.83825  pgrad:  2.040631 
iter:  60  f-value:  18.25856  pgrad:  2.166934 
iter:  70  f-value:  16.78601  pgrad:  2.00985 
iter:  80  f-value:  14.67511  pgrad:  1.701071 
iter:  90  f-value:  11.62743  pgrad:  2.440629 
iter:  100  f-value:  9.914879  pgrad:  3.168448 
iter:  110  f-value:  8.882793  pgrad:  31.73547 
iter:  120  f-value:  7.576571  pgrad:  1.906156 
iter:  130  f-value:  6.864912  pgrad:  1.99973 
iter:  140  f-value:  6.328198  pgrad:  20.60001 
iter:  150  f-value:  5.582651  pgrad:  2.100997 
iter:  160  f-value:  4.727286  pgrad:  1.871804 
iter:  170  f-value:  4.134273  pgrad:  1.568214 
iter:  180  f-value:  2.987975  pgrad:  20.52218 
iter:  190  f-value:  2.623606  pgrad:  0.689513 
iter:  200  f-value:  2.461139  pgrad:  5.85653 
iter:  210  f-value:  2.211638  pgrad:  1.01064 
iter:  220  f-value:  2.13492  pgrad:  0.513771 
iter:  230  f-value:  1.799606  pgrad:  6.160031 
iter:  240  f-value:  1.699531  pgrad:  1.723531 
iter:  250  f-value:  1.638155  pgrad:  0.421163 
iter:  260  f-value:  1.346872  pgrad:  4.516073 
iter:  270  f-value:  1.295948  pgrad:  0.3287437 
iter:  280  f-value:  1.241569  pgrad:  0.3423485 
iter:  290  f-value:  1.003999  pgrad:  0.4740795 
iter:  300  f-value:  0.9668864  pgrad:  0.3245561 
iter:  310  f-value:  0.7856029  pgrad:  0.2984773 
iter:  320  f-value:  0.7358545  pgrad:  0.2307154 
iter:  330  f-value:  0.7062176  pgrad:  6.145852 
iter:  340  f-value:  0.7024254  pgrad:  11.1443 
iter:  350  f-value:  0.6192393  pgrad:  0.2122829 
iter:  360  f-value:  0.590852  pgrad:  0.2078623 
iter:  370  f-value:  0.1914484  pgrad:  0.3003456 
iter:  380  f-value:  0.1832165  pgrad:  0.1156638 
iter:  390  f-value:  0.1676437  pgrad:  0.114445 
iter:  400  f-value:  0.1374987  pgrad:  0.106399 
iter:  410  f-value:  0.1414682  pgrad:  4.007048 
iter:  420  f-value:  0.1207254  pgrad:  0.3420549 
iter:  430  f-value:  0.1175114  pgrad:  0.10141 
iter:  440  f-value:  0.08686819  pgrad:  0.1062418 
iter:  450  f-value:  0.08254599  pgrad:  0.3201123 
iter:  460  f-value:  0.07800522  pgrad:  1.575407 
iter:  470  f-value:  0.07062682  pgrad:  2.791684 
iter:  480  f-value:  0.0628413  pgrad:  0.1299277 
iter:  490  f-value:  0.05238513  pgrad:  7.42971 
iter:  500  f-value:  0.01946227  pgrad:  0.1119249 
iter:  510  f-value:  0.01749382  pgrad:  0.04822032 
iter:  520  f-value:  0.01299227  pgrad:  0.04074298 
iter:  530  f-value:  0.01173887  pgrad:  0.09360855 
iter:  540  f-value:  0.01129308  pgrad:  0.9992779 
iter:  550  f-value:  0.0102092  pgrad:  0.5334276 
iter:  560  f-value:  0.006627701  pgrad:  0.07300872 
iter:  570  f-value:  0.004353487  pgrad:  0.2634308 
iter:  580  f-value:  0.004004913  pgrad:  0.02492965 
iter:  590  f-value:  0.003009892  pgrad:  0.02181283 
iter:  600  f-value:  0.0017318  pgrad:  0.01683172 
iter:  610  f-value:  0.001331618  pgrad:  0.01480588 
iter:  620  f-value:  0.0002272057  pgrad:  0.00631634 
iter:  630  f-value:  2.340518e-05  pgrad:  0.002222858 
iter:  640  f-value:  3.057962e-07  pgrad:  0.01303558 
$par
 [1] 0.9999672 0.9999343 0.9999576 0.9999151 0.9999566 0.9999131 0.9999560
 [8] 0.9999119 0.9999532 0.9999063 0.9999562 0.9999123 0.9999585 0.9999169
[15] 0.9999559 0.9999117 0.9999560 0.9999118 0.9999553 0.9999105 0.9999711
[22] 0.9999421 0.9999564 0.9999126 0.9999559 0.9999118 0.9999531 0.9999062
[29] 0.9999563 0.9999125 0.9999522 0.9999043 0.9999532 0.9999064 1.0000130
[36] 1.0000261 0.9999555 0.9999108 0.9999817 0.9999635 0.9999562 0.9999123
[43] 0.9999562 0.9999123 0.9999547 0.9999093 0.9999675 0.9999349 0.9999852
[50] 0.9999704

$value
[1] 4.133372e-08

$gradient
[1] 3.443613e-05

$fn.reduction
[1] 22648.33

$iter
[1] 642

$feval
[1] 778

$convergence
[1] 0

$message
[1] "Successful convergence"

iter:  0  f-value:  22648.33  pgrad:  9061.209 
iter:  10  f-value:  40.13237  pgrad:  29.92377 
iter:  20  f-value:  29.65503  pgrad:  2.084342 
iter:  30  f-value:  24.15897  pgrad:  2.028767 
iter:  40  f-value:  22.05032  pgrad:  2.059338 
iter:  50  f-value:  19.63944  pgrad:  2.044971 
iter:  60  f-value:  17.54232  pgrad:  2.083767 
iter:  70  f-value:  16.73025  pgrad:  2.004452 
iter:  80  f-value:  14.23287  pgrad:  1.897868 
iter:  90  f-value:  13.45627  pgrad:  1.792503 
iter:  100  f-value:  10.14956  pgrad:  2.049154 
iter:  110  f-value:  11.60104  pgrad:  25.25272 
iter:  120  f-value:  5.646377  pgrad:  2.106924 
iter:  130  f-value:  4.698865  pgrad:  1.920606 
iter:  140  f-value:  3.825852  pgrad:  1.852113 
iter:  150  f-value:  3.586715  pgrad:  1.232265 
iter:  160  f-value:  1.74063  pgrad:  0.6242387 
iter:  170  f-value:  1.686722  pgrad:  0.4283466 
iter:  180  f-value:  1.481776  pgrad:  0.3898767 
iter:  190  f-value:  1.280082  pgrad:  0.3417461 
iter:  200  f-value:  0.6583132  pgrad:  0.2120633 
iter:  210  f-value:  0.5228338  pgrad:  1.904417 
iter:  220  f-value:  0.4583797  pgrad:  0.165238 
iter:  230  f-value:  0.3408936  pgrad:  2.653384 
iter:  240  f-value:  0.3160754  pgrad:  0.132524 
iter:  250  f-value:  0.213777  pgrad:  0.132754 
iter:  260  f-value:  0.1566734  pgrad:  1.005709 
iter:  270  f-value:  0.1375318  pgrad:  0.1962938 
iter:  280  f-value:  0.1276687  pgrad:  0.115445 
iter:  290  f-value:  0.06870504  pgrad:  0.08940269 
iter:  300  f-value:  0.05673515  pgrad:  0.08451464 
iter:  310  f-value:  0.009130962  pgrad:  0.2581156 
iter:  320  f-value:  0.005917028  pgrad:  0.03364445 
iter:  330  f-value:  8.363714e-06  pgrad:  0.003680363 
  Successful convergence.
$par
 [1] 0.9999700 0.9999400 0.9999703 0.9999405 0.9999703 0.9999406 0.9999703
 [8] 0.9999406 0.9999704 0.9999408 0.9999703 0.9999406 0.9999703 0.9999405
[15] 0.9999703 0.9999406 0.9999703 0.9999406 0.9999703 0.9999407 0.9999699
[22] 0.9999398 0.9999703 0.9999406 0.9999703 0.9999406 0.9999704 0.9999408
[29] 0.9999703 0.9999406 0.9999704 0.9999408 0.9999704 0.9999408 0.9999687
[36] 0.9999374 0.9999703 0.9999406 0.9999697 0.9999394 0.9999703 0.9999406
[43] 0.9999703 0.9999406 0.9999704 0.9999407 0.9999700 0.9999400 0.9999697
[50] 0.9999393

$value
[1] 2.223557e-08

$gradient
[1] 1.429335e-06

$fn.reduction
[1] 22648.33

$iter
[1] 337

$feval
[1] 338

$convergence
[1] 0

$message
[1] "Successful convergence"

$cpar
method      M 
     2     50 

Parameter set :  1 ... 
iter:  0  f-value:  104.1477  pgrad:  195.7775 
iter:  10  f-value:  0.8165461  pgrad:  1.691339 
iter:  20  f-value:  0.3660929  pgrad:  0.6701369 
iter:  30  f-value:  0.1948056  pgrad:  3.295041 
iter:  40  f-value:  0.03397907  pgrad:  0.2969536 
iter:  50  f-value:  0.03081283  pgrad:  0.1332274 
iter:  60  f-value:  0.006901353  pgrad:  0.05083775 
iter:  70  f-value:  0.0005085973  pgrad:  0.02791898 
iter:  80  f-value:  3.46663e-05  pgrad:  0.003696932 
  Successful convergence.
Parameter set :  2 ... 
iter:  0  f-value:  1043.794  pgrad:  1446.276 
iter:  10  f-value:  2.737732  pgrad:  1.673578 
iter:  20  f-value:  1.707397  pgrad:  2.12588 
iter:  30  f-value:  0.7376359  pgrad:  1.054303 
iter:  40  f-value:  0.6052184  pgrad:  14.46225 
iter:  50  f-value:  0.1062305  pgrad:  0.2269856 
iter:  60  f-value:  0.129  pgrad:  10.58344 
iter:  70  f-value:  3.347751e-06  pgrad:  0.00101306 
  Successful convergence.
Parameter set :  3 ... 
iter:  0  f-value:  118.5023  pgrad:  226.2174 
iter:  10  f-value:  1.544505  pgrad:  2.058662 
iter:  20  f-value:  1.042624  pgrad:  1.982083 
iter:  30  f-value:  0.5748645  pgrad:  6.803917 
iter:  40  f-value:  0.2663864  pgrad:  0.5238955 
iter:  50  f-value:  0.09414201  pgrad:  0.2876652 
iter:  60  f-value:  0.01393715  pgrad:  0.1003782 
iter:  70  f-value:  0.005687909  pgrad:  0.06244017 
iter:  80  f-value:  0.01253125  pgrad:  4.223294 
iter:  90  f-value:  8.144976e-06  pgrad:  0.002220145 
  Successful convergence.
Parameter set :  4 ... 
iter:  0  f-value:  3.438234  pgrad:  21.56433 
iter:  10  f-value:  1.160692  pgrad:  4.846107 
iter:  20  f-value:  0.6238095  pgrad:  4.638383 
iter:  30  f-value:  0.3261322  pgrad:  5.303616 
iter:  40  f-value:  0.1370613  pgrad:  6.31439 
iter:  50  f-value:  0.05995255  pgrad:  5.840455 
iter:  60  f-value:  0.001563663  pgrad:  0.7089548 
iter:  70  f-value:  0.0002575129  pgrad:  0.009598437 
  Successful convergence.
Parameter set :  5 ... 
iter:  0  f-value:  1504.554  pgrad:  2749.706 
iter:  10  f-value:  3.520653  pgrad:  1.61283 
iter:  20  f-value:  2.877953  pgrad:  1.580511 
iter:  30  f-value:  2.164019  pgrad:  1.611121 
iter:  40  f-value:  4.529342  pgrad:  32.99485 
iter:  50  f-value:  1.224356  pgrad:  2.11142 
iter:  60  f-value:  0.8293356  pgrad:  1.754804 
iter:  70  f-value:  0.4338205  pgrad:  1.227703 
iter:  80  f-value:  0.3383105  pgrad:  0.6689532 
iter:  90  f-value:  0.2322107  pgrad:  9.774733 
iter:  100  f-value:  0.01032914  pgrad:  0.08242389 
iter:  110  f-value:  0.01756212  pgrad:  4.194925 
iter:  120  f-value:  0.003351996  pgrad:  0.04558846 
iter:  130  f-value:  0.0005658241  pgrad:  0.0183096 
iter:  140  f-value:  0.01210931  pgrad:  4.355415 
  Successful convergence.
Parameter set :  6 ... 
iter:  0  f-value:  89.85157  pgrad:  181.4924 
iter:  10  f-value:  4.993377  pgrad:  1.613387 
iter:  20  f-value:  3.852569  pgrad:  1.620627 
iter:  30  f-value:  0.6696012  pgrad:  1.338925 
iter:  40  f-value:  0.3486178  pgrad:  0.6238029 
iter:  50  f-value:  0.253394  pgrad:  0.471531 
iter:  60  f-value:  0.1569684  pgrad:  0.3468646 
iter:  70  f-value:  0.05717632  pgrad:  0.194028 
iter:  80  f-value:  0.002223493  pgrad:  0.03174228 
iter:  90  f-value:  0.01307329  pgrad:  3.935886 
  Successful convergence.
Parameter set :  7 ... 
iter:  0  f-value:  2553.425  pgrad:  3161.945 
iter:  10  f-value:  3.287716  pgrad:  2.100978 
iter:  20  f-value:  2.323605  pgrad:  2.061737 
iter:  30  f-value:  1.22322  pgrad:  2.440811 
iter:  40  f-value:  0.7073892  pgrad:  0.8351592 
iter:  50  f-value:  0.1609366  pgrad:  0.7610845 
iter:  60  f-value:  0.007220043  pgrad:  2.257647 
iter:  70  f-value:  5.743478e-07  pgrad:  0.0004048528 
  Successful convergence.
Parameter set :  8 ... 
iter:  0  f-value:  7.301386  pgrad:  50.49826 
iter:  10  f-value:  0.4876734  pgrad:  0.6070551 
iter:  20  f-value:  0.2424819  pgrad:  3.883128 
iter:  30  f-value:  0.05690639  pgrad:  0.1565022 
iter:  40  f-value:  9.563579e-05  pgrad:  0.005619649 
  Successful convergence.
Parameter set :  9 ... 
iter:  0  f-value:  97.45441  pgrad:  234.7565 
iter:  10  f-value:  0.4877573  pgrad:  1.020726 
iter:  20  f-value:  0.1865057  pgrad:  0.5415518 
iter:  30  f-value:  0.1315637  pgrad:  0.3539517 
iter:  40  f-value:  0.07136122  pgrad:  0.2486395 
iter:  50  f-value:  0.0427114  pgrad:  0.1848895 
iter:  60  f-value:  0.03879811  pgrad:  0.1765162 
iter:  70  f-value:  0.01747809  pgrad:  0.2651659 
iter:  80  f-value:  0.01392243  pgrad:  0.1011329 
iter:  90  f-value:  0.01635814  pgrad:  2.888483 
iter:  100  f-value:  0.003261127  pgrad:  0.04737148 
iter:  110  f-value:  0.01097115  pgrad:  4.169896 
  Successful convergence.
Parameter set :  10 ... 
iter:  0  f-value:  176.7632  pgrad:  334.1628 
iter:  10  f-value:  1.817845  pgrad:  2.074538 
iter:  20  f-value:  1.041073  pgrad:  1.298292 
iter:  30  f-value:  0.3539918  pgrad:  0.7796873 
iter:  40  f-value:  0.0745093  pgrad:  6.304562 
iter:  50  f-value:  0.0003067417  pgrad:  0.009971132 
  Successful convergence.
Parameter set :  11 ... 
iter:  0  f-value:  558.4307  pgrad:  1202.867 
iter:  10  f-value:  10.22346  pgrad:  53.95344 
iter:  20  f-value:  1.957312  pgrad:  2.139882 
iter:  30  f-value:  1.132162  pgrad:  1.63763 
iter:  40  f-value:  0.6903289  pgrad:  1.115213 
iter:  50  f-value:  0.3360284  pgrad:  0.4902542 
iter:  60  f-value:  0.06463214  pgrad:  0.1659278 
iter:  70  f-value:  2.2056e-05  pgrad:  0.007548476 
  Successful convergence.
Parameter set :  12 ... 
iter:  0  f-value:  936.7399  pgrad:  1381.4 
iter:  10  f-value:  3.791033  pgrad:  10.22923 
iter:  20  f-value:  2.481176  pgrad:  1.565749 
iter:  30  f-value:  1.848268  pgrad:  1.817987 
iter:  40  f-value:  1.539006  pgrad:  2.018057 
iter:  50  f-value:  1.147663  pgrad:  2.088939 
iter:  60  f-value:  0.8899576  pgrad:  1.848375 
iter:  70  f-value:  0.3315418  pgrad:  4.199062 
iter:  80  f-value:  0.2255326  pgrad:  1.4914 
iter:  90  f-value:  0.2123317  pgrad:  0.4528963 
iter:  100  f-value:  0.04973951  pgrad:  0.1968087 
iter:  110  f-value:  0.0124454  pgrad:  0.09117443 
iter:  120  f-value:  0.0001859101  pgrad:  0.01256614 
  Successful convergence.
Parameter set :  13 ... 
iter:  0  f-value:  116.0656  pgrad:  467.5044 
iter:  10  f-value:  1.945429  pgrad:  2.08734 
iter:  20  f-value:  0.7791629  pgrad:  1.02835 
iter:  30  f-value:  0.4993475  pgrad:  0.6020762 
iter:  40  f-value:  0.1458184  pgrad:  0.3209832 
iter:  50  f-value:  0.0305428  pgrad:  5.139955 
iter:  60  f-value:  4.704206e-07  pgrad:  0.0003640162 
  Successful convergence.
Parameter set :  14 ... 
iter:  0  f-value:  158.3783  pgrad:  310.6516 
iter:  10  f-value:  1.233519  pgrad:  2.103569 
iter:  20  f-value:  0.8147884  pgrad:  17.53057 
iter:  30  f-value:  0.5689345  pgrad:  1.090678 
iter:  40  f-value:  0.2180282  pgrad:  0.3935711 
iter:  50  f-value:  0.1540431  pgrad:  4.261513 
iter:  60  f-value:  0.1201162  pgrad:  0.2838095 
iter:  70  f-value:  0.07007922  pgrad:  0.8969035 
iter:  80  f-value:  0.06464419  pgrad:  0.1881796 
iter:  90  f-value:  0.04395621  pgrad:  0.1466053 
iter:  100  f-value:  0.03089696  pgrad:  0.457613 
iter:  110  f-value:  0.02483754  pgrad:  0.102058 
iter:  120  f-value:  0.01280933  pgrad:  0.3240663 
iter:  130  f-value:  0.008748824  pgrad:  0.0543076 
iter:  140  f-value:  0.0005616496  pgrad:  0.6241075 
iter:  150  f-value:  4.384569e-05  pgrad:  0.004445839 
iter:  160  f-value:  1.805938e-09  pgrad:  1.906689e-05 
  Successful convergence.
Parameter set :  15 ... 
iter:  0  f-value:  102.838  pgrad:  190.781 
iter:  10  f-value:  2.725574  pgrad:  2.147047 
iter:  20  f-value:  1.684569  pgrad:  2.149739 
iter:  30  f-value:  0.8545071  pgrad:  4.062114 
iter:  40  f-value:  0.5186857  pgrad:  0.5901075 
iter:  50  f-value:  0.08392794  pgrad:  0.370899 
iter:  60  f-value:  0.005359188  pgrad:  2.108803 
  Successful convergence.
Parameter set :  16 ... 
iter:  0  f-value:  513.5289  pgrad:  684.5052 
iter:  10  f-value:  1.109876  pgrad:  1.229066 
iter:  20  f-value:  0.2733764  pgrad:  0.3807037 
iter:  30  f-value:  0.1347278  pgrad:  9.811595 
iter:  40  f-value:  8.692025e-06  pgrad:  0.001645287 
  Successful convergence.
Parameter set :  17 ... 
iter:  0  f-value:  5781.69  pgrad:  8216.68 
iter:  10  f-value:  2958.348  pgrad:  2595.746 
iter:  20  f-value:  2.205485  pgrad:  16.35224 
iter:  30  f-value:  0.3015938  pgrad:  0.3812378 
iter:  40  f-value:  0.004954546  pgrad:  0.04162067 
iter:  50  f-value:  0.009318093  pgrad:  2.72599 
  Successful convergence.
Parameter set :  18 ... 
iter:  0  f-value:  10769.93  pgrad:  11885.55 
iter:  10  f-value:  1.086693  pgrad:  1.944855 
iter:  20  f-value:  0.5642495  pgrad:  3.709624 
iter:  30  f-value:  0.3503109  pgrad:  0.5451841 
iter:  40  f-value:  0.1757639  pgrad:  0.3478917 
iter:  50  f-value:  0.06314237  pgrad:  3.063494 
iter:  60  f-value:  0.01987791  pgrad:  0.09774254 
iter:  70  f-value:  1.594943e-06  pgrad:  0.003916945 
  Successful convergence.
Parameter set :  19 ... 
iter:  0  f-value:  213.8751  pgrad:  509.3601 
iter:  10  f-value:  1.233618  pgrad:  1.574912 
iter:  20  f-value:  0.4427763  pgrad:  1.342841 
iter:  30  f-value:  0.1468199  pgrad:  0.7130403 
iter:  40  f-value:  0.009736555  pgrad:  0.05829691 
iter:  50  f-value:  5.906892e-08  pgrad:  0.0003150453 
  Successful convergence.
Parameter set :  20 ... 
iter:  0  f-value:  381.5038  pgrad:  717.5239 
iter:  10  f-value:  1.041809  pgrad:  1.821658 
iter:  20  f-value:  0.7302731  pgrad:  4.555018 
iter:  30  f-value:  0.5153623  pgrad:  0.8002466 
iter:  40  f-value:  0.1290155  pgrad:  0.4946614 
iter:  50  f-value:  0.04967761  pgrad:  0.156249 
iter:  60  f-value:  0.001800669  pgrad:  0.02640828 
iter:  70  f-value:  0.001448272  pgrad:  1.101689 
  Successful convergence.
$par
           [,1]      [,2]      [,3]      [,4]        [,5]
 [1,] 0.9999871 0.9999743 0.9999736 0.9999471 -0.96211903
 [2,] 0.9999692 0.9999383 0.9999692 0.9999383  0.47463463
 [3,] 0.9999735 0.9999470 0.9999585 0.9999169  0.35175427
 [4,] 0.9999541 0.9999080 0.9999541 0.9999082 -0.10702036
 [5,] 0.9999700 0.9999398 0.9999699 0.9999398  0.53751726
 [6,] 0.9999431 0.9998860 0.9999395 0.9998788 -0.60210490
 [7,] 0.9999699 0.9999398 0.9999699 0.9999398 -2.02329765
 [8,] 0.9999149 0.9998295 0.9999147 0.9998291  1.15442128
 [9,] 0.9999686 0.9999371 0.9999700 0.9999400 -0.23069300
[10,] 0.9997891 0.9995774 0.9997890 0.9995773 -0.36508877
[11,] 0.9999589 0.9999176 0.9999588 0.9999176  0.15751793
[12,] 0.9996967 0.9993924 0.9998152 0.9996297  0.76593222
[13,] 0.9999699 0.9999398 0.9999699 0.9999398  0.42608697
[14,] 0.9999703 0.9999403 0.9999706 0.9999410  0.92726540
[15,] 0.9999019 0.9998035 0.9999019 0.9998036  0.04613459
[16,] 0.9999665 0.9999330 0.9999665 0.9999330 -0.50428564
[17,] 0.9999615 0.9999228 0.9999615 0.9999228 -0.30044941
[18,] 0.9999697 0.9999394 0.9999697 0.9999394  0.82291598
[19,] 0.9998285 0.9996564 0.9998284 0.9996563 -0.84926880
[20,] 0.9999693 0.9999385 0.9999692 0.9999384 -0.95361010

$fvalue
 [1] 8.638806e-10 1.901873e-09 2.423288e-09 4.216728e-09 1.806844e-09
 [6] 6.911578e-09 1.809587e-09 1.454471e-08 1.886645e-09 8.911840e-08
[11] 3.387040e-09 1.263133e-07 1.808496e-09 1.761743e-09 1.926060e-08
[16] 2.239977e-09 2.971137e-09 1.832471e-09 5.892285e-08 1.892542e-09

$converged
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[16] TRUE TRUE TRUE TRUE TRUE

NULL
      [,1]  [,2] [,3] [,4]   [,5]
 [1,]    1 1.000    1    1 -0.962
 [2,]    1 1.000    1    1  0.475
 [3,]    1 1.000    1    1  0.352
 [4,]    1 1.000    1    1 -0.107
 [5,]    1 1.000    1    1  0.538
 [6,]    1 1.000    1    1 -0.602
 [7,]    1 1.000    1    1 -2.023
 [8,]    1 1.000    1    1  1.154
 [9,]    1 1.000    1    1 -0.231
[10,]    1 1.000    1    1 -0.365
[11,]    1 1.000    1    1  0.158
[12,]    1 0.999    1    1  0.766
[13,]    1 1.000    1    1  0.426
[14,]    1 1.000    1    1  0.927
[15,]    1 1.000    1    1  0.046
[16,]    1 1.000    1    1 -0.504
[17,]    1 1.000    1    1 -0.300
[18,]    1 1.000    1    1  0.823
[19,]    1 1.000    1    1 -0.849
[20,]    1 1.000    1    1 -0.954

BB documentation built on May 30, 2017, 2:49 a.m.