print.amias: Print an amias or a samias object

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Print a summary of the fitted "amias" or "samias" object.

Usage

1
2
3
4
5
## S3 method for class 'amias'
print(x, ...)
## S3 method for class 'samias'
print(x, digits = max(3, getOption("digits") - 3), ...)
  

Arguments

x

A list with class attribute 'amias' or 'samias'.

digits

significant digits in printout

...

Additional print arguments.

Details

For an "amias" object, the call that produced the object x is printed, followed by a summary of the output.

For a "samias" object, the call that produced the object x is printed, followed by a three-column matrix with columns k, Df and %BIC. The k column is the number of knots and the Df column is the degree of freedom defined as Df = k+q+1. BIC is the BIC value.

Value

A summary or a three-column matrix is silently returned.

Author(s)

Canhong Wen, Xueqin Wang, Shijie Quan, Zelin Hong and Aijun Zhang.

Maintainer: Canhong Wen <wench@ustc.edu.cn>

References

Wen, C., Zhu, J., Wang, X., and Zhang, A. (2018) L0 trend filtering, technique report.

See Also

amias, samias.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  ##----- A toy example -------
  set.seed(0)
  n <- 100
  x = seq(1/n, 1,length.out = n)
  y0 = 0*x; y0[x>0.5] = 1
  y = y0 + rnorm(n, sd = 0.1)
  
  # For 'amias' object
  fit <- amias(y, k = 1) 
  print(fit)
  
  # For 'samias' object
  fit <- samias(y, kmax = 5)
  print(fit)
  

AMIAS documentation built on May 2, 2019, 2:10 a.m.

Related to print.amias in AMIAS...