glmnetr0.6-2 package

Nested Cross Validation for the Relaxed Lasso and Other Machine Learning Models

aicreg

Identify model based upon AIC criteria from a stepreg() putput

ann_tab_cv_best

Fit multiple Artificial Neural Network models on "tabular" provided as...

ann_tab_cv

Fit an Artificial Neural Network model on "tabular" provided as a matr...

best.preds

Get the best models for the steps of a stepreg() fit

boot.factor.foldid

Generate foldid's by 0/1 factor for bootstrap like samples where uniqu...

calceloss

calculate cross-entry for multinomial outcomes

calplot

Construct calibration plots for a nested.glmnetr output object

cox.sat.dev

Calculate the CoxPH saturated log-likelihood

cv.glmnetr

Get a cross validation informed relaxed lasso model fit. Available to ...

cv.stepreg

Cross validation informed stepwise regression model fit.

devrat_

Calculate deviance ratios for CV based

diff_time

Output to console the elapsed and split times

diff_time1

Get elapsed time in c(hour, minute, secs)

factor.foldid

Generate foldid's by factor levels

get.foldid

Get foldid's with branching for cox, binomial and gaussian models

get.id.foldid

Get foldid's when id variable is used to identify groups of dependent ...

glmnetr_seed

Get seeds to store, facilitating replicable results

glmnetr.cis

A redirect to nested.cis()

glmnetr.compcv

A redirect to nested.compare

glmnetr.simdata

Generate example data

nested.cis

Calculate performance measure "nominal" CI's and p's

nested.compare_0_5_1

Compare cross validation fit performances from a nested.glmnetr output...

nested.compare

Compare cross validation fit performances from a nested.glmnetr output...

nested.glmnetr

Using (nested) cross validation, describe and compare some machine lea...

orf_tune

Fit a Random Forest model on data provided in matrix and vector format...

plot_perf_glmnetr_0_5_5

Plot nested cross validation performance summaries

plot_perf_glmnetr

Plot nested cross validation performance summaries

plot.cv.glmnetr

Plot cross-validation deviances, or model coefficients.

plot.glmnetr

Plot the relaxed lasso coefficients.

plot.nested.glmnetr

Plot results from a nested.glmnetr() output

predict_ann_tab

Get predicteds for an Artificial Neural Network model fit in nested.gl...

predict.cv.glmnetr.el

Give predicteds for elastic net models form a nested..glmnetr() output...

predict.cv.glmnetr.list

Give predicteds for elastic net models form a nested..glmnetr() output...

predict.cv.glmnetr

Give predicteds for elastic net models form a nested.glmnetr() output ...

predict.cv.stepreg

Beta's or predicteds based upon a cv.stepreg() output object.

predict.nested.glmnetr

Give predicteds based upon the cv.glmnet output object contained in th...

print.nested.glmnetr

A redirect to the summary() function for nested.glmnetr() output objec...

print.orf_tune

Print output from orf_tune() function

print.rf_tune

Print output from rf_tune() function

rederive_orf

Rederive Oblique Random Forest models not kept in nested.glmnetr() out...

rederive_rf

Rederive Random Forest models not kept in nested.glmnetr() output

rederive_xgb

Rederive XGB models not kept in nested.glmnetr() output

rf_tune

Fit a Random Forest model on data provided in matrix and vector format...

roundperf

round elements of a summary.glmnetr() output

stepreg

Fit the steps of a stepwise regression.

summary.cv.glmnetr_0_6_1

Output summary for elastic net models fit within a nested.glmnetr() ou...

summary.cv.glmnetr

Output summary for elastic net models fit within a nested.glmnetr() ou...

summary.cv.stepreg

Summarize results from a cv.stepreg() output object.

summary.nested.glmnetr

Summarize a nested.glmnetr() output object

summary.orf_tune

Summarize output from rf_tune() function

summary.rf_tune

Summarize output from rf_tune() function

summary.stepreg

Briefly summarize steps in a stepreg() output object, i.e. a stepwise ...

xgb.simple

Get a simple XGBoost model fit (no tuning)

xgb.tuned

Get a tuned XGBoost model fit

Cross validation informed Relaxed LASSO (or more generally elastic net), gradient boosting machine ('xgboost'), Random Forest ('RandomForestSRC'), Oblique Random Forest ('aorsf'), Artificial Neural Network (ANN), Recursive Partitioning ('RPART') or step wise regression models are fit. Cross validation leave out samples (leading to nested cross validation) or bootstrap out-of-bag samples are used to evaluate and compare performances between these models with results presented in tabular or graphical means. Calibration plots can also be generated, again based upon (outer nested) cross validation or bootstrap leave out (out of bag) samples. For some datasets, for example when the design matrix is not of full rank, 'glmnet' may have very long run times when fitting the relaxed lasso model, from our experience when fitting Cox models on data with many predictors and many patients, making it difficult to get solutions from either glmnet() or cv.glmnet(). This may be remedied by using the 'path=TRUE' option when calling glmnet() and cv.glmnet(). Within the 'glmnetr' package the approach of path=TRUE is taken by default. other packages doing similar include 'nestedcv' <https://cran.r-project.org/package=nestedcv>, 'glmnetSE' <https://cran.r-project.org/package=glmnetSE> which may provide different functionality when performing a nested CV. Use of the 'glmnetr' has many similarities to the 'glmnet' package and it could be helpful for the user of 'glmnetr' also become familiar with the 'glmnet' package <https://cran.r-project.org/package=glmnet>, with the "An Introduction to 'glmnet'" and "The Relaxed Lasso" being especially useful in this regard.

  • Maintainer: Walter K Kremers
  • License: GPL-3
  • Last published: 2025-08-19