coef.FuncompCGL {Compack}R Documentation

Extract estimated coefficients from a "FuncompCGL" object.

Description

get the coefficients at the requested values for lam from a fitted FuncompCGL object.

Usage

## S3 method for class 'FuncompCGL'
coef(object, s = NULL, ...)

Arguments

object

fitted FuncompCGL object.

s

value(s) of the penalty parameter lam at which coefficients are requested. Default (NULL) is the entire sequence used to create the model.

...

Not used.

Details

s is a vector of lambda values at which the coefficients are requested. If s is not in the lam sequence used for fitting the model, the coef function will use linear interpolation, so the function should be used with caution.

Value

The coefficients at the requested tuning parameter values in s.

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, plot and print methods for "FuncompCGL" object.

Examples

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 = 2, intercept = TRUE,
                    SNR = 2, sigma = 2, rho_X = 0, rho_T = 0.5, 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)
coef(m1)
coef(m1, s = c(0.5, 0.1, 0.01))


[Package Compack version 0.1.0 Index]