Description Usage Arguments Value Examples
Fits adaptive lasso
1 2 3 4 5 6 7 8 | fitadaplasso(
X,
Y,
tuning_seq = NULL,
len_tuning = 60,
gamma = 0.01,
eps = 0.001
)
|
X |
n x p design matrix of inputs |
Y |
n x 1 vector of outputs |
tuning_seq |
(optional)sequence of tuning parameters |
len_tuning |
length of desired tuning parameter sequence |
gamma |
a scalar(>0) input used in the weight(user input) |
eps |
precision level for convergence assessment, default 0.001 |
tuning_seq |
the actual sequence of tuning parameters used |
beta_lamb |
p x length(tuning_seq) matrix of corresponding solutions at each lambda value (original data without center or scale) |
intercept_vec |
Unscaled vector of intercepts for a fixed gamma and for different lambda values
1 2 3 4 5 6 7 8 9 10 11 12 | #EXAMPLE 1
X <- matrix(rnorm(500), 50, 10)
Y <- rnorm(50)
gamma <- 2
# Fits adaptive adaplasso
fit <- fitadaplasso(X , Y , gamma = gamma)
# EXAMPLE 2
X <- matrix(rchisq(500, 3), 50, 10)
Y <- rbinom(50)
tuning_seq <- runif(100, 1, 2)
#Fits adaptive adaplasso
fit2 <- fitadaplasso(X, Y, tuning_seq = tuning_seq, gamma = 0.1, eps = 0.002 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.