sigma {grpSLOPE}R Documentation

Extract (estimated) noise level

Description

Extract the noise level of the grpSLOPE model.

Usage

## S3 method for class 'grpSLOPE'
sigma(object, ...)

Arguments

object

A grpSLOPE object

...

Potentially further arguments passed to and from methods

Details

This basically obtains object$sigma. For R (>= 3.3.0) sigma is an S3 method with the default method coming from the stats package.

Value

The noise level of the given grpSLOPE model. A number.

Examples

set.seed(1)
A   <- matrix(rnorm(100^2), 100, 100)
grp <- rep(rep(1:20), each = 5)
b   <- c(rep(1, 20), rep(0, 80))
y   <- A %*% b + rnorm(10) 
# model with unknown noise level
result <- grpSLOPE(X = A, y = y, group = grp, fdr = 0.1)
sigma(result)
# [1] 0.6505558
# model with known noise level
result <- grpSLOPE(X = A, y = y, group = grp, fdr = 0.1, sigma = 1)
sigma(result)
# [1] 1


[Package grpSLOPE version 0.3.3 Index]