cv.mimi {mimi}R Documentation

selection of the regularization parameters (lambda1 and lambda2) of the mimi function by cross-validation

Description

selection of the regularization parameters (lambda1 and lambda2) of the mimi function by cross-validation

Usage

cv.mimi(y, model = c("low-rank", "covariates"), var.type, x = NULL,
  groups = NULL, N = 5, algo = c("mcgd", "bcgd"), thresh = 1e-05,
  maxit = 100, max.rank = NULL, trace.it = F, parallel = F,
  len = 15)

Arguments

y

[matrix, data.frame] incomplete and mixed data frame (nxp)

model

either one of "groups", "covariates" or "low-rank", indicating which model should be fitted

var.type

vector of length p indicating types of y columns (gaussian, binomial, poisson)

x

[matrix, data.frame] covariate matrix (npxq)

groups

factor of length n indicating groups (optional)

N

[integer] number of cross-validation folds

algo

type of algorithm to use, either one of "bcgd" (small dimensions, gaussian and binomial variables) or "mcgd" (large dimensions, poisson variables)

thresh

[positive number] convergence threshold, default is 1e-5

maxit

[integer] maximum number of iterations, default is 100

max.rank

[integer] maximum rank of interaction matrix, default is 2

trace.it

[boolean] whether information about convergence should be printed

parallel

[boolean] whether the N-fold cross-validation should be parallelized, default value is TRUE

len

[integer] the size of the grid

Value

A list with the following elements

lambda1

regularization parameter estimated by cross-validation for nuclear norm penalty (interaction matrix)

lambda2

regularization parameter estimated by cross-validation for l1 norm penalty (main effects)

errors

a table containing the prediction errors for all pairs of parameters


[Package mimi version 0.2.0 Index]