normlike
Normal negative log-likelihood
📝Syntax
nlogL = normlike(params, x)
[nlogL, avar] = normlike(params, x)
[nlogL, avar] = normlike(params, x, censoring, freq)
📥Input Arguments
Parameter Description
params two-element real vector [mu sigma]: normal distribution parameters.
x finite real nonempty array: sample data.
censoring array containing 0 or 1 values: right-censoring flags.
freq array of nonnegative finite values: observation frequencies.
📤Output Arguments
Parameter Description
nlogL scalar: negative log-likelihood.
avar 2-by-2 array: asymptotic covariance estimate.
📄Description

normlike returns the negative log-likelihood for normal distribution data and the asymptotic covariance estimate.

💡Examples
x = [-2 -1 0 1 3 5];
[nlogL, avar] = normlike([1 2], x);
🔗See Also
normfitnormpdfnormcdf
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub