| hsa | R Documentation |
This function performs sensitivity analysis of the hespdiv method.
Starting from a reference hespdiv object, it generates a specified
number of alternative hespdiv calls by randomly sampling new values
for selected arguments from user-provided sets.
hsa(
obj,
n.runs = 100,
data.paired = TRUE,
display = FALSE,
images.path = NULL,
pnts.col = 1,
data = NULL,
xy.dat = NULL,
same.n.split = NULL,
n.split.pts = NULL,
N.crit = NULL,
N.rel.crit = NULL,
N.loc.crit = NULL,
N.loc.rel.crit = NULL,
S.crit = NULL,
S.rel.crit = NULL,
Q.crit = NULL,
c.splits = NULL,
c.Q.crit = NULL,
c.crit.improv = NULL,
c.X.knots = NULL,
c.Y.knots = NULL,
c.max.iter.no = NULL,
c.fast.optim = NULL,
c.corr.term = NULL,
study.pol = NULL,
use.chull = NULL,
generalize.f = NULL,
maximize = NULL,
method = NULL,
compare.f = NULL,
.run.id = NULL,
parallel = FALSE,
RAM = NULL,
load_prop = 0.8,
chunk_size = workers * 2,
workers = NULL,
future_seed = TRUE
)
obj |
A |
n.runs |
Integer. The number of alternative |
data.paired |
Logical. Controls whether alternative values of |
display |
Logical. Controls the value of the |
images.path |
Character or |
pnts.col |
Value passed to the |
data |
A list of data objects (matrices, data frames, vectors, lists, or other supported data structures) used as alternative inputs for sensitivity analysis. |
xy.dat, study.pol |
Lists of data frames with two columns: |
same.n.split, c.fast.optim, use.chull, c.splits |
Logical vectors specifying
alternative values for corresponding |
n.split.pts, c.max.iter.no, N.crit, N.loc.crit, c.X.knots, c.Y.knots |
Integer vectors specifying alternative values for corresponding arguments. |
N.rel.crit, N.loc.rel.crit, S.crit, S.rel.crit |
Numeric vectors with values between 0 and 1. |
Q.crit, c.Q.crit, c.crit.improv |
Numeric vectors specifying alternative threshold or improvement criteria. |
c.corr.term |
Numeric vector with values between 0.01 and 0.2. |
generalize.f, compare.f |
Lists of functions defining custom similarity or generalization methods. |
maximize |
Logical vector of the same length as |
method |
Character vector specifying predefined similarity metrics. |
.run.id |
Integer. Runs with indices less than or equal to this value will be skipped. This can be used to resume an interrupted analysis. |
parallel |
Logical. If |
RAM |
Integer. Approximate amount of available RAM (in GB) used to limit
the number of parallel workers when |
load_prop |
Numeric in (0, 1]. Proportion of available CPU cores to use when determining the number of parallel workers automatically. Defaults to 0.8. |
chunk_size |
Integer. Number of runs submitted per batch (chunk) to the
parallel backend when |
workers |
Integer. Number of parallel workers (CPU cores) to use when
|
future_seed |
Logical. Passed to |
"hsa" and other sensitivity analysis functionsThe hsa_detailed function evaluates all combinations of provided
argument values, resulting in dense sampling of the parameter space at
substantial computational cost. In contrast, hsa samples the parameter
space stochastically and is generally more suitable for exploratory or
large-scale sensitivity analyses.
In hsa_detailed, alternative argument values are provided as lists,
whereas in hsa they are supplied as vectors or lists depending on
the argument.
The hsa_sample_constrained function performs non-recursive hespdiv
runs for each split-line produced based on different data subsamples. Thus,
hsa is more general, as it allows to inspect sensitivity to other arguments.
When data.paired = TRUE, the same index is used to sample elements
of data and xy.dat, allowing sensitivity analysis across
datasets of differing size or composition. When FALSE, data and
coordinates are sampled independently, enabling analyses based on noise
addition or spatial shuffling.
Arguments defining custom methods (compare.f, generalize.f,
maximize) are always treated as paired and must therefore have
equal lengths.
An object of class hsa, containing:
A list of alternative hespdiv results
produced during the sensitivity analysis.
The reference hespdiv object whose arguments
were perturbed.
If a particular run produces a warning or an error, the corresponding list
element will contain two components. In case of a warning, these are the
resulting hespdiv object and the warning message. In case of an error,
they are the arguments used for the call and the error message.
Other functions for hespdiv sensitivity analysis:
change_base(),
hsa_detailed(),
hsa_quant(),
hsa_sample_constrained(),
plot_cs_hsa(),
plot_hsa(),
plot_hsa_q()
Other functions for hespdiv results post-processing:
cross_comp(),
hsa_detailed(),
hsa_quant(),
hsa_sample_constrained(),
nulltest(),
taxon_effect()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.