Usage
create.sgldata(x, y, weights = rep(1/nrow(x), nrow(x)),
sampleGrouping = NULL, group.names = NULL,
sparseX = is(x, "sparseMatrix"))
Arguments
x
the design matrix, a matrix of size $N
\times p$ (will be parsed to the loss module as
X
).
y
the responses, NULL
, a vector or a matrix
(will be parsed to the loss module as Y
)..
weights
sample weights, a vector of length $N$
(will be parsed to the loss module as W
).
sampleGrouping
grouping of samples, a factor of
length $N$ (will be parsed to the loss module as
G
). Default is no grouping (NULL), that is all
samples is the same group.
group.names
a vector with the names of the
parameter groups (the length must equal the number of
rows in the $\beta$ matrix).
sparseX
if TRUE x
will be treated as
sparse, if FALSE x
will be treated as dens.