- range_lower
A single positive integer representing the lower bound of
the candidate sample size range.
- range_upper
A single positive integer representing the upper bound of
the candidate sample size range.
- samples
A single positive integer representing the number of sample
sizes to select from the candidate sample size range.
- replications
A single positive integer representing the number of
Monte Carlo replications to perform for each sample size selected from the
candidate range.
- model
A character string representing the type of true model to find a
sample size for. Possible values are "ggm"
(the default).
- ...
Required arguments used for the generation of the true model. See
the True Models section for the arguments required for each true model.
- model_matrix
A square matrix representing the true model. See the
True Models section for what this matrix should look like depending on
the true model selected.
- measure
A character string representing the type of performance
measure of interest. Possible values are "sen"
(i.e., sensitivity; the
default), "spe"
(i.e., specificity), "mcc"
(i.e., Matthews correlation),
and "rho"
(i.e., Pearson correlation). See the True Models section for
the performance measures available for each type of true model supported.
- statistic
A character string representing the type of statistic to be
computed on the values obtained for the performance measures. Possible values
are "power"
(the default).
- measure_value
A single numerical value representing the desired value
for the performance measure of interest. The default is 0.6
(i.e., for the
measure = "sen"
). See the Performance Measures section for the range of
values allowed for each performance measure.
- statistic_value
A single numerical value representing the desired
value for the statistic of interest. The default is 0.8
(i.e., for the
statistic = "power"
). See the "Statistics" section for the range of
values allowed for each statistic.
- monotone
A logical value indicating whether a monotonicity assumption
should be placed on the values of the performance measure. The default is
TRUE
meaning that the performance measure changes as a function of sample
size (i.e., either by increasing or decreasing as the sample size goes up).
The alternative FALSE
indicates that the performance measure it is not
assumed to change as a function a sample size.
- increasing
A logical value indicating whether the performance measure
is assumed to follow a non-increasing or non-decreasing trend. TRUE
(the
default) indicates a non-decreasing trend (i.e., the performance measure
increases as the sample size goes up). FALSE
indicates a non-increasing
trend (i.e., the performance measure decreases as the sample size goes up).
- spline_df
A vector of positive integers representing the degrees of
freedom considered for constructing the spline basis, or NULL
. The best
degree of freedom is selected based on Leave One Out Cross-Validation. If
NULL
(the default) is provided, a vector of degrees of freedom is
automatically created with all integers between 3
and 20
.
- solver_type
A character string representing the type of the quadratic
solver used for estimating the spline coefficients. Possible values are
"quadprog"
(the default) and "osqp"
. Currently, the "osqp
" solver does
not play nicely with R
's parallel::parallel
package and cannot be used
when powerly is ran in parallel.
- boots
A positive integer representing the number of bootstrap runs to
perform on the matrix of performance measures in order to obtained
bootstrapped values for the statistic of interest. The default is 10000
.
- lower_ci
A single numerical value indicating the lower bound for the
confidence interval to be computed on the bootstrapped statistics. The
default is 0.025
(i.e., 2.5%).
- upper_ci
A single numerical value indicating the upper bound for the
confidence to be computed on the bootstrapped statistics. The default is
0.975
(i.e., 97.5%).
- tolerance
A single positive integer representing the width at the
candidate sample size range at which the algorithm is considered to have
converge. The default is 50
, meaning that the algorithm will stop running
when the difference between the upper and the lower bound of the candidate
range shrinks to 50 sample sizes.
- iterations
A single positive integer representing the number of
iterations the algorithm is allowed to run. The default is 10
.
- cores
A single positive positive integer representing the number of
cores to use for running the algorithm in parallel, or NULL
. If NULL
(the
default) the algorithm will run sequentially.
- backend_type
A character string indicating the type of cluster to
create for running the algorithm in parallel, or NULL
. Possible values are
"psock"
and "fork"
. If NULL
the backend is determined based on the
computer architecture (i.e., fork
for Unix and MacOS and psock
for
Windows).
- save_memory
A logical value indicating whether to save memory by only
storing the results for the last iteration of the method. The default TRUE
indicates that only the last iteration should be saved.
- verbose
A logical value indicating whether information about the
status of the algorithm should be printed while running. The default is
TRUE
.