View source: R/svem_significance_test.R
svem_significance_test | R Documentation |
Performs a whole-model significance test using the SVEM framework and allows the user to specify mixture factor groups. Mixture factors are sets of continuous variables that are constrained to sum to a constant (the mixture total) and have optional lower and upper bounds. When mixture groups are supplied, the grid of evaluation points is generated by sampling Dirichlet variates over the mixture simplex rather than by independently sampling each continuous predictor. Non-mixture continuous predictors are sampled via a maximin Latin hypercube over their observed ranges, and categorical predictors are sampled from their observed levels.
svem_significance_test(
formula,
data,
mixture_groups = NULL,
nPoint = 2000,
nSVEM = 10,
nPerm = 150,
percent = 90,
nBoot = 100,
glmnet_alpha = c(1),
weight_scheme = c("SVEM"),
objective = c("auto", "wAIC", "wBIC", "wGIC", "wSSE"),
auto_ratio_cutoff = 1.3,
gamma = 2,
relaxed = FALSE,
verbose = TRUE,
...
)
formula |
A formula specifying the model to be tested. |
data |
A data frame containing the variables in the model. |
mixture_groups |
Optional list describing one or more mixture factor
groups. Each element of the list should be a list with components
|
nPoint |
Number of random points in the factor space (default: 2000). |
nSVEM |
Number of SVEM fits on the original data (default: 10). |
nPerm |
Number of SVEM fits on permuted responses for the reference distribution (default: 150). |
percent |
Percentage of variance to capture in the SVD (default: 90). |
nBoot |
Number of bootstrap iterations within each SVEM fit (default: 100). |
glmnet_alpha |
The alpha parameter(s) for glmnet (default: |
weight_scheme |
Weighting scheme for SVEM (default: "SVEM"). |
objective |
Objective used inside |
auto_ratio_cutoff |
Single cutoff for the automatic rule when
|
gamma |
Penalty weight used only when |
relaxed |
Logical; default |
verbose |
Logical; if |
... |
Additional arguments passed to |
If no mixture groups are supplied, this function behaves identically to a standard SVEM-based whole-model test, sampling non-mixture continuous variables via a maximin Latin hypercube within their observed ranges, and categorical variables from their observed levels.
Internally, predictions at evaluation points use predict.svem_model()
with se.fit = TRUE
. Rows with unseen categorical levels are returned
as NA
and are excluded from distance summaries via complete.cases()
.
A list of class svem_significance_test
containing:
p_value
: median p-value across evaluation points.
p_values
: vector of per-point p-values.
d_Y
: distances for original fits.
d_pi_Y
: distances for permutation fits.
distribution_fit
: fitted SHASHo distribution object.
data_d
: data frame combining distances and labels.
SVEMnet()
, predict.svem_model()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.