%!demo
%! ## Compute the negative loglikelihood for a fitted Generalized Pareto distribution
%! pd = makedist ("GeneralizedPareto", "k", 0.5, "sigma", 1, "theta", 0)
%! rand ("seed", 21);
%! data = random (pd, 100, 1);
%! pd_fitted = GeneralizedParetoDistribution.fit (data, 0)
%! nlogL = negloglik (pd_fitted)
%!
%! ## This is useful for assessing the fit of a Generalized Pareto distribution to
%! ## data, lower values indicate a better fit.
