Skip to content

Getting confidence intervals for MLE after fitting the model #49

Closed Answered by georgebv
ozanyesil asked this question in Q&A
Discussion options

You must be logged in to vote

You can get all distribution parameters from the models and then calculate confidence bounds for each.

For MLE it is fit_parameter_cache attribute, you must call the get_return_value method with alpha argument and with n_samples set to the desired sample size

self.fit_parameter_cache: typing.List[typing.Tuple[float, ...]] = []

For Emcee it is _trace attribute which stores chains for each parameter

self._trace: np.ndarray = sampler.get_chain().transpose((1, 0, 2))

For Emcee you can visualize them using the plot_trace method

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by georgebv
Comment options

You must be logged in to vote
1 reply
@georgebv
Comment options

Comment options

You must be logged in to vote
1 reply
@georgebv
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants