Learn R Programming

maxLik (version 0.5-6)

returnMessage: Information about the optimisation process

Description

This function returns a short message, summarising the outcome of the statistical process, typically optimisation. The message should describe either the type of the convergence, or the problem. returnMessage is a generic function, with methods for various optimisation algorithms.

Usage

returnMessage(x, ...)
## S3 method for class 'maxim':
returnMessage(x, ...)
## S3 method for class 'maxLik':
returnMessage(x, ...)

Arguments

x
object, should orginate from an optimisation problem
...
further arguments to other methods

Value

  • Character string, the message describing the success or failure of the statistical procedure.

Details

The default methods returns component returnMessage.

See Also

returnCode, maxNR

Examples

Run this code
## maximise the exponential bell
f1 <- function(x) exp(-x^2)
a <- maxNR(f1, start=2)
returnMessage(a) # should be success (1 or 2)
## Now try to maximise log() function
f2 <- function(x) log(x)
a <- maxNR(f2, start=2)
returnMessage(a) # should give a failure (4)

Run the code above in your browser using DataLab