Return the data calculated by the last plot_pvalue call.
get_pvalue_resultsfunction returns the likelihood ratio test results computed by the
plot_pvaluecommand, which compares fits of the null model to fits of the alternative model using faked data with Poisson noise. The likelihood ratio based on the observed data is returned, along with the p-value, used to reject or accept the null model.
plot – If
get_pvalue_plothave been called then the return value is a
- Return type:
None or a
Compute and plot a histogram of likelihood ratios by simulating data.
Return the data used by plot_pvalue.
The fields of the returned (
LikelihoodRatioResults) object are:
The calculated likelihood ratio for each iteration.
The calculated fit statistics for each iteration, stored as the null model and then the alt model in a nsim by 2 array.
The parameter samples array for each simulation, stored in a nsim by npar array.
The likelihood ratio of the observed data for the null and alternate models.
The p value of the observed data for the null and alternate models.
The fit statistic of the null model on the observed data.
The fit statistic of the alternate model on the observed data.
Return the results of the last pvalue analysis and display the results - first using the
formatmethod, which provides a summary of the data, and then a look at the individual fields in the returned object. The last call displays the contents of one of the fields (
>>> res = get_pvalue_results() >>> print(res.format()) >>> print(res) >>> print(res.ppp)