A helper function that calculates the estimated p-value for a given observed alternative and a given norm.
pval_for_mag(mc_limit_dstr, dir, norms_idx = 2, norm_type = "lp", ...)
the simulated data draw from the limiting distribution under the null
the observed estimate of the parameter
the index for the norm used
the type of norm used
additional arguments that may be passed to pval_for_mag, but which will be ignored.
The p-value for a test with estimate given by
dir
and limiting distribution given by mc_limit_dstr
.