plot.FuncompCGL: Plot solution paths from a '"FuncompCGL"' object.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/tools.R

Description

Produce a coefficient profile plot of the coefficient paths for a fitted "FuncompCGL" object.

Usage

1
2
## S3 method for class 'FuncompCGL'
plot(x, ylab = c("L2", "L1"), xlab = c("log", "-log", "lambda"), ...)

Arguments

x

fitted "FuncompCGL" object.

ylab

what is the on Y-axis, "L2" (default) plots against the L2-norm of each group of coefficients, "L1" against L1-norm.

xlab

what is on the X-axis, "log" plots against log(lambda) (default), "-log" against -log(lambda), and "lambda" against lambda.

...

other graphical parameters.

Details

A solution path plot is produced.

Value

No return value. Side effect is a base R plot.

Author(s)

Zhe Sun and Kun Chen

References

Sun, Z., Xu, W., Cong, X., Li G. and Chen K. (2020) Log-contrast regression with functional compositional predictors: linking preterm infant's gut microbiome trajectories to neurobehavioral outcome, https://arxiv.org/abs/1808.02403 Annals of Applied Statistics

See Also

FuncompCGL, and predict, coef and print methods for "FuncompCGL" object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
df_beta = 5
p = 30
beta_C_true = matrix(0, nrow = p, ncol = df_beta)
beta_C_true[1, ] <- c(-0.5, -0.5, -0.5 , -1, -1)
beta_C_true[2, ] <- c(0.8, 0.8,  0.7,  0.6,  0.6)
beta_C_true[3, ] <- c(-0.8, -0.8 , 0.4 , 1 , 1)
beta_C_true[4, ] <- c(0.5, 0.5, -0.6  ,-0.6, -0.6)
Data <- Fcomp_Model(n = 50, p = p, m = 0, intercept = TRUE,
                    SNR = 4, sigma = 3, rho_X = 0, rho_T = 0.6, df_beta = df_beta,
                    n_T = 20, obs_spar = 1, theta.add = FALSE,
                    beta_C = as.vector(t(beta_C_true)))
m1 <- FuncompCGL(y = Data$data$y, X = Data$data$Comp, Zc = Data$data$Zc,
                 intercept = Data$data$intercept, k = df_beta, tol = 1e-10)
plot(m1)
plot(m1, ylab = "L1", xlab = "-log")

Compack documentation built on July 1, 2020, 10:26 p.m.