I want to compute the P-value from the joint cumulative distribution of an n-dimensional order statistic.
One efficient way is using the following recursive formula.
However, the facts are (or would be):
- I am too stupid to write a recursive function.
- I didn’t find the efficient formula at first.
- In other cases, the efficient formula have not been derived yet, or too complicated to derive.
In Statistics Monte Carlo simulation is a “quick” way to compute some complicated formulas. By saying “quick”, I mean I can see the results without knowing or deriving “ugly” Math formulas. It’s actually a very “slow” method in computing aspect.
Anyway, the R function is here.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|