Fits an SGS model using the noise estimation procedure (Algorithm 5 from Bogdan et al. (2015)). This estimates fit_sgs_cv()
).
scaled_sgs(
X,
y,
groups,
type = "linear",
pen_method = 1,
alpha = 0.95,
vFDR = 0.1,
gFDR = 0.1,
standardise = "l2",
intercept = TRUE,
verbose = FALSE
)
An object of type "sgs"
containing model fit information (see fit_sgs()
).
Input matrix of dimensions "sparseMatrix"
from the Matrix
package).
Output vector of dimension type="linear"
should be continuous and for type="logistic"
should be a binary variable.
A grouping structure for the input data. Should take the form of a vector of group indices.
The type of regression to perform. Supported values are: "linear"
and "logistic"
.
The type of penalty sequences to use.
"1"
uses the vMean SGS and gMean gSLOPE sequences.
"2"
uses the vMax SGS and gMean gSLOPE sequences.
"1"
uses the BH SLOPE and gMean gSLOPE sequences, also known as SGS Original.
The value of
Defines the desired variable false discovery rate (FDR) level, which determines the shape of the variable penalties. Must be between 0 and 1.
Defines the desired group false discovery rate (FDR) level, which determines the shape of the group penalties. Must be between 0 and 1.
Type of standardisation to perform on X
:
"l2"
standardises the input data to have
"l1"
standardises the input data to have
"sd"
standardises the input data to have standard deviation of one.
"none"
no standardisation applied.
Logical flag for whether to fit an intercept.
Logical flag for whether to print fitting information.
Bogdan, M., Van den Berg, E., Sabatti, C., Su, W., Candes, E. (2015). SLOPE — Adaptive variable selection via convex optimization, https://projecteuclid.org/journals/annals-of-applied-statistics/volume-9/issue-3/SLOPEAdaptive-variable-selection-via-convex-optimization/10.1214/15-AOAS842.full
as_sgs()
Other model-selection:
as_sgs()
,
fit_goscar_cv()
,
fit_gslope_cv()
,
fit_sgo_cv()
,
fit_sgs_cv()
Other SGS-methods:
as_sgs()
,
coef.sgs()
,
fit_sgo()
,
fit_sgo_cv()
,
fit_sgs()
,
fit_sgs_cv()
,
plot.sgs()
,
predict.sgs()
,
print.sgs()
# specify a grouping structure
groups = c(1,1,2,2,3)
# generate data
data = gen_toy_data(p=5, n=4, groups = groups, seed_id=3,
signal_mean=20,group_sparsity=1,var_sparsity=1)
# run noise estimation
model = scaled_sgs(X=data$X, y=data$y, groups=groups, pen_method=1)
Run the code above in your browser using DataLab