cvhierr: k-fold cross-validation for hierarchical regularized...

Description Usage Arguments

View source: R/cvhierr.R

Description

k-fold cross-validation for hierarchical regularized regression hierr

Usage

1
2
3
4
cvhierr(x, y, external = NULL, unpen = NULL, family = c("gaussian"),
  penalty = definePenalty(), weights = NULL, type.measure = c("mse",
  "mae", "deviance"), nfolds = 5, foldid = NULL, parallel = FALSE,
  ...)

Arguments

x

predictor design matrix of dimension n x p

y

outcome vector of length n

external

(optional) external data design matrix of dimension p x q

unpen

(optional) unpenalized predictor design matrix

family

error distribution for outcome variable

penalty

specifies regularization object for x and external. See definePenalty for more details.

weights

optional vector of observation-specific weights. Default is 1 for all observations.

type.measure

loss function for cross-validation. Options include:

  • mse (Mean Squared Error)

  • deviance

  • mae (Mean Absolute Error)

nfolds

number of folds for cross-validation. Default is 5.

foldid

(optional) vector that identifies user-specified fold for each observation. If NULL, folds are automatically generated.

parallel

use foreach function to fit folds in parallel if TRUE, must register cluster (doParallel) before using.

...

list of additional arguments to pass to function hierr.


gmweaver/hierr documentation built on Oct. 4, 2018, 12:03 p.m.