powered by
Fits an MCEN model
mcen(x, y, family = "mgaussian", ky = NULL, delta = NULL, gamma_y = 1, ndelta = 25, delta.min.ratio = NULL, eps = 1e-05, scale_x = TRUE, scale_y = TRUE, clusterMethod = "kmeans", clusterStartNum = 30, clusterIterations = 10, cluster_y = NULL, max_iter = 10, init_beta = NULL, n.cores = 1)
returns a MCEN object
List of the coefficient estimates.
Value of delta.
Value of gamma_y.
Value of ky.
List of the clusters of y.
Matrix of predictors.
Matrix of responses.
Type of likelihood used two options "mgaussian" or "mbinomial".
Clusters for response.
L1 penalty.
Penalty for with y clusters difference in predicted values.
Number of delta parameters.
Ratio between smallest and largest delta.
Convergence criteria.
Whether x matrix should be scaled, default is True.
Whether y matrix should be scaled, default is True.
K-means function used kmeans or kmeanspp.
Number of random starting points for clustering.
Number of iterations for cluster convergence.
An a priori definition of clusters. If clusters are provided they will remain fixed and are not estimated. Objective function is then convex.
Maximum number of iterations for coefficient estimates.
Clustering step requires an initial estimate, default is to use elastic net solution.
Number of cores used for calculation default is 1.
Ben Sherwood <ben.sherwood@ku.edu>, Brad Price <brad.price@mail.wvu.edu>
Price, B.S. and Sherwood, B. (2018). A Cluster Elastic Net for Multivariate Regression. arXiv preprint arXiv:1707.03530. http://arxiv-export-lb.library.cornell.edu/abs/1707.03530.
x <- matrix(rnorm(400),ncol=4) beta <- beta <- matrix(c(1,1,0,0,0,0,-1,-1,0,0,-1,-1,1,1,0,0),ncol=4) y <- x%*%beta + rnorm(400) mcen_fit <- mcen(x,y,ky=2,delta=1)
Run the code above in your browser using DataLab