Return the data calculated by the last plot_pvalue call.

The get_pvalue_results function returns the likelihood ratio test results computed by the plot_pvalue command, 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.

Returns:plot – If plot_pvalue or get_pvalue_plot have been called then the return value is a sherpa.sim.simulate.LikelihoodRatioResults instance, otherwise None is returned.
Return type:None or a sherpa.sim.simulate.LikelihoodRatioResults instance

See also

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 format method, 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 (ppp).

>>> res = get_pvalue_results()
>>> print(res.format())
>>> print(res)
>>> print(res.ppp)