Main Content

statget

Access values in statistics options structure

Syntax

val = statget(options,param)
val = statget(options,param,default)

Description

val = statget(options,param) returns the value of the parameter specified by param in the statistics options structure options. The input param is a character vector or a string scalar of the parameter name. If the parameter is undefined in options, statget returns []. You need to type only enough leading characters to define the parameter name uniquely. statget ignores case for parameter names. For available options, see Inputs.

val = statget(options,param,default) returns default if the specified parameter is undefined in the optimization options structure options.

Input Arguments

DerivStep

Relative difference used in finite difference derivative calculations. A positive scalar, or a vector of positive scalars the same size as the vector of parameters estimated by the Statistics and Machine Learning Toolbox™ function using the options structure.

Display

Amount of information displayed by the algorithm.

  • 'off' — Displays no information.

  • 'final' — Displays the final output.

  • 'iter' — Displays iterative output to the command window for some functions; otherwise displays the final output.

FunValCheck

Check for invalid values, such as NaN or Inf, from the objective function.

  • 'off'

  • 'on'

GradObj

Flags whether the objective function returns a gradient vector as a second output.

  • 'off'

  • 'on'

Jacobian

Flags whether the objective function returns a Jacobian as a second output.

  • 'off'

  • 'on'

MaxFunEvals

Maximum number of objective function evaluations allowed. Positive integer.

MaxIter

Maximum number of iterations allowed. Positive integer.

OutputFcn

The solver calls all output functions after each iteration.

  • Function handle specified using @

  • a cell array with function handles

  • an empty array (default)

Robust

Invoke robust fitting option.

  • 'off'

  • 'on'

RobustWgtFun

A weight function for robust fitting. Valid only when Robust is 'on'. Can also be a function handle that accepts a normalized residual as input and returns the robust weights as output.

  • 'bisquare'

  • 'andrews'

  • 'cauchy'

  • 'fair'

  • 'huber'

  • 'logistic'

  • 'talwar'

  • 'welsch'

Streams

A single instance of the RandStream class, or a cell array of RandStream instances. The Streams option is accepted by some functions to govern what stream(s) to use in generating random numbers within the function. If 'UseSubstreams' is true, the Streams value must be a scalar, or must be empty. If 'UseParallel' is true and 'UseSubstreams' is false, then the Streams argument must either be empty, or its length must match the number of processors used in the computation: equal to the parpool size if a parpool is open, a scalar otherwise.

TolBnd

Parameter bound tolerance. Positive scalar.

TolFun

Termination tolerance for the objective function value. Positive scalar.

TolTypeFun

Use TolFun for absolute or relative objective function tolerances.

  • 'abs'

  • 'rel'

TolTypeX

Use TolX for absolute or relative parameter tolerances.

  • 'abs'

  • 'rel'

TolX

Termination tolerance for the parameters. Positive scalar.

Tune

The tuning constant used in robust fitting to normalize the residuals before applying the weight function. The default value depends upon the weight function. This parameter is necessary if you specify the weight function as a function handle. Positive scalar.

UseParallel

Flag indicating whether eligible functions should use capabilities of the Parallel Computing Toolbox™ (PCT), if the capabilities are available. That is, if the PCT is installed, and a PCT parpool is in effect. Valid values are false (the default), for serial computation, and true, for parallel computation.

UseSubstreams

Flag indicating whether the random number generator in eligible functions should use Substream property of the RandStream class. false (default) or true. When true, high level iterations within the function will set the Substream property to the value of the iteration. This behavior helps to generate reproducible random number streams in parallel and/or serial mode computation.

WgtFun

A weight function for robust fitting. Valid only when Robust is 'on'. Can also be a function handle that accepts a normalized residual as input and returns the robust weights as output.

  • 'bisquare'

  • 'andrews'

  • 'cauchy'

  • 'fair'

  • 'huber'

  • 'logistic'

  • 'talwar'

  • 'welsch'

Examples

This statement returns the value of the Display statistics options parameter from the structure called my_options.

val = statget(my_options,'Display')

Return the value of the Display statistics options parameter from the structure called my_options (as in the previous example). If the Display parameter is undefined, statget returns the value 'final'.

optnew = statget(my_options,'Display','final');

Version History

Introduced before R2006a

See Also