| run.studies | R Documentation |
This function runs the case studies included in the package.
run.studies(
study,
Continuous = TRUE,
WithEstimation = FALSE,
Hybrid = FALSE,
nMC5 = FALSE,
Dim = 2,
TS,
TSextra,
With.p.value = FALSE,
nsample = 250,
nbins = c(5, 5),
alpha = 0.05,
param_alt,
SuppressMessages = FALSE,
ShowResult = TRUE,
B = 1000,
seed = NULL,
maxProcessor
)
study |
either the name of the study, or its number in the list. If missing all the studies are run. |
Continuous |
=TRUE, run cases for continuous data. |
WithEstimation |
=FALSE, run case studies with or without parameter estimation? |
Hybrid |
=FALSE run hybrid tests? |
nMC5 |
=FALSE, sample size of hybrid test. |
Dim |
=2 two or five-dimensional continuous data sets? |
TS |
routine to calculate new test statistics. |
TSextra |
list passed to TS (optional). |
With.p.value |
=FALSE, does user supplied routine return p values? |
nsample |
= 250, desired sample size. 250 is used in included case studies. |
nbins |
=c(5,5) number of bins for discretized data. |
alpha |
=0.05, type I error probability of tests. 0.05 is used in included case studies. |
param_alt |
vector or matrix of values of parameters under the alternative hypothesis. If missing included values are used. |
SuppressMessages |
=FALSE, should informative messages be shown? |
ShowResult |
=TRUE should result be shown in console? |
B |
= 1000, number of simulation runs. |
seed |
=NULL (optional) seed for simulations, to aid reproducability |
maxProcessor |
number of cores to use. If missing the number of physical cores-1 is used. If set to 1 no parallel processing is done. |
For details consult vignette(package="MDgof")
A (list of ) matrices of p.values.
#Examples are run with a super small B=25 simulation runs to satisfy CRAN submission rules.
#Run a new test for studies 1-3 for continuous data and without estimation.
#The new test is an (included) chi square test that finds it's own p value.
TSextra=list(Continuous=TRUE, WithEstimation=FALSE, Withpvalue=TRUE)
MDgof::run.studies(study=1:3, Continuous=TRUE, WithEstimation=FALSE,
TS=MDgof::newTS, TSextra=TSextra,
With.p.value = TRUE, B=25, maxProcessor = 1)
#Run included tests for studies 1-3 for discrete data and without estimation,
#but with type I error alpha=0.1
p=MDgof::power_studies_disc_results[[3]][1:3,,drop=FALSE]
MDgof::run.studies(study=1:3, Continuous=FALSE, WithEstimation=FALSE,
param_alt=p,alpha=0.1, B=25, maxProcessor = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.