classo_path: Compute solution path of constrained lasso.

Description Usage Arguments Value Examples

View source: R/robregcc.R

Description

The model uses scaled lasoo approach for model selection.

Usage

1
classo_path(Xt, y, C, we = NULL, control = list())

Arguments

Xt

CLR transformed predictor matrix.

y

model response vector

C

sub-compositional matrix

we

specify weight of model parameter

control

a list of internal parameters controlling the model fitting

Value

betapath

solution path estimate

beta

model parameter estimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(robregcc)
library(magrittr)

data(simulate_robregcc)
X <- simulate_robregcc$X;
y <- simulate_robregcc$y
C <- simulate_robregcc$C
n <- nrow(X); p <- ncol(X); k <-  nrow(C)


#
Xt <- cbind(1,X)                         # accounting for intercept in predictor
C <- cbind(0,C)                           # accounting for intercept in constraint
bw <- c(0,rep(1,p))                       # weight matrix to not penalize intercept 

# Non-robust regression
control <- robregcc_option(maxiter = 5000, tol = 1e-7, lminfac = 1e-12)
fit.path <- classo_path(Xt, y, C, we = bw, control = control)

robregcc documentation built on July 26, 2020, 1:07 a.m.