print.coefspar {spareg}R Documentation

Print method for coefspar objects

Description

Print method showing the basic components of a 'coefspar' object.

Usage

## S3 method for class 'coefspar'
print(x, digits = 4L, show = 6L, ...)

Arguments

x

An object of class 'coefspar', typically created by a custom model function.

digits

integer digits to be printed, defaults to 4L.

show

integer number of coefficients to be shown, defaults to 6L.

...

Additional arguments passed to or from other methods (ignored here).

Value

Invisibly returns the input object x.

Examples

example_data <- simulate_spareg_data(n = 200, p = 2000, ntest = 100)
spar_res <- spareg(example_data$x, example_data$y, xval = example_data$xtest,
  yval = example_data$ytest, nummods=c(5, 10, 15, 20, 25, 30))
coef(spar_res)
coef(spar_res, aggregate = "median")
coef(spar_res, aggregate = "none")
print(coef(spar_res), show = 10L, digits = 6L)

[Package spareg version 1.1.0 Index]