Description Usage Arguments Value References Examples
This function is called internally by lars.c
to compute the transformed versions of the X, Y, and constraint
matrix data, as shown in the PaC paper.
1 | transformed.ineq(x, y, C.full, b, lambda, beta0, eps = 10^-8)
|
x |
independent variable matrix of data to be used in calculating PaC coefficient paths |
y |
response vector of data to be used in calculating PaC coefficient paths |
C.full |
complete constraint matrix C (with inequality constraints of the form |
b |
constraint vector b |
lambda |
value of lambda |
beta0 |
initial guess for beta coefficient vector |
eps |
value close to zero used to verify SVD decomposition. Default is 10^-8 |
x
transformed x data to be used in the PaC algorithm
y
transformed y data to be used in the PaC algorithm
Y_star
transformed Y* value to be used in the PaC algorithm
a2
index of A used in the calculation of beta2 (the non-zero coefficients)
beta1
beta1 values
beta2
beta2 values
C
constraint matrix
C2
subset of constraint matrix corresponding to non-zero coefficients
active.beta
index of non-zero coefficient values
beta2.index
index of non-zero coefficient values
Gareth M. James, Courtney Paulson, and Paat Rusmevichientong (JASA, 2019) "Penalized and Constrained Optimization." (Full text available at http://www-bcf.usc.edu/~gareth/research/PAC.pdf)
1 2 3 4 5 6 7 | random_data = generate.data(n = 500, p = 20, m = 10)
transform_fit = transformed.ineq(random_data$x, random_data$y,
random_data$C.full, random_data$b, lambda = 0.01, beta0 = rep(0,20))
dim(transform_fit$x)
head(transform_fit$y)
dim(transform_fit$C)
transform_fit$active.beta
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.