View source: R/ic.panel.sglfit.R
ic.panel.sglfit | R Documentation |
Does information criteria for panel data sg-LASSO regression model.
The function runs sglfit 1 time; computes the path solution in lambda
sequence.
Solutions for BIC
, AIC
and AICc
information criteria are returned.
ic.panel.sglfit(x, y, lambda = NULL, gamma = 1.0, gindex = 1:p, method = c("pooled","fe"), nf = NULL, ...)
x |
NT by p data matrix, where NT and p respectively denote the sample size of pooled data and the number of regressors. |
y |
NT by 1 response variable. |
lambda |
a user-supplied lambda sequence. By leaving this option unspecified (recommended), users can have the program compute its own λ sequence based on |
gamma |
sg-LASSO mixing parameter. γ = 1 gives LASSO solution and γ = 0 gives group LASSO solution. |
gindex |
p by 1 vector indicating group membership of each covariate. |
method |
choose between 'pooled' and 'fe'; 'pooled' forces the intercept to be fitted in sglfit, 'fe' computes the fixed effects. User must input the number of fixed effects |
nf |
number of fixed effects. Used only if |
... |
Other arguments that can be passed to sglfit. |
method='pooled'
) method='fe'
) ic.panel.sglfit object.
Jonas Striaukas
set.seed(1) x = matrix(rnorm(100 * 20), 100, 20) beta = c(5,4,3,2,1,rep(0, times = 15)) y = x%*%beta + rnorm(100) gindex = sort(rep(1:4,times=5)) ic.panel.sglfit(x = x, y = y, gindex = gindex, gamma = 0.5, standardize = FALSE, intercept = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.