Description Usage Arguments Value Author(s) References See Also Examples
This function can compute the p-value associated with a test statistic value from a sample of observations.
1 2 3 |
data |
sample of observations. |
stat.index |
index of a test statistic as given by function |
null.law.index |
index of the distribution to be tested (the
null hypothesis distribution),
as given by function |
M |
number of Monte-Carlo repetitions to use. |
alter |
value (in 0,1,2,3,4) giving the the type of test (See Section 3.3 in Lafaye de Micheaux, P. and Tran, V. A. (2014)). |
null.law.pars |
vector of parameters for the law. The length of this
parameter should not exceed 4. If not provided, the default values
are taken using |
stat.pars |
a vector of parameters.
If |
list.stat |
if not |
method |
method to use for the computation of the p-value. Only 'Fisher' method is available for the moment. |
center |
Logical. Should we center the data generated |
scale |
Logical. Should we center the data generated |
The Monte-Carlo p-value of the test.
P. Lafaye de Micheaux, V. A. Tran
Pierre Lafaye de Micheaux, Viet Anh Tran (2016). PoweR: A Reproducible Research Tool to Ease Monte Carlo Power Simulation Studies for Studies for Goodness-of-fit Tests in R. Journal of Statistical Software, 69(3), 1–42. doi:10.18637/jss.v069.i03
See statcompute
.
1 2 3 | x <- rnorm(100)
statcompute(1,x,level = c(0.05),alter = 3)$pvalue
pvalueMC(x,stat.index = 1,null.law.index = 2,M = 10^5,alter = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.