Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maxValue

Function value at maximum


Description

Returns the function value at (estimated) maximum.

Usage

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

Examples

## 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

Maximum Likelihood Estimation and Related Tools

v1.4-8
GPL (>= 2)
Authors
Ott Toomet <otoomet@gmail.com>, Arne Henningsen <arne.henningsen@gmail.com>, with contributions from Spencer Graves and Yves Croissant
Initial release
2021-03-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.