transformed.ineq: Transform Data to Fit PaC Implementation for Inequality...

Description Usage Arguments Value References Examples

View source: R/PACLasso.R

Description

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.

Usage

1
transformed.ineq(x, y, C.full, b, lambda, beta0, eps = 10^-8)

Arguments

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 C.full*beta >= b))

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

Value

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

References

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)

Examples

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

PACLasso documentation built on May 2, 2019, 2:29 p.m.