cv.aglm: Cross-validation for AGLM models

Description Usage Arguments Value

View source: R/cv-aglm.R

Description

Cross-validation for AGLM models

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
cv.aglm(x, y, qualitative_vars_UD_only = NULL,
  qualitative_vars_both = NULL, qualitative_vars_OD_only = NULL,
  quantitative_vars = NULL, add_linear_columns = TRUE,
  add_OD_columns_of_qualitatives = TRUE,
  add_interaction_columns = TRUE, OD_type_of_quantitatives = "C",
  bins_list = NULL, bins_names = NULL, weights, offset = NULL,
  lambda = NULL, type.measure, nfolds = 10, foldid, grouped = TRUE,
  keep = FALSE, parallel = FALSE, standardize = TRUE,
  family = c("gaussian", "binomial", "poisson"), alpha = 1,
  nlambda = 100, lambda.min.ratio = NULL, intercept = TRUE,
  thresh = 1e-07, dfmax = NULL, pmax = NULL, exclude,
  penalty.factor = NULL, lower.limits = -Inf, upper.limits = Inf,
  maxit = 1e+05, type.gaussian = NULL, type.logistic = c("Newton",
  "modified.Newton"), standardize.response = FALSE)

Arguments

x

An input matrix or data.frame to be fitted.

y

An integer or numeric vector which represents response variable.

qualitative_vars_UD_only

A list of indices or names for specifying which columns are qualitative and need only U-dummy representations.

qualitative_vars_both

A list of indices or names for specifying which columns are qualitative and need both U-dummy and O-dummy representations.

qualitative_vars_OD_only

A list of indices or names for specifying which columns are qualitative and need only O-dummy representations.

quantitative_vars

A list of indices or names for specyfying which columns are quantitative.

add_linear_columns

A boolean value which indicates whether this function uses linear effects or not.

add_OD_columns_of_qualitatives

A boolean value which indicates whether this function use O-dummy representations for qualitative and ordinal variables or not.

add_interaction_columns

A boolean value which indicates whether this function uses interaction effects or not.

OD_type_of_quantitatives

A character value which indicates how O-dummy matrices of quantitative values are constructed. Choose 'C'(default) or 'J'.

  • 'C': Continuous-type dummies, which result continuous contribution curves.

  • 'J': Jum-type dummies, which result contribution curves with jumps.

bins_list

A list of numeric vectors, each element of which is used as breaks when binning of a quantitative variable or a qualitative variable with order.

bins_names

A list of column name or column index, each name or index of which specifies which column of x is binned used with an element of bins_list in the same position.

family

Response type. Currently "gaussian", "binomial", and "poisson" are supported.

...

Other arguments are passed directly to backend (currently cv.glmnet() is used), and if not given, backend API's default values are used to call backend functions.

Value

Result of cross-validation.


kazuzowo/aglm-LVar documentation built on Dec. 10, 2019, 12:13 a.m.