View source: R/variable_selection.R
variable_selection | R Documentation |
This function performs variable selection, estimates a new vector eta and a new vector gamma
variable_selection(Y, X, gamma, k_max = 1, n_iter = 100, method = "min", nb_rep_ss = 1000, threshold = 0.6)
Y |
Observation matrix |
X |
Design matrix |
gamma |
Initial gamma vector |
k_max |
Number of iteration to repeat the whole algorithm |
n_iter |
Number of iteration for Newton-Raphson algorithm |
method |
Stability selection method: "min" or "cv". In "min" the smallest lambda is chosen, in "cv" cross-validation lambda is chosen for stability selection. The default is "min" |
nb_rep_ss |
Number of replications in stability selection step. The default is 1000 |
threshold |
Threshold for stability selection. The default is 0.9 |
estim_active |
Vector of stimated active coefficients |
eta_est |
Vector of estimated eta values |
gamma_est |
Vector of estimated gamma values |
Marina Gomtsyan
Maintainer: Marina Gomtsyan <marina.gomtsyan@agroparistech.fr>
M. Gomtsyan et al. "Variable selection in sparse multivariate GLARMA models: Application to germination control by environment", arXiv:2208.14721
data(Y) I=3 J=100 T=dim(Y)[2] q=1 X=matrix(0,nrow=(I*J),ncol=I) for (i in 1:I) { X[((i-1)*J+1):(i*J),i]=rep(1,J) } gamma_0 = matrix(0, nrow = 1, ncol = q) result=variable_selection(Y, X, gamma_0, k_max=1, n_iter=100, method="min", nb_rep_ss=1000, threshold=0.6) estim_active = result$estim_active eta_est = result$eta_est gamma_est = result$gamma_est
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.