GIC.compCL: GIC cirterion selection for compCL

Description Usage Arguments Details Value Examples

Description

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

Usage

1
GIC.compCL(y, Z, Zc = NULL, intercept = FALSE, lam = NULL, ...)

Arguments

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 NULL.

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 lam sequence based on nlam and lambda.factor If lam is provided but a scaler, lam sequence is also created starting from lam. Supplying a value of lambda overrides this. It is better to supply a decreasing sequence of lambda values, if not, the program will sort user-defined lambda sequence in decreasing order automatically.

...

other arguments that can be passed to compCL.

Details

\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.

Value

an object of class GIC.compCL is returned.

compCL.fit

a fitted compCL object for the full data

lam

the values of lam used in the fits

GIC

a vector of GIC values for each lam

lam.min

lam value such that minimize GIC(λ)

Examples

 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)" )

jiji6454/Rpac_compReg documentation built on May 31, 2019, 5:01 a.m.