Learn R Programming

mcen (version 1.2.1)

Multivariate Cluster Elastic Net

Description

Fits the Multivariate Cluster Elastic Net (MCEN) presented in Price & Sherwood (2018) . The MCEN model simultaneously estimates regression coefficients and a clustering of the responses for a multivariate response model. Currently accommodates the Gaussian and binomial likelihood.

Copy Link

Version

Install

install.packages('mcen')

Monthly Downloads

231

Version

1.2.1

License

MIT + file LICENSE

Maintainer

Ben Sherwood

Last Published

March 22nd, 2023

Functions in mcen (1.2.1)

cluster

Wrapper function for different clustering methods
predict.cv.mcen

Makes predictions from the model with the smallest cross-validation error.
matrix_multiply

matrix multiply
mcen

Fits an MCEN model
predict.mcen

predictions from a mcen model
CalcHorseEBin

Creates the probabilities and working response for the glmnet update for a given response with a binomial family
mcen_bin_workhorse

Calculates cluster assignment and coefficient estimates for a binomial mcen.
mcen.init

Provides initial estimates for the mcen functionF
cv.mcen

Cross validation for mcen function
get_best_cvm

Gets the index position for the model with the smallest cross-validation error.
pred_eval.mbinom_mcen

Evaluates prediction error for multiple binomial responses.
print.cv.mcen

Prints nice output for a cv.mcen object.
print.mcen

Prints nice output for an mcen object.
pred_eval.mgauss_mcen

Calculates the prediction error for a mgauss_mcen object.
vl_binom

Calculates out of sample error on the binomial likelihood
mcen_workhorse

Estimates the clusters and provides the coefficients for an mcen object
cluster.vals

Returns the cluster values from a cv.mcen object.
pred_eval

Calculates the out of sample likelihood for an mcen object
randomly_assign

randomly assign n samples to k groups
squared_error

Calculates sum of squared error between two vectors or matrices
SetEq

SetEq test set equivalence of two clustering sets
beta_adjust_bin

Adjusts the value of the binomial coefficients to account for the scaling of x.
coef.cv.mcen

Returns the coefficients from the cv.mcen object with the smallest cross-validation error.
bin_horse

The workhorse function for the binomial updates in mcen. It uses IRWLS glmnet updates to solve the regression problem.
CalcHorseBin

Creates the the working response for all responses for glmnet binomial family
beta_adjust

Adjusts the value of the coefficients to account for the scaling of x and y.
coef.mcen

Returns the coefficients from an mcen object.