many.crit {PoweR} | R Documentation |
Computation of critical values for several test statistics
Description
Computation of critical values for several test statistics, several n values, and several level values, for a given distribution
Usage
many.crit(law.index,stat.indices,M = 10^3,vectn = c(20,50,100),levels = c(0.05,0.1),
alter = create.alter(stat.indices),law.pars = NULL,parstats = NULL,model = NULL,
Rlaw=NULL, Rstats = NULL,center=FALSE, scale=FALSE)
Arguments
law.index |
law index as given by function |
stat.indices |
vector of statistic indices as given by function |
M |
number of Monte Carlo repetitions to use. |
vectn |
vector of number of observations for the samples to be generated. |
levels |
vector of required level values. |
alter |
named-list with type of test for each statistical test:
alter[["statj"]]=0, 1 ,2, 3 or 4; for each |
law.pars |
|
parstats |
named-list of parameter values for each statistic to simulate.
The names of the list should be |
model |
NOT IMPLEMENTED YET. If |
Rlaw |
If 'law.index' is set to 0 then 'Rlaw' should be a (random generating) function. |
Rstats |
A list of same length as |
center |
Logical. Should we center the data generated |
scale |
Logical. Should we center the data generated |
Value
An object of class critvalues
, which is a list where each element of the list contains a matrix
for the corresponding statistic. This column matrices are: n
values,
level values, parameters of the test statistic (NA
if none), left critical values and right critical values).
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 Studies for Goodness-of-fit Tests in R. Journal of Statistical Software, 69(3), 1–42. doi:10.18637/jss.v069.i03
See Also
See print.critvalues
for a LaTeX output of the
results of this function.
Examples
critval <- many.crit(law.index=2,stat.indices=c(10,15),M=10^3,vectn=c(20,50,100),
level=c(0.05,0.1),alter=list(stat10=3,stat15=3),law.pars=NULL,
parstats=NULL)
print(critval,digits=3,latex.output=FALSE)