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

objectiveFn

Optimization Objective Function


Description

This function returns the optimization objective function from a ‘maxim’ object.

Usage

objectiveFn(x, ...)
## S3 method for class 'maxim'
objectiveFn(x, ...)

Arguments

x

an optimization result, inheriting from class ‘maxim’

...

other arguments for methods

Value

function, the function that was optimized. It can be directly called, given that all necessary variables are accessible from the current environment.

Author(s)

Ott Toomet

Examples

hatf <- function(theta) exp(- theta %*% theta)
res <- maxNR(hatf, start=c(0,0))
print(summary(res))
print(objectiveFn(res))
print(objectiveFn(res)(2)) # 0.01832

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.