Modelselect configuration file
modelselect_opt( ..., RESET = FALSE, READ.ONLY = NULL, LOCAL = FALSE, ADD = FALSE )
... | Other options as listed below |
---|---|
RESET | reset options to default |
READ.ONLY | Logical. To not modify the options |
LOCAL | Logical. set to true to use modified options in a local environment but not in global. |
ADD | Logical. New options can be added after the option function is created by explicitely specifying ADD = TRUE |
A list with all options
The script is not a "everything is working fine by default" script. Different options have to be defined along the script. Users are advised to run the code by little parts to avoid any miss-specifications of parameters. Different types of distribution are available as well as different criteria of selection. Users are advised to verify if options match their dataset
set to TRUE if you are running the functions on a MPI cluster
number of cores to use. Default to all cores available.
Show all figures during calculation process (Recommend FALSE)
data type. Default to ContPosNull. See below
All model types to compare depending on datatype.
Maximum distance for kriging (For datatype = KrigeGLM)
Vector of length 2 with min and max for fitting Phi (For datatype = KrigeGLM)
Vector of length of modeltypes with variogram model as used with
cov.spatial
(For datatype = KrigeGLM)
Projection in meters. Default to Lambert93.(For datatype = KrigeGLM)
Vector of length of modeltypes with lambda corresponding to box-cox transformation (For datatype = KrigeGLM).
Vector of length of modeltypes with logical, whether to fix lambda or let the model chose it (For datatype = KrigeGLM).
Maximum number of covariates kept in a model
degree of freedom for simple variables in GAM models. Default Max_K=5 similar to Max_K_Poly=4
Maximum degree of freedom for tensor interactions in GAM models
Maximum degree of polynom for simple variables in GLM models
0=chosen by model (time consuming), 1=Poisson, 2=Gamma, 1<FixXI<2 compound poisson
(For datatype = TweedGLM). See tweedie
Logical. Whether to test for covariates interactions in models. A maximum of three interactions will be tested in the same model. This may be highly time consuming. Should be FALSE with any "KrigeGLM*".
minimum number of models kept at each iteration to avoid removing not to bad models
Value k of the k-fold cross-validation
Numeric Value N of the N times k-fold cross-validation
N_k_fold * k_fold (for compatibility)
Sequence of thresholds tested to cut between 0 and 1 for PA data.
p-value limit for models retained in each of the "modeltype" cross-validation stepwise approach. Procedure seek for models having ranks not significantly different (p>=lim_pvalue) than the best model . "lim_pvalue" can be small for each step to keep a little more models than necessary. If p-value is not significant, models are considered with similar power of prediction, and thus kept in the following iteration. The smallest the p-value, the less discriminant the test, thus the highest number of models retained
Similar to lim_pvalue but used to select best model among all models at the very end of the procedure. This value may be higher than lim_pvalue to be more discriminant. This allows to select the best model among all models that have been fitted after the different cross-validations
value to which multiplying the maximum value of data observations. This is used as a maximum predicted value for uncertainty calculation with Tweedie model as calculation of too high values maybe very long. This also fixes the maximum prediction for species distribution mapping when the model has a high uncertainty for sparse positions and lead to impossibly too high values.
Numeric Seed for random number generation (Allow reproducibility between simulations)
This allows to choose the best threshold value to predict presence-absence with probability of presence. Balance between 0 and 1 in data may deviate the best threshold from value 0.5. The best threshold is calculated among all cross-validations. Threshold value chosen is the one the closest to specificity = sensitivity.
if (FALSE) { # Reset options modelselect_opt(RESET = TRUE) # List options modelselect_opt() # Show one option modelselect_opt("modeltypes") # Modify datatype modelselect_opt$datatype <- "PA" # Modify modeltypes tested modelselect_opt("modeltypes") <- c("PA", "PAGLM") }