fitPacs: fitPacs function

Description Usage Arguments Value See Also Examples

View source: R/fitPacs.R

Description

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

1
fitPacs(Y, X, lambda = 0.5, betaInput, epsPACS = 1e-05, 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.

See Also

Overview : clere-package
Classes : Clere, Pacs
Methods : plot, clusters, predict, summary
Functions : fitClere, fitPacs Datasets : numExpRealData, numExpSimData, algoComp

Examples

1
2
3
4
5
6
7
8
   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) 

clere documentation built on Feb. 7, 2020, 1:06 a.m.