Function to get inputs for fused lasso fit

inputs(
  Y,
  X,
  weighting = FALSE,
  weights = NULL,
  wtype = "size",
  buildD = TRUE,
  normalize = TRUE
)

Arguments

Y

list of size K. Its kth entry is a vector of size n_k

X

list of size K. Its kth entry is a matrix of size n_kxp

weighting

logical. If TRUE: use weighted regularization parameter

weights

provide vector of weights

wtype

either `"size"` (default, weighting based on group sample sizes) or `"sizesqrt"`

buildD

logical. If TRUE: compute Dmatrix

normalize

logical. Whether or not to normalize the weights (currently divides by maximum).

Value

A list with the following components

Y

Response vector

X

Block diagonal design matrix

D

Coupling matrix

var_indicator

pxK : indicates corresponding column (in the D-matrix) of each variable in each class