cv.joinet.html 9.81 KB
 Armin Rauschenberger committed Feb 04, 2019 1 2   Armin Rauschenberger committed Jul 31, 2019 3   Armin Rauschenberger committed Feb 04, 2019 4 5 6 7 8   Armin Rauschenberger committed Jul 31, 2019 9 Model comparison — cv.joinet • joinet  Armin Rauschenberger committed Feb 04, 2019 10   Armin Rauschenberger committed Nov 12, 2019 11   Armin Rauschenberger committed Feb 04, 2019 12   Armin Rauschenberger committed Jun 05, 2020 13   Armin Rauschenberger committed Feb 04, 2019 14   Armin Rauschenberger committed Jun 05, 2020 15   Armin Rauschenberger committed Feb 04, 2019 16   Armin Rauschenberger committed Nov 12, 2019 17   Armin Rauschenberger committed Jun 05, 2020 18 19 20 21 22   Armin Rauschenberger committed Feb 04, 2019 23 24   Armin Rauschenberger committed Jun 05, 2020 25 26   Armin Rauschenberger committed Feb 04, 2019 27 28   Armin Rauschenberger committed Jun 05, 2020 29   Armin Rauschenberger committed Feb 04, 2019 30   Armin Rauschenberger committed Nov 12, 2019 31   Armin Rauschenberger committed Jun 05, 2020 32 33   Armin Rauschenberger committed Feb 04, 2019 34 35 36 37 38 39 40 41   Armin Rauschenberger committed Nov 12, 2019 42   Armin Rauschenberger committed Aug 08, 2019 43   Armin Rauschenberger committed Feb 04, 2019 44 45 46   Armin Rauschenberger committed Nov 12, 2019 47   Armin Rauschenberger committed Feb 04, 2019 48   Armin Rauschenberger committed Jul 31, 2019 49 50   Armin Rauschenberger committed Feb 04, 2019 51 52 53 54 55 56 57   Armin Rauschenberger committed Nov 12, 2019 58   Armin Rauschenberger committed Feb 04, 2019 59 60   Armin Rauschenberger committed Jun 05, 2020 61   Armin Rauschenberger committed Feb 04, 2019 62 63 64 65 66 
 Armin Rauschenberger committed Nov 12, 2019 114   Armin Rauschenberger committed Feb 04, 2019 115 116 117 118 119 
 Armin Rauschenberger committed Aug 08, 2019 126 

Compares univariate and multivariate regression.

 Armin Rauschenberger committed Feb 04, 2019 127 128 
 Armin Rauschenberger committed May 07, 2020 129 130 131 132 133 134 135 136 137 138 
cv.joinet(   Y,   X,   family = "gaussian",   nfolds.ext = 5,   nfolds.int = 10,   foldid.ext = NULL,   foldid.int = NULL,   type.measure = "deviance",   alpha.base = 1, 
Armin Rauschenberger committed Jun 08, 2020  139                                                                                                                                                                                                            alpha.meta = 1, 
Armin Rauschenberger committed Jul 01, 2020  140                                                                                                                                                                                                            compare = FALSE, 
Armin Rauschenberger committed Jun 05, 2020  141                                                                                                                                                                                                            mice = FALSE, 
Armin Rauschenberger committed May 07, 2020  142                                                                                                                                                                                                            cvpred = FALSE, 
Armin Rauschenberger committed Jun 29, 2020  143                                                                                                                                                                                                            times = FALSE, 
Armin Rauschenberger committed May 07, 2020  144     145                                                                                                                                                                                                    ... )
 Armin Rauschenberger committed Nov 12, 2019 146   Armin Rauschenberger committed Feb 04, 2019 147 148 149 150 

Arguments

Y

outputs: numeric matrix with $$n$$ rows (samples) and $$q$$ columns (variables), with positive correlation (see details)

X

inputs:  Armin Rauschenberger committed Feb 04, 2019 160 161 162 163 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"  Armin Rauschenberger committed Nov 12, 2019 196 (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:  Armin Rauschenberger committed Jun 11, 2019 206 numeric between $$0$$ (ridge) and $$1$$ (lasso)

compare

experimental arguments:  Armin Rauschenberger committed Jun 08, 2020 211 212 213 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

 Armin Rauschenberger committed Jun 07, 2019 151 152 153 154 155   Armin Rauschenberger committed Feb 04, 2019 156 157 158   Armin Rauschenberger committed Jun 07, 2019 159   Armin Rauschenberger committed Jun 07, 2019 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189   Armin Rauschenberger committed Feb 04, 2019 190 191 192   Armin Rauschenberger committed Jun 07, 2019 193 194 195   Armin Rauschenberger committed Jun 07, 2019 197 198 199 200 201 202 203 204 205   Armin Rauschenberger committed Jun 07, 2019 207 208   Armin Rauschenberger committed Jun 08, 2020 209   Armin Rauschenberger committed Jul 31, 2019 210   Armin Rauschenberger committed Jun 05, 2020 214 215 216 217 218   Armin Rauschenberger committed Jun 07, 2019 219   Armin Rauschenberger committed Nov 12, 2019 220 221   Armin Rauschenberger committed Jun 05, 2020 222   Armin Rauschenberger committed Nov 12, 2019 223   Armin Rauschenberger committed Jun 07, 2019 224 225   Armin Rauschenberger committed Nov 12, 2019 226 227   Armin Rauschenberger committed Feb 04, 2019 228 229   Armin Rauschenberger committed Nov 12, 2019 230   Armin Rauschenberger committed Aug 02, 2019 231 232 233 

Value

This function returns a matrix with $$q$$ columns,  Armin Rauschenberger committed Aug 08, 2019 234 235 236 including the cross-validated loss from the univariate models (base), the multivariate models (meta), and the intercept-only models (none).

 Armin Rauschenberger committed Feb 04, 2019 237 238 

Examples

 Armin Rauschenberger committed Nov 12, 2019 239 

Armin Rauschenberger committed Feb 04, 2019  240                                                                                                                                                                                                             
Armin Rauschenberger committed Jun 05, 2020  241     242     243     244                                                                                                                                                                                       
Armin Rauschenberger committed Nov 12, 2019  248                                                                                                                                                                                                           
Armin Rauschenberger committed Feb 04, 2019  249     250                                                                                                                                                                                                                  
Armin Rauschenberger committed Nov 12, 2019  263                                                                                                                                                                                                           
Armin Rauschenberger committed Feb 04, 2019  264     265     266                                                                                                                                                                                               
Armin Rauschenberger committed Nov 12, 2019  267