cv_gpls: Cross Validation for Generalized Projection to Latent...

Description Usage Arguments Details Value

View source: R/cv_gpls.R

Description

Cross Validation for Generalized Projection to Latent Structures Regression

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
cv_gpls(
  formula,
  data,
  family = NULL,
  link = NULL,
  cv.method = "boot632",
  nfolds = 5,
  nrep = 4,
  crit = NULL,
  select = "oneSE",
  folds = NULL,
  preproc = c("center", "scale")
)

Arguments

formula

a model formula

data

a training data set

family

the glm family. One of "gaussian", "student", "poisson", "negbinom", "binomial", "multinom", "gamma", "invgauss"

link

the link function. See details for more information.

cv.method

preferably one of "boot632" (the default), "cv", or "repeatedcv".

nfolds

the number of bootstrap or cross-validation folds to use. defaults to 5.

nrep

the number of repetitions for cv.method = "repeatedcv". defaults to 4.

crit

the criterion by which to evaluate the model performance. See details for more information.

select

the selection rule to use. Should be one of "best" or "oneSE" (the default).

folds

a vector of pre-set cross-validation or bootstrap folds from caret::createResample or caret::createFolds.

Details

The available summary statistics for the argument "crit" depend on which likelihood function is chosen for the glm family.

If the outcome is multinomial, it should be one of "Kappa" (the default), "Accuracy", "Mean_F1", "Mean_Sensitivity", "Mean_Specificity", "Mean_Pos_Pred_Value", "Mean_Neg_Pred_Value", "Mean_Precision", "Mean_Recall", or "Mean_Detection_Rate".

If the outcome is binomial, it should be one of "Spec" (Specificity, the default) or "Sens".

Otherwise, it should be one of "MAE" (the default) or "MSE".


#' The following link functions are available for each distribution:

Gaussian & Student's T: "identity"
Binomial & Multinomial: "logit", "probit", "cauchit", "robit" (Student T with 3 df), and "cloglog"
Poisson & Negative Binomial: "log"
Gamma: "inverse" (1 / x)
Inverse Gaussian: "invsquare" (1/x^2)

Value

a train object


abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.