Description Usage Arguments Value References
Estimates the p-value of the given observation for the given set of Monte Carlo samples. User can choose which method is used to treat possible tied values.
1 2 | ## Default S3 method:
estimate_p_value(obs, sim_vec, ties = 'midrank')
|
obs |
The data sample. A scalar real value. Must not be NULL. |
sim_vec |
The Monte Carlo samples. A vector of real values. Must not be NULL. |
ties |
The method to treat tied values with. If one or more of the elements of sim_vec are equal to obs, how should the rank of obs be determined? For 'conservative' the resulting p-value will be the highest possible. For 'liberal' the p-value will be the lowest possible. For 'random' the rank of the obs within the tied values is uniformly sampled so that the resulting p-value is at most the conservative option and at least the liberal option. For 'midrank' the mid-rank within the tied values is taken. 'midrank' is the default. |
The p-value estimate. A scalar real value between 0 and 1.
Hájek & Šidák & Sen. Theory of Rank Tests. 1999. ff. 130.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.