huber.cumFunc: Huber Cumulative Function

View source: R/huber.cumFunc.R

huber.cumFuncR Documentation

Huber Cumulative Function

Description

Computes the cumulative function of the 'huber' likelihood. The cumulative function is proportional to the 'huber' cumulative distribution function, differing only by appropriate scaling constant.

Usage

huber.cumFunc(x, t1, t2, p, w)

Arguments

x

A vector of distances. Can have units or not (i.e., regular numeric).

t1

A vector of values for the \theta_1 parameter of the 'huber' likelihood. If x has units, t1 must have compatible units.

t2

A vector of values for the \theta_2 parameter of the 'huber' likelihood. If x has units, t2 must have compatible units.

p

A vector of values for the p parameter of the 'huber' likelihood. If x has units, p must have units of '[1]' (i.e., setUnits(p,1)).

w

A vector of maximum strip widths, the maximum distance. If x has units, x must have compatible units.

Value

A vector of values from the 'huber' cumulative function. The 'huber' cumulative function is

F(x|\theta_1,\theta_2,p) = \int_0^x f(y|\theta_1,\theta_2,p) dy,

where f(y|\theta_1,\theta_2,p) is Rdistance's 'huber' likelihood. The only difference between this cumulative function, and the cumulative distribution function is the scaling constant. That is, the maximum of the cumulative function is greater than 1 while the maximum cumulative distribution function is exactly 1.

See Also

huber.like

Examples

d <- -10:210

# Cumulative function
fd <- huber.cumFunc(d, 125, 25, .05, 200) 
plot(d, fd, type="l")

# Cumulative distribution function
Fd <- fd / huber.cumFunc(200, 125, 25, .05, 200)


Rdistance documentation built on April 23, 2026, 1:06 a.m.