compquant {PoweR} | R Documentation |
Computation of the quantile values only for one test statistic.
Description
Functions for the computation of the quantile values only for one test statistic at a time and also one n value.
Usage
compquant(n,law.index,stat.index,probs=NULL,M=10^5,law.pars=NULL,
stat.pars=NULL,model=NULL,Rlaw=NULL,Rstat=NULL,
center=FALSE, scale=FALSE)
Arguments
n |
number of observations for each sample to be generated; length( |
law.index |
law index as given by |
stat.index |
stat index as given by |
probs |
If not |
M |
Number of Monte Carlo repetitions to use. |
law.pars |
|
stat.pars |
A vector of parameters.
If NULL, the default parameter values for the statistic specified by this |
model |
NOT YET IMPLEMENTED. If |
Rlaw |
The user can provide its own (random generating) R function using this parameter. In this case, 'law.index' should be set to 0. |
Rstat |
If 'stat.index' is set to 0, an R function that outputs a list with components 'statistic' (value of the test statistic), 'pvalue' (pvalue of the test; if not computable should be set to 0), 'decision' (1 if we reject the null, 0 otherwise), 'alter' (see above), 'stat.pars' (see above), 'pvalcomp' (1L if the pvalue can be computed, 0L otherwise), 'nbparstat' (length of stat.pars). |
center |
Logical. Should we center the data generated |
scale |
Logical. Should we center the data generated |
Value
A list with M
statistic values and also some quantiles (with
levels 0.025,0.05,0.1,0.9,0.95,0.975), as well as the name of the law and the name of the test statistic used (just to be sure!).
Author(s)
P. Lafaye de Micheaux, V. A. Tran
References
Pierre Lafaye de Micheaux, Viet Anh Tran (2016). PoweR: A Reproducible Research Tool to Ease Monte Carlo Power Simulation Studies for Goodness-of-fit Tests in R. Journal of Statistical Software, 69(3), 1–42. doi:10.18637/jss.v069.i03
Examples
compquant(n=50,law.index=2,stat.index=10,M=10^3)$quant
compquant(n=50,law.index=0,stat.index=10,M=10^3,Rlaw=rnorm)$quant