Function that return indices of quality of fit for a list of models with a sub-sample of data used as validation sample in a cross-validation procedure

crossV_indices(
  MC,
  formulas,
  modeltype,
  saveAlea,
  Y_data_sample,
  seqthd,
  resParam_save,
  Y_data_sample_lcc,
  MaxDist,
  Phi,
  model,
  lambda
)

Arguments

MC

index of the cross-validation subset to achieve

formulas

vector of model formulas to be tested

modeltype

sub-model type

saveAlea

list of indices of data observations used for validation

Y_data_sample

dataset on which to run cross-validation

seqthd

Sequence of thresholds tested to cut between 0 and 1 for PA data.

resParam_save

Vector of length of formulas with special parameter for Tweedie or Krige* models as calculated in AIC_indices

Y_data_sample_lcc

Projected dataset in meters for Krige* models

MaxDist

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

Phi

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

model

model formula written as character

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.

Value

if: modeltype in 'PA','PAGLM','PASeuil','TweedGLM' then: resAIC,resUBRE,resDev,ResDev_crossV,minUn,maxZero, MeanTHD,DiffSelSpe,ROC_crossV,MSE_crossV,Logl) if: in Cont, Density, KrigeGLM then: resAIC,resUBRE,resDev,ResDev_crossV,MeanPercentError,MSE_crossV,CorPearson,Logl