Description Usage Arguments Details Value Examples
Calculate GIC for compCL, return value of lam
.
The function follows Variable selection in regression with compositional covariates by
WEI LIN, PIXU SHI, RUI FENG AND HONGZHE LI
1 | GIC.compCL(y, Z, Zc = NULL, intercept = FALSE, lam = NULL, ...)
|
y |
a vector of response variable with length n. |
Z |
a n*p matrix after taking log transformation on compositional data. |
Zc |
a design matrix of other covariates considered. Default is |
intercept |
Whether to include intercept in the model. Default is TRUE. |
lam |
a user supplied lambda sequence. Typically, by leaving this option unspecified users can have the
program compute its own |
... |
other arguments that can be passed to compCL. |
\textrm{GIC}(λ) = \log{\hat{σ}^2_λ} + (s_λ - 1) \frac{\log{\log{n}}}{n} \log{max(p, n)}
, where \hat{σ}^2_λ is the MSE for fitted path.
an object of class GIC.compCL
is returned.
compCL.fit |
a fitted |
lam |
the values of |
GIC |
a vector of GIC values for each |
lam.min |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | p = 30
n = 50
beta = c(1, -0.8, 0.6, 0, 0, -1.5, -0.5, 1.2)
beta = c(beta, rep(0, times = p - length(beta)))
Comp_data = comp_simulation(n = n, p = p,
rho = 0.2, sigma = 0.5,
gamma = 0.5, add.on = 1:5,
beta = beta, intercept = FALSE)
Comp_data$Zc
GICm <- GIC.compCL(y = Comp_data$y,
Z = Comp_data$X.comp, Zc = Comp_data$Zc,
intercept = Comp_data$intercept,
lam = NULL,lambda.factor = 0.0001,
dfmax = p, outer_eps = 1e-10, mu_ratio = 1)
coef(GICm)
plot(y = GICm$GIC, x = log(GICm$lam), ylab = "GIC", xlab = "Log(Lambda)" )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.