arguments of the maxima: given a function of some arguments, argmax stands for the values of the arguments that maximizes the function.
Case 1
Here we consider a function f that maps from a limited set.
Say,
f(x) := {13, 42, 1981, 9, 11, 0},
so f(x = 1) = 13,and f(x = 2) = 42, so on.
It is easy to see here that the value of x that maximizes the function f is 3; that is f(x = 3) = 1981 is the highest values. Thus, argmax of f(x) is x = 3.
In R
f = c(13, 42, 1981, 9, 11, 0)
which.max(f)
# 3
Case 2
Here we consider a function of a continues variable.
Consider
f(x) = x(4 - x)
for this function the argmax is x = 2. That is the highest value of f(x) is 4 which corresponds to x = 2.
In R, we can use the optimize
function for this to find the argmax of f.
f <- function(x) {
x*(4 - x)
}
optimize(f, interval = c(-100, 100), maximum = TRUE)
# $maximum
# [1] 2
#
#$objective
#[1] 4