Generate multiple starting points for niche model optimization
Source:R/start_theta_multiple.R
start_theta_multiple.RdCreates a set of starting parameter vectors on the math scale for use with the log-likelihood functions. Ensures all starting values are strictly numeric and finite, even if env_data is supplied as a data frame.
Usage
start_theta_multiple(
env_data,
num_starts = 100,
quant_vec = c(0.1, 0.5, 0.9),
method = "sobol",
skew = FALSE,
skew_t = FALSE
)Arguments
- env_data
Environmental data (matrix or data frame). Must be numeric.
- num_starts
Integer, number of starting points.
- quant_vec
Quantiles for mu ranges.
- method
"sobol" (Sobol design) or "uniform".
- skew
Logical. If
TRUE, appendpskewness parameters (alpha_1, ..., alpha_p) to each starting vector with the default range[-3, 3]. Use this for the"skew_normal"/"skew_normal_weighted"likelihoods. DefaultFALSE.- skew_t
Logical. If
TRUE, additionally append a singlelog_rparameter (default range[log 2, log 100]) after the alpha block. Use for"skew_t"/"skew_t_weighted". Impliesskew = TRUE.
Examples
starts <- start_theta_multiple(
env_data = example_env_occ_2d,
num_starts = 5L,
method = "uniform"
)
dim(starts)
#> [1] 5 5