Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MLE

Unconstrained piecewise linear MLE


Description

Given a vector of observations x = (x_1, …, x_m) with pairwise distinct entries and a vector of weights w =(w_1, …, w_m) s.t. ∑_{i=1}^m w_i = 1, this function computes a function \hat φ_{MLE} (represented by the vector (\hat φ_{MLE}(x_i))_{i=1}^m) supported by [x_1, x_m] such that

L(φ) = ∑_{i=1}^m w_i φ(x_i) - ∑_{j=1}^{m-1} (x_{j+1} - x_j) J(φ_j, φ_{j+1})

is maximal over all continuous, piecewise linear functions with knots in {x_1, …, x_m}.

Usage

MLE(x, w = NA, phi_o = NA, prec = 1e-7, print = FALSE)

Arguments

x

Vector of independent and identically distributed numbers, with strictly increasing entries.

w

Optional vector of nonnegative weights corresponding to x_m.

phi_o

Optional starting vector.

prec

Threshold for the directional derivative during the Newton-Raphson procedure.

print

print = TRUE outputs log-likelihood in every loop, print = FALSE does not. Make sure to tell R to output (press CTRL+W).

Value

phi

Resulting column vector (\hat φ_{MLE}(x_i))_{i=1}^m.

L

Value L(\hat φ_{MLE}) of the log-likelihood at \hat φ_{MLE}.

Fhat

Vector of the same length as x with entries \hat F_{MLE,1} = 0 and

\hat F_{MLE,k} = ∑_{j=1}^{k-1} (x_{j+1} - x_j) J(φ_j, φ_{j+1})

for k >= 2.

Note

This function is not intended to be invoked by the end user.

Author(s)


logcondens

Estimate a Log-Concave Probability Density from Iid Observations

v2.1.5
GPL (>= 2)
Authors
Kaspar Rufibach <kaspar.rufibach@gmail.com> and Lutz Duembgen <duembgen@stat.unibe.ch>
Initial release
2016-07-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.