Function to run the simulation for estimating the type-1 error or the statistical power given a set of parameters.
Arguments
- niter
number of iterations.
- maxt
the maximum time. If the number of iterations is not finished within the maximum time the simulations ends.
- type
character indicating the simulation type. One of
type1
orpower
.- method
character indicating the method to use for estimating the number of cluster. One of
mclust
orkmeans
.mclust
will call themodel_based_clust()
function andkmeans
thekmeans_clust()
function.- cmax
the maximum number of clusters to test. Default to 5. Be careful that increasing
cmax
will significantly increase the computation time.- dmin
the lower bound for the range of effect sizes (in ~Cohen's d like scale).
- dmax
the lower bound for the range of effect sizes (in ~Cohen's d like scale). If not specified,
dmax
takes the value ofdmin
thus the effect size is the same for all indicators.- udata
a list. The output of the
prep_user_data()
function. Default toNULL
. Ifudata
is notNULL
all the parameters passed to...
are ignored.- progress
logical indicating whether a progress bar (using the
progress
package) should be displayed.- updateProgress
a function used fo displaying a progress bar in the Shiny app. Default to
NULL
- ...
named arguments that will be passed to the
sim_clust()
function. Ifudata
isnull
, these parameters are used for the simulation.