Learn R Programming

palasso (version 1.0.0)

.cv: Cross-validation

Description

Repeatedly leaves out samples, and predicts their response.

Usage

.cv(y, x, foldid, lambda, args)

Value

Returns matrix of predicted values (except "cox")

Arguments

y

response: vector of length \(n\)

x

covariates: matrix with \(n\) rows (samples) and \(k * p\) columns (variables)

foldid

fold identifiers: vector of length \(n\), with entries from \(1\) to nfolds

lambda

lambda sequence: vector of decreasing positive values

args

options for paired lasso: list of arguments (output from .dims and .args)

Examples

Run this code
NA

Run the code above in your browser using DataLab