test_op_bp

Notedocblock
test_op_bp(data, w; chart_choice, m=3, alpha=0.05, ljung_box=false)

Perform the asymptotic Box-Pierce type test for serial dependence based on ordinal patterns, aggregating the chart statistics over the delays d = 1, …, w, and return an OPBPTestResult with the test statistic, the asymptotic critical value, the p-value, and the reject decision. The test is upper-tailed for every chart.

Availability of critical values and p-values

Closed-form null distributions — and hence p-values and arbitrary alpha — are available for m = 2 with Shannon()/DistanceToWhiteNoise() and for m = 3 with UpDownBalance(). For the remaining m = 3 charts the individual statistics are correlated across the delays 1:w, so crit_val_op_bp uses values tabulated at alpha = 0.05 (Weiß, 2022) for w ∈ 1:5; passing a different alpha throws an error, and asymp_pval is NaN unless w == 1. Use test_op_bp_bootstrap to obtain a p-value for any chart, w and alpha.