CV_linearc: CV Linearc (c++)

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Computes the coefficient estimates for linear regression. ridge regularization and bridge regularization optional. This function is to be used with the "linearc" function

Usage

1
2
3
CV_linearc(X, y, lam = 0L, alpha = 0L, penalty = "none", weights = 0L,
  intercept = TRUE, kernel = FALSE, method = "SVD", tol = 1e-05,
  maxit = 10000, vec = 0L, init = 0L, K = 5L)

Arguments

X

matrix

y

matrix or vector of response values 0,1

lam

vector of tuning parameters for ridge regularization term. Defaults to 'lam = 0'

alpha

vector of tuning parameters for bridge regularization term. Defaults to 'alpha = 1.5'

penalty

choose from c('none', 'ridge', 'bridge'). Defaults to 'none'

intercept

Defaults to TRUE

method

optimization algorithm. Choose from 'IRLS' or 'MM'. Defaults to 'IRLS'

tol

tolerance - used to determine algorithm convergence. Defaults to 1e-5

maxit

maximum iterations. Defaults to 1e5

vec

optional vector to specify which coefficients will be penalized

init

optional initialization for MM algorithm

K

specify number of folds in cross validation, if necessary

Value

returns best lambda, best alpha, cv.errors


MGallow/logitr documentation built on May 6, 2019, 12:06 a.m.