Categories &

Functions List

Function Reference: lognlike

statistics: nlogL = lognlike (params, x)
statistics: [nlogL, avar] = lognlike (params, x)
statistics: […] = lognlike (params, x, censor)
statistics: […] = lognlike (params, x, censor, freq)

Negative log-likelihood for the lognormal distribution.

nlogL = lognlike (params, x) returns the negative log-likelihood of the data in x corresponding to the lognormal distribution with (1) location parameter mu and (2) scale parameter sigma given in the two-element vector params, which correspond to the mean and standard deviation of the associated normal distribution. Missing values, NaNs, are ignored. Negative values of x are treated as missing values.

If a random variable follows this distribution, its logarithm is normally distributed with mean mu and standard deviation sigma.

[nlogL, avar] = lognlike (params, x) returns the inverse of Fisher’s information matrix, avar. If the input parameter values in params are the maximum likelihood estimates, the diagonal elements of avar are their asymptotic variances. avar is based on the observed Fisher’s information, not the expected information.

[…] = lognlike (params, x, censor) accepts a boolean vector, censor, of the same size as x with 1s for observations that are right-censored and 0s for observations that are observed exactly. By default, or if left empty, censor = zeros (size (x)).

[…] = lognlike (params, x, censor, freq) accepts a frequency vector, freq, of the same size as x. freq typically contains integer frequencies for the corresponding elements in x, but it can contain any non-integer non-negative values. By default, or if left empty, freq = ones (size (x)).

Further information about the lognormal distribution can be found at https://en.wikipedia.org/wiki/Log-normal_distribution

See also: logncdf, logninv, lognpdf, lognrnd, lognfit, lognstat

Source Code: lognlike