This function implements the PACS (Pairwise Absolute Clustering and
Sparsity) methodology of Sharma DB et al. (2013). This methodology
proposes to estimate the regression coefficients by solving a penalized
least squares problem. It imposes a constraint on Beta (the vector of
regression coefficients) that is a weighted combination of the L1 norm
and the pairwise L-infinity norm. Upper-bounding the pairwise
L-infinity norm enforces the covariates to have close coefficients.
When the constraint is strong enough, closeness translates
into equality achieving thus a grouping property. For PACS, no
software was available. Only an R script was released on Bondell's
webpage (http://www4.stat.ncsu.edu/~bondell/Software/PACS/PACS.R.r).
Since this R script was running very slowly, we decided to reimplement
it in C++ and interfaced it with the present R package clere. This
corresponds to the option type=1 in Bondell's script.
Usage
fitPacs(Y = rnorm(10), X = matrix(rnorm(50), nrow = 10),
lambda=0.5,betaInput=rnorm(10),epsPACS=1e-5,nItMax=1000)
Arguments
Y
[numeric]: The vector of observed responses - size n.
X
[matrix]: The matrix of predictors - size n rows and p columns.
lambda
[numeric]: A non-negative penalty term that controls simultaneouly clusetering and sparsity.
betaInput
[numeric]: A vector of initial guess of the model parameters. The authors suggest to use coefficients obtained after fitting a ridge regression with the shrinkage parameter selected using AIC criterion.
epsPACS
[numeric]: A tolerance threshold that control the convergence of the algorithm. The default value fixed in Bondell's initial script is 1e-5.
nItMax
[numeric]: Maximum number of iterations in the algorithm.
Value
Object of class Pacs containing all the input
parameters plus parameter a0 the intercept and parameter K the
dimensionality of the model.
n <- 100
p <- 20
Beta <- rep(c(0,2),10)
eps <- rnorm(n,sd=3)
x <- matrix(rnorm(n*p), nrow = n, ncol = p)
y <- as.numeric(10+x%*%Beta+eps)
bInit <- lm(y~scale(x))$coefficients[-1]
mod <- fitPacs(Y=y,X=x,lambda=1.25,betaInput=bInit,epsPACS=1e-5,nItMax=1000)