plot_ppp#
- pyfcirt.plot_ppp(
- check: Dataset,
- *,
- coords=None,
- bins='auto',
- quantile_range=None,
- max_panels=12,
- figsize=None,
Plot the posterior predictive discrepancy differences.
Parameters#
check: xarray.DatasetReturned Pearson check from
chi_ppp().coords: mapping or NoneSelect existing labels on the check’s grouping axis.
bins: str, int or array-likeMatplotlib histogram bins. Default:
"auto".quantile_range: tuple or NoneOptional interval of display quantiles.
Nonedisplays all draws. The interval does not change the reported PPP.max_panels: int or NonePanel limit. Default: 12.
Noneuses every selected panel.figsize: tuple or NoneFigure size in inches.
Returns#
- matplotlib.figure.Figure
Histograms of
D_rep - D_obswith a reference line at zero and the computed PPP in each panel.
Examples#
Use a fitted Model. The output below comes from the HEXACO TIRT example.
Compare the three pairs in B1.
import pyfcirt as fc
check = model.chi_ppp(
blocks=["B1"],
groupby="pair",
draws=64,
random_seed=45,
store=False,
progressbar=False,
)
figure = fc.plot_ppp(check, quantile_range=(0.005, 0.995))