create_objective: Create Objective Function for MPS or MLE

View source: R/fit_distributions.R

create_objectiveR Documentation

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)

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.

Value

A function that computes the objective value given parameters.


dendrometry documentation built on Nov. 5, 2025, 5:23 p.m.