%!demo
%! ## Compute the negative loglikelihood for a fitted Inverse Gaussian distribution
%! pd = makedist ("InverseGaussian", "mu", 1, "lambda", 2)
%! rand ("seed", 21);
%! data = random (pd, 100, 1);
%! pd_fitted = fitdist (data, "InverseGaussian")
%! nlogL = negloglik (pd_fitted)
%!
%! ## This is useful for assessing the fit of an Inverse Gaussian distribution to
%! ## data, lower values indicate a better fit.
