returnCode {maxLik} | R Documentation |
This function gives the return code of various optimisation objects. The return code gives a brief information about the success or problems, occured during the optimisation (see documentation for the corresponding function).
returnCode(x, ...) ## Default S3 method: returnCode(x, ...)
x |
object, usually an estimator, achieved by optimisation |
... |
further arguments for other methods |
The default methods returns component returnCode
.
Integer, the success code of optimisation procedure. However, different optimisation routines may define it in a different way.
Ott Toomet, otoomet@ut.ee
## maximise the exponential bell f1 <- function(x) exp(-x^2) a <- maxNR(f1, start=2) returnCode(a) # should be success (1 or 2) ## Now try to maximise log() function f2 <- function(x) log(x) a <- maxNR(f2, start=2) returnCode(a) # should give a failure (4)