mcen {mcen} | R Documentation |
Fits an MCEN model
Description
Fits an MCEN model
Usage
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)
Arguments
x |
Matrix of predictors. |
y |
Matrix of responses. |
family |
Type of likelihood used two options "mgaussian" or "mbinomial". |
ky |
Clusters for response. |
delta |
L1 penalty. |
gamma_y |
Penalty for with y clusters difference in predicted values. |
ndelta |
Number of delta parameters. |
delta.min.ratio |
Ratio between smallest and largest delta. |
eps |
Convergence criteria. |
scale_x |
Whether x matrix should be scaled, default is True. |
scale_y |
Whether y matrix should be scaled, default is True. |
clusterMethod |
K-means function used kmeans or kmeanspp. |
clusterStartNum |
Number of random starting points for clustering. |
clusterIterations |
Number of iterations for cluster convergence. |
cluster_y |
An a priori definition of clusters. If clusters are provided they will remain fixed and are not estimated. Objective function is then convex. |
max_iter |
Maximum number of iterations for coefficient estimates. |
init_beta |
Clustering step requires an initial estimate, default is to use elastic net solution. |
n.cores |
Number of cores used for calculation default is 1. |
Value
returns a MCEN object
beta |
List of the coefficient estimates. |
delta |
Value of delta. |
gamma_y |
Value of gamma_y. |
ky |
Value of ky. |
y_clusters |
List of the clusters of y. |
Author(s)
Ben Sherwood <ben.sherwood@ku.edu>, Brad Price <brad.price@mail.wvu.edu>
References
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.
Examples
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)