Description Usage Arguments Value Examples
View source: R/FunctionsALasso.R
Fits adaptive adaplasso based on standardized data
1 | adaplassostd_lambda(Xstd, Ystd, lambda, beta_init = NULL, eps = 0.001)
|
Xstd |
n x p design matrix X scaled according to LARS algorithm and centered to mean 0 |
Ystd |
n x 1 centered output vector |
lambda |
tuning parameter(scalar) |
beta_init |
p x 1, optional starting point for coordinate descent algorithm |
eps |
precision level for convergence assessment, default 0.001 |
beta |
vector of parameters |
obj_min |
optimal value of the objective function |
1 2 3 4 5 6 7 8 9 10 11 12 | X <- matrix(rnorm(500), 50, 10)
Y <- rnorm(50)
gamma <- 2
#Standardizing X and Y
std <- standardize(X , Y , gamma)
#Deriving weighted and centered design matrix
Xstd <- std$Xstd
#Deriving centered Y
Ystd <- std$Ystd
# tuning parameter
lambda <- 0.1
fit <- adaplassostd_lambda(Xstd, Ystd, lambda)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.