LikelihoodRatioResults
- class sherpa.sim.simulate.LikelihoodRatioResults(ratios: Sequence[float] | ndarray, stats: Sequence[float] | ndarray, samples: Sequence[float] | ndarray, lr: float, ppp: float, null: float, alt: float, parnames: Sequence[str], parvals: ndarray)[source] [edit on github]
Bases:
NoNewAttributesAfterInit
The results of a likelihood ratio comparison simulation.
Changed in version 4.15.1: The parnames and parvals attributes have been added. They are intended to debug problem cases and so are not displayed by default.
- ratios
The likelihood ratio for each simulation.
- Type:
numpy array
- stats
The fit statistic for the null and alternative models for each simulation. The shape is (nsim, 2).
- Type:
numpy array
- samples
The parameter samples array for each simulation, with shape (nsim, npar).
- Type:
numpy array
- lr
The likelihood ratio of the observed data for the null and alternate models.
- Type:
number
- ppp
The p value of the observed data for the null and alternate models.
- Type:
number
- null
The fit statistic of the null model on the observed data.
- Type:
number
- alt
The fit statistic of the alternate model on the observed data.
- Type:
number
- parvals
The parameter values for each iteration for the alternate model, matching the order of parnames. The shape is (nsim, len(parnames)).
- Type:
ndarray
Notes
The parvals field is useful to check that the simulations have not got stuck with certain parameter sets, for instance if the ratio value drops to ~ 0 and stays there. If this is the case then the analysis can be re-run after adjusting the range (the min or max range) of the parameters in question.
Methods Summary
format
()Convert the object to a string representation for display purposes.
Methods Documentation
- format() str [source] [edit on github]
Convert the object to a string representation for display purposes.
- Returns:
txt – A string representation of the data stored in the object.
- Return type: