View source: R/huber.cumFunc.R
| huber.cumFunc | R Documentation |
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.
huber.cumFunc(x, t1, t2, p, w)
x |
A vector of distances. Can have units or not (i.e., regular numeric). |
t1 |
A vector of values for the |
t2 |
A vector of values for the |
p |
A vector of values for the |
w |
A vector of maximum strip widths, the maximum distance.
If |
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.
huber.like
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.