- formula
An object of class formula. The wqs term must be included in
the formula (e.g., y ~ wqs + ...
).
- data
The data.frame
to be used in the WQS regression run. This
can be of class data.frame
or it can be a tibble from the tidyverse.
- mix_name
A vector with the mixture column names.
- q
An integer to indicate the number of quantiles to split the mixture
variables.
- b_main
The number of bootstraps for the main WQS regression run.
- b_perm
The number of bootstraps for the iterated permutation test
WQS regression runs and the reference WQS regression run (only for linear
WQS regression and only when b_mean != b_perm
).
- b1_pos
A logical value that indicates whether beta values should be
positive or negative.
- b_constr
Logical value that determines whether to apply positive or
negative constraints in the optimization function for the weight optimization.
Note that this won't guarantee that the iterated b1 values in the
weight optimization are only positive (if b1_pos = TRUE
) or only
negative (if b1_pos = FALSE
) as seen in the bres
matrix output
by the gwqs
models (i.e., column bres$b1
), but it does
substantially increase the probability that those b1 values will be
constrained to be either positive or negative. This defaults to FALSE
.
- rs
A logical value indicating whether random subset implementation
should be performed.
- niter
Number of permutation test iterations.
- seed
An integer to fix the seed. This will only impact the the initial
WQS regression run and not the permutation test iterations. The default
setting is NULL, which means no seed is used for the initial WQS regression.
The seed will be saved in the "gwqs_main"
object as
"gwqs_main$seed"
.
- family
A description of the error distribution and link function to be
used in the model. This can be a character string naming a family function
(e.g., "binomial"
) or a family object (e.g.,
binomial(link="logit")
). Currently validated families include
gaussian(link="identity")
for linear regression, binomial()
with any accepted link function (e.g., "logit"
or "probit"
),
poisson(link = "log")
, quasipoisson(link = "log")
, or
"negbin"
for negative binomial. The "multinomial"
family is
not yet supported.
- plan_strategy
Evaluation strategy for the plan function. You can choose
among "sequential"
, "multisession"
, "multicore"
, and
"cluster"
. This defaults to "multicore"
. See the
future::plan
documentation for full details.
- stop_if_nonsig
if TRUE, the function will not proceed with the
permutation test if the main WQS regression run produces nonsignificant
p-value.
- stop_thresh
numeric p-value threshold required in order to proceed
with the permutation test, if stop_if_nonsig = TRUE
.
- nworkers
(optional) If the plan_strategy
is not
"sequential"
, this argument defines the number of parallel processes
to use, which can be critical when using a high-performance computing (HPC)
cluster. This should be an integer value. The default behavior for
gWQS::gwqs
is to use all detected cores on a machine, but for many
HPC use scenarios, this would call in cores that have not been allotted by
the HPC scheduler, resulting in the submitted job being halted. For example,
if one has requested 14 cores on a 28-core HPC queue, one would want to set
nworkers = 14
. If nworkers
was greater than 14 in that case,
the HPC job would be terminated. This argument defaults to NULL
, in
which case length(future::availableWorkers())
will be used to
determine the number of parallel processes to use.
- ...
(optional) Additional arguments to pass to the gWQS::gwqs
function.