Learn R Programming

dendrometry (version 0.0.4)

create_objective: Create Objective Function for MPS or MLE

Description

Creates the objective function for optimization-based estimation methods. For MLE, returns negative log-likelihood. For MPS, returns negative log-product-spacing with optional ties correction.

Usage

create_objective(method, x, dist, tol_spacing, ties_method, custom_functions)

Value

A function that computes the objective value given parameters.

Arguments

method

character string: "mle" or "mps".

x

numeric vector of sorted data.

dist

character string specifying the distribution.

tol_spacing

numeric tolerance for spacings/densities.

ties_method

character string for ties correction.

custom_functions

list of custom distribution functions.