fit_all_dsm | R Documentation |
Fit all possible model with the covariates given.
fit_all_dsm( distFit = NULL, segdata_obs, obsdata, response = "ind", predictors, likelihood = "negbin", esw = NULL, max_cor = 0.5, nb_max_pred = 3, complexity = 4, smooth_xy = TRUE, k = 5, splines_by = NULL, weighted = FALSE, random = NULL, soap = list(xt = NULL, knots = NULL), use_loo = FALSE )
distFit |
|
segdata_obs |
segdata data.frame with observation added with |
obsdata |
Observation data.frame prepared with |
response |
Response variable to choose between "ind" number of indiviudals or "obs" number of observation. |
predictors |
vector containing all covariates as character string. |
likelihood |
Likelihood must be one of "negbin", "poisson" or "tweedie". Default is "negbin". |
esw |
Value of effective-strip width. |
max_cor |
Maximum correlation threshold between two covariates tolerated. |
nb_max_pred |
Maximum number of covariates in a model. |
complexity |
k argument in smoothers. |
smooth_xy |
Controls the intercept to include or not a bivariate smooth on x and y : for prediction inside the prospected polygon, should be set to TRUE to obtain stable estimates for prediction outside, MUST be set to FALSE to keep extrapolation under control. |
k |
Number of models to return for inference. |
splines_by |
Interaction with splines given by one variable of segdata. |
weighted |
Either to compute weights or no. |
random |
variable of |
soap |
list to pass in order to use a soap-film smooth: must be prepared outside this function. |
use_loo |
Model selection with leave-one-out cross validation if TRUE, if FALSE it uses AIC to select models. |
This function return a list containing:
all_fits_binded : data.frame
Containing all fitting infos on models.
best_models : list
k best models with standardized value.
best_models4plotting : list
k best models with raw values (for plotting).
By default, use cubic B-splines with shrinkage (bs = 'cs').
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.