epsLasso | R Documentation |
This function tests the effects of predictors modelled jointly for high-dimensional extreme phenotype sampling data. The result returns 3 items: pvals, beta, and sigma. pvals contains score, wald, and partial likelihood ratio test p-value. beta is the point estimate of the regression coefficient. sigma is the estimate of random noise.
epsLasso(X, Y, c1, c2, lam0 = NULL, m_w = "lso", scal.x = TRUE, center.y = TRUE, paral = FALSE, paral_n = NULL, resol = 1.3, tol = 0.001, maxTry = 10, verbose = TRUE)
X |
Matrix of predictors. Required. |
Y |
Trait values. Required. |
c1 |
Right censored point. Required. |
c2 |
Left censored point. Required. |
lam0 |
A sequence of lambda values. Default is the sequence used in GLMNET. |
m_w |
Methods used to estimate W matrix. Default is "lso" for LASSO solution using glmnet. Another method is "dzg" for Danzig-type estimator. |
scal.x |
Scale matrix X or not. Default is TRUE. |
center.y |
Center Y or not. Default is TRUE. |
paral |
Parallel computing indicator. Default is FALSE, not using parallel. |
paral_n |
Number of cores that are used for parallel computing. Default is NULL. When paral is TRUE, default is the number of system available cores - 1. |
resol |
The refining step when m_w="dzg". Default is 1.3. A large resol results in faster convergence speed, but rough solutions. |
tol |
The convergence threshold for refining when m_w="dzg". Default is 0.001. |
maxTry |
The maximum refining steps when m_w="dzg". Default is 10. |
verbose |
Print debugging info or not. |
library(mvtnorm) sd=1 n=100 p1=0.2 p2=0.2 p=100 nc=10 eff=0.5 beta_eff=c(rep(eff,nc),rep(0,p-nc)) cov_m=diag(p) X_b=rmvnorm(n,mean=c(rep(1,p/2),rep(2,p/2)), sigma=cov_m) Y_b=X_b%*%beta_eff+rnorm(n,0,sd) sample_threshold_low=ceiling(n*p1) sample_threshold_up=ceiling(n*p2) ind_sample = order(Y_b)[c(1:sample_threshold_low,(n-sample_threshold_up+1):n)] Y_p = Y_b[ind_sample] c1 = min(Y_b[ind_sample[-(1:sample_threshold_low)]]) c2 = max(Y_b[ind_sample[1:sample_threshold_low]]) X_p = X_b[ind_sample,] res=epsLasso(X_p,Y_p,c1,c2) res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.