maxValue: Function value at maximum

Description Usage Arguments Value Author(s) See Also Examples

View source: R/maxValue.R

Description

Returns the function value at (estimated) maximum.

Usage

1
2
3
maxValue(x, ...)
## S3 method for class 'maxim'
maxValue(x, ...)

Arguments

x

a statistical model, or a result of maximisation, created by maxLik, maxNR or another optimizer.

...

further arguments for other methods

Value

numeric, the value of the objective function at maximum. In general, it is the last calculated value in case the process did not converge.

Author(s)

Ott Toomet

See Also

maxLik, maxNR

Examples

1
2
3
4
5
6
## Estimate the exponential distribution parameter:
t <- rexp(100, 2)
loglik <- function(theta) sum(log(theta) - theta*t)
## Estimate with numeric gradient and numeric Hessian
a <- maxNR(loglik, start=1)
maxValue(a)

maxLik documentation built on July 27, 2021, 1:07 a.m.