Learn R Programming

Rdistance (version 4.0.5)

maximize.g: maximize.g - Find coordinate of function maximum

Description

Find the x coordinate that maximizes g(x).

Usage

maximize.g(fit, covars = NULL)

Value

The value of x that maximizes g(x) in fit.

Arguments

fit

An estimated 'dfunc' object produced by dfuncEstim.

covars

Covariate values to calculate g(x).

See Also

dfuncEstim

Examples

Run this code
if (FALSE) {
# Fake data
set.seed(22223333)
x <- rgamma(100, 10, 1)

fit <- dfuncEstim( x, likelihood="Gamma", x.scl="max" )

maximize.g( fit )  # should be near 10.
fit$x.scl            # same thing
}

Run the code above in your browser using DataLab