georgebv/pyextremes

Extracting confidence intervals on fit parameters 'c', 'loc', and 'scale'

arfogg opened this issue · 1 comments

Hi,

Thanks for creating this super helpful python package, it's really easy to use and the documentation are really helpful. I use this package for space science research.

I'm interested in returning the confidence intervals or some other measure of error on the fit parameters 'c', 'loc', and 'scale'.

Currently I access the fit parameters by doing: EVA.model.fit_parameters . Having confidence intervals (or any other measure of error) on these parameters would be a great addition to the package. Apologies if this feature has already been implemented - if it has please could you guide me on how to extract the confidence intervals / errors?

Thanks,
Alexandra Fogg

There are no confidence intervals available right away for the parameters, but you can calculate those yourself from the data.

For the Emcee model you can use the _trace attribute of shape number of free parameters x number of samples.

For the MLE model you can use the fit_parameter_cache attribute which is a list of samples of free parameters. Before it's available, however, you would need to call get_return_value with alpha argument and n_samples set to number you need (100 by default).