Learn R Programming

sprm (version 1.1)

summary.sprm: Summary of a sprm model

Description

Summarizing models of class sprm.

Usage

## S3 method for class 'sprm':
summary(object, ...)
## S3 method for class 'sprm':
print(x, ...)

Arguments

object, x
object of class sprm.
...
optional arguments for internal print function.

Value

  • summary prints model parameters and explained variances.

    print prints model parameters.

References

Sven Serneels et al. (2014) Sparse partial robust M regression

See Also

sprms

Examples

Run this code
set.seed(50235)
U1 <- c(rep(3,20), rep(4,30))
U2 <- rep(3.5,50)
X1 <- replicate(5, U1+rnorm(50))
X2 <- replicate(20, U2+rnorm(50))
X <- cbind(X1,X2)
beta <- c(rep(1, 5), rep(0,20))
e <- c(rnorm(45,0,1.5),rnorm(5,-20,1))
y <- X%*%beta + e
d <- as.data.frame(X)
d$y <- y
mod <- sprms(y~., data=d, a=1, eta=0.5, fun="Hampel")
summary(mod)

Run the code above in your browser using DataLab