Compares univariate and multivariate regression.

cv.joinet(
Y,
X,
family = "gaussian",
nfolds.ext = 5,
nfolds.int = 10,
foldid.ext = NULL,
foldid.int = NULL,
type.measure = "deviance",
alpha.base = 1,
alpha.meta = 1,
compare = FALSE,
mice = FALSE,
cvpred = FALSE,
times = FALSE,
...
)

## Arguments

Y |
outputs**:**
numeric matrix with \(n\) rows (samples)
and \(q\) columns (variables),
with positive correlation (see details) |

X |
inputs**:**
numeric matrix with \(n\) rows (samples)
and \(p\) columns (variables) |

family |
distribution**:**
vector of length \(1\) or \(q\) with entries
`"gaussian"` , `"binomial"` or `"poisson"` |

nfolds.ext |
number of external folds |

nfolds.int |
number of internal folds |

foldid.ext |
external fold identifiers**:**
vector of length \(n\) with entries
between \(1\) and `nfolds.ext` ;
or `NULL` |

foldid.int |
internal fold identifiers**:**
vector of length \(n\) with entries
between \(1\) and `nfolds.int` ;
or `NULL` |

type.measure |
loss function**:**
vector of length \(1\) or \(q\) with entries
`"deviance"` , `"class"` , `"mse"` or `"mae"`
(see `cv.glmnet` ) |

alpha.base |
elastic net mixing parameter for base learners**:**
numeric between \(0\) (ridge) and \(1\) (lasso) |

alpha.meta |
elastic net mixing parameter for meta learner**:**
numeric between \(0\) (ridge) and \(1\) (lasso) |

compare |
experimental arguments**:**
character vector with entries "mnorm", "spls", "mrce",
"sier", "mtps", "rmtl", "gpm" and others
(requires packages `spls` , `MRCE` , `SiER` , `MTPS` , `RMTL` or `GPM` ) |

mice |
missing data imputation**:**
logical (`mice=TRUE` requires package `mice` ) |

cvpred |
return cross-validated predicitions: logical |

... |
further arguments passed to `glmnet`
and `cv.glmnet` |

## Value

This function returns a matrix with \(q\) columns,
including the cross-validated loss from the univariate models
(`base`

), the multivariate models (`meta`

),
and the intercept-only models (`none`

).

## Examples