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

View source: R/maximize.g.r

maximize.gR Documentation

maximize.g - Find coordinate of function maximum

Description

Find the x coordinate that maximizes g(x).

Usage

maximize.g(fit, covars = NULL)

Arguments

fit

An estimated 'dfunc' object produced by dfuncEstim.

covars

Covariate values to calculate g(x).

Value

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

See Also

dfuncEstim

Examples

## Not run: 
# 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

## End(Not run)


tmcd82070/Rdistance documentation built on April 13, 2025, 1:38 p.m.