accept_rate {amp} | R Documentation |
Estimate the local acceptance rate
Description
This a helper function used to estimate the acceptance rate for a simple norm based test under a sequence of local alternatives in a given direction given the estimated limiting distribution.
Usage
accept_rate(mc_limit_dstr, dir, null_quants, norms_idx = 2, norm_type = "lp")
Arguments
mc_limit_dstr |
MC draws from an estimate of the (centered) limiting distribution. Data where columns correspond to different covariates, and rows are independent observations. |
dir |
a vector in the direction for which we wish to estimate power. |
null_quants |
the cutoff values for the distribution under the null for each lp norm. |
norms_idx |
the index of the norms to be used (ideally integers). |
norm_type |
string indicating the class of norms to select over (sum of squares ("ssq") or lp norms ("lp") are currently supported). |
Value
The estimated acceptance rate for the specified norm-based test for a given local alternative.