Description Usage Arguments Details Value References Examples
Computes the p-value of the statistic by computing its rank compared to its simulated values.
1 |
S0 |
An atomic vector. Value of the test statistic applied to the data. |
S |
A vector. It consists of replications of the test statistic.
|
type |
A character string. It specifies the type of test
the p-value function produces. The possible values are
|
We allow for four types of p-value: leq
, geq
,
absolute
and two-tailed
. For one-tailed test,
leq
returns the proportion of simulated values smaller
than the statistic while geq
returns the proportion of
simulated values greater than the statistic. For two-tailed
test with a symmetric satistic, one can use the
absolute value of the statistic and its simulated values to
retrieve a two-tailed test (i.e. type = absolute
).
If the statistic is not symmetric, one can specify the p-value
type as two-tailed
which is equivalent to twice the minimum
of leq
and geq
.
Ties in the ranking are broken according to a uniform distribution.
The p-value of the statistic S0
given a vector of replications S
.
Dufour, J.-M. (2006), Monte Carlo Tests with nuisance parameters: A general approach to finite sample inference and nonstandard asymptotics in econometrics. Journal of Econometrics, 133(2), 443-447.
Dufour, J.-M. and Khalaf L. (2003), Monte Carlo Test Methods in Econometrics. in Badi H. Baltagi, ed., A Companion to Theoretical Econometrics, Blackwell Publishing Ltd, 494-519.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.