norm2ll: Normal - Two Log-Likelihood

Description Usage Arguments Details Author(s) References See Also

View source: R/norm.R

Description

Calculates the two log-likelihood of X following a normal distribution.

Usage

1
norm2ll(mu, sigma, x, neg = TRUE)

Arguments

mu

Numeric. Location parameter mean μ.

sigma

Numeric. Positive number. Scale parameter standard deviation σ = √{σ^2}.

x

Numeric vector. Values of the random variable X.

neg

Logical. If TRUE, returns, negative two log-likelihood.

Details

The two log-likelihood for the normal (or Gaussian or Gauss or Laplace–Gauss) distribution is given by

2 \mathcal{l} ≤ft( μ, σ^2 \mid x \right) = 2 ≤ft[ - \frac{n}{2} \ln 2 π σ^2 - \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 \right] \\ = - n \ln 2 π σ^2 - \frac{1}{σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 %(\#eq:dist-norm2ll)

with independent and identically distributed sample data x \in \mathbf{R}, μ is the location parameter mean being estimated (μ \in \mathbf{R}), and σ^2 is the scale parameter variance being estimated (σ^2 > 0).

The negative two log-likelihood is given by

- 2 \mathcal{l} ≤ft( μ, σ^2 \mid x \right) = - 2 ≤ft[ - \frac{n}{2} \ln 2 π σ^2 - \frac{1}{2 σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 \right] \\ = n \ln 2 π σ^2 + \frac{1}{σ^2} ∑_{i = 1}^{n} ≤ft( x_i - μ \right)^2 . %(\#eq:dist-normneg2ll)

Author(s)

Ivan Jacob Agaloos Pesigan

References

Wikipedia: Normal Distribution

Wikipedia: IID

Wikipedia: Likelihood Function

See Also

Other normal likelihood functions: normL(), normll(), normobj(), normpdf()


jeksterslabds/jeksterslabRdist documentation built on Aug. 9, 2020, 7:33 a.m.