Extract summary results from the optimization procedure.

extract_grid(stanoptim, pars)

# S3 method for Optimization
extract_grid(stanoptim, pars = NULL)

# S3 method for OptimizationList
extract_grid(stanoptim, pars = NULL)

Arguments

stanoptim

An object returned by optimizing.

pars

An optional vector of characters with the name of the quantities to be extracted. The characters strings may include regular expressions. Further, wildcards are automatically translated into regex: ? matches a single character, while * matches any character string including an empty one. For example, ?pred will match both ypred and zpred, and z* will match zstar and zpred. It defaults to all the parameters.

Value

A named matrix with one row for each time the optimization procedure was run. Columns include the seed, the estimated log posterior evaluated at the maximum, the code returned by the optimization algorithm, the time elapsed (user, system and total) in seconds, and the estimated value of the parameters selected in

Methods (by class)

  • Optimization: For Optimization objects, which are returned by optimizing with keep set to best.

  • OptimizationList: For OptimizationList objects, which are returned by optimizing with keep set to all.