Learn R Programming

sgs (version 0.3.6)

print.sgs: Prints information for one of the following object types: "sgs", "sgs_cv", "gslope", "gslope_cv".

Description

Prints out useful metric from a model fit.

Usage

# S3 method for sgs
print(x, ...)

Value

A summary of the model fit(s).

Arguments

x

Object of one of the following classes: "sgs", "sgs_cv", "gslope", "gslope_cv".

...

further arguments passed to base function.

See Also

fit_sgs(), fit_sgs_cv(), fit_gslope(), fit_gslope_cv(), fit_sgo(), fit_sgo_cv(), fit_goscar(), fit_goscar_cv()

Other SGS-methods: as_sgs(), coef.sgs(), fit_sgo(), fit_sgo_cv(), fit_sgs(), fit_sgs_cv(), plot.sgs(), predict.sgs(), scaled_sgs()

Other gSLOPE-methods: coef.sgs(), fit_goscar(), fit_goscar_cv(), fit_gslope(), fit_gslope_cv(), plot.sgs(), predict.sgs()

Examples

Run this code
# specify a grouping structure
groups = c(rep(1:20, each=3),
          rep(21:40, each=4),
          rep(41:60, each=5),
          rep(61:80, each=6),
          rep(81:100, each=7))
# generate data
data =  gen_toy_data(p=500, n=400, groups = groups, seed_id=3)
# run SGS 
model = fit_sgs(X = data$X, y = data$y, groups = groups, type="linear", lambda = 1, alpha=0.95, 
vFDR=0.1, gFDR=0.1, standardise = "l2", intercept = TRUE, verbose=FALSE)
# print model
print(model)

Run the code above in your browser using DataLab