Description Usage Arguments Value Examples
Fits regularization paths for longitudinal compositional data with lasso penalty at a sequence of regularization parameters lambda.
| 1 2 3 4 5 | 
| 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. | 
| pf | penalty factor, a vector in length of p. Separate penalty weights can be applied to each coefficience β for composition variates to allow differential shrinkage. Can be 0 for some β's, which implies no shrinkage, and results in that composition always being included in the model. Default value for each entry is the 1. | 
| lam | a user supplied lambda sequence. Typically, by leaving this option unspecified users can have the
program compute its own  | 
| nlam | the length of  | 
| lambda.factor | the factor for getting the minimal lambda in  | 
| dfmax | limit the maximum number of groups in the model. Useful for very large p, if a partial path is desired - default is p. | 
| pfmax | limit the maximum number of groups ever to be nonzero. For example once a group enters the
model along the path, no matter how many times it exits or re-enters model through the path,
it will be counted only once. Default is  | 
| u | 
 | 
| mu_ratio | 
 | 
| tol | tolerance for vectors beta'ss to be considered as none zero's. For example, coefficient
β_j for group j, if max(abs(β_j)) <  | 
| outer_maxiter | 
 | 
| outer_eps | 
 | 
| inner_maxiter | 
 | 
| inner_eps | 
 | 
An object with S3 calss compCL
| beta | a matrix of coefficients for  | 
| lam | the actual sequence of  | 
| df | the number of non-zero β's in estimated coefficients for  | 
| npass | total iteration conducted in computation. | 
| error | error message for path at each each value of  | 
| call | the call that produced this object. | 
| dim | dimension of coefficient matrix | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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
m1 <- compCL(y = Comp_data$y, Z = Comp_data$X.comp, Zc = Comp_data$Zc,
             intercept = Comp_data$intercept,
             pf = rep(1, times = p),
             lam = NULL, nlam = 100,lambda.factor = ifelse(n < p, 0.05, 0.001),
             dfmax = 20, #pfmax = min(dfmax * 1.5, p),
             mu_ratio = 1, tol = 1e-10,
             outer_maxiter = 1e8, outer_eps = 1e-10,
             inner_maxiter = 1e3, inner_eps = 1e-6)
drop(m1$lam)
coef(m1, s = c(1, 0.5, 0.1))
#coef(m1)
Znew <- Comp_data$Z[1:5,]
print(predict(m1, Znew = Znew[1:5, ], s = m1$lam[15:20]))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.