Description Usage Arguments Value Author(s) References Examples
This function provides the coefficient matrix estimator of high-dimensional multivariate regression (MVR) with penalty lasso
(mcp
or scad
). The tuning parameter is selected by BIC
(the default), AIC
, EBIC
, CV
, or GCV
.
1 2 3 |
Y |
The response, a vector of size n or a matrix of size n\times q |
X |
The covariates to be penalized, a matrix with dimension n\times p |
Z |
The covariates without penalization, a matrix with dimension n\times d. The default is |
method |
The method to be applied to select parameters. Either |
ncv |
The number of cross-validation folds. Default is 10. If |
penalty |
The penalty to be applied to the model. Either "LASSO" (the default), "SCAD", or "MCP". |
isPenColumn |
A logical value indicating whether the coefficients associating with X_j that affects whole response
y is penalized. Default is |
lambda |
A user-specified sequence of lambda values. By default,
a sequence of values of length |
nlam |
The number of lambda values. Default is 50. |
intercept |
Should intercept(s) be fitted (default= |
lam_min |
The smallest value for lambda, as a fraction of lambda.max. Default is 1e-3. |
eps |
Convergence threshhold. The algorithm iterates until the
relative change in any coefficient is less than |
maxstep |
Maximum number of iterations. Default is |
gamma_pen |
The tuning parameter of the MCP/SCAD penalty (see details). |
dfmax |
Upper bound for the number of nonzero coefficients. Default is no upper bound. However, for large data sets, computational burden may be heavy for models with a large number of nonzero coefficients. |
alpha |
Tuning parameter for the Mnet estimator which controls
the relative contributions from the LASSO, MCP/SCAD penalty and the ridge,
or L2 penalty. |
Bhat |
Estimator of |
rss |
Residual sum of squares (RSS). |
activeX |
The active set of X. It is a p dimensional vector. |
lambda |
The sequence of regularization parameter values in the path. |
selectedID |
The index of |
lambda_opt |
The value of |
bic |
BIC value used to select variables. |
muhat |
Estimator of intercept μ. It is |
Chat |
Estimator of coefficients of Z. |
Y |
Response Y. |
X |
Design matrix X. |
Chao Cheng, Xingdong Feng, Jian Huang and Xu Liu (liu.xu@sufe.edu.cn)
Cheng, C., Feng, X., Huang, J. and Liu, X. (2020). Regularized projection score estimation of treatment effects in high-dimensional quantile regression. Manuscript.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | library(pqr)
#example 1
n <- 200
q <- 5
s <- 3
p <- 100
B <- matrix(runif(q*s, 2,3), s)
X <- matrix(rnorm(n*p),n,p)
Y <- X[,1:s]%*%B + matrix(rnorm(n*q),n)
fit <- mvr(Y,X)
fit$activeX
fit$Bhat
which(rowSums(fit$Bhat^2)>0)
fit$muhat
#example 2
n <- 200
q <- 5
s <- 3
d <- 3
p <- 100
B <- matrix(runif(q*s, 2,3), s)
C <- matrix(runif(q*d, 1,2), d)
X <- matrix(rnorm(n*p),n,p)
Z <- matrix(rnorm(n*d),n)
Y <- X[,1:s]%*%B + Z%*%C + matrix(rnorm(n*q),n)
fit <- mvr(Y,X,Z)
fit$activeX
fit$Bhat
which(rowSums(fit$Bhat^2)>0)
fit$Chat
fit$muhat
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.