Function that returns the AIC of a list of models In the case of a tweedie model (TweedGLM), it also returns the XI value to be used in cross-validation if not fixed previously

AIC_indices(
  x,
  Y_data_sample,
  Models_tmp_nb,
  modeltype,
  fixXI,
  Y_data_sample_lcc = NA,
  MaxDist = NA,
  Phi = NA,
  Model,
  fix.lambda,
  lambda
)

Arguments

x

the model number to be fitted. From 1 to length(Models_tmp_nb).

Y_data_sample

data.frame or SpatialPointsDataFrame of observations with covariates

Models_tmp_nb

matrix with column of model formulas as character

modeltype

sub-model type

fixXI

Power of the Tweedie model (tweedie)

Y_data_sample_lcc

dataset to be fit on, with projected CRS ("Krige*" modeltype only)

MaxDist

Maximum distance for variogram ("Krige*" modeltype only)

Phi

Range for Phi fitting ("Krige*" modeltype only)

Model

Model type for variogram ("Krige*" modeltype only)

fix.lambda

logical, indicating whether the Box-Cox transformation parameter lambda should be regarded as fixed (fix.lambda = TRUE) or should be be estimated (fix.lambda = FALSE). Defaults to TRUE.

lambda

value of the Box-Cox transformation parameter lambda. Regarded as a fixed value if fix.lambda = TRUE otherwise as the initial value for the minimisation algorithm. Defaults to 1. Two particular cases are lambda = 1 indicating no transformation and lambda = 0 indicating log-transformation.