Print and plot methods

Share:

Description

print and plot methods for objects of class 'loo' and print method for objects of class 'compare.loo'.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'loo'
print(x, ..., digits = 1, warn = TRUE, plot_k = FALSE)

## S3 method for class 'compare.loo'
print(x, ..., digits = 1)

## S3 method for class 'loo'
plot(x, ..., label_points = FALSE)

Arguments

x

A list with class 'loo' (as returned by the loo function or, for print only, the waic function). For print, x can also have class 'compare.loo' (as returned by compare).

...

For plot, arguments to pass to text if label_points = TRUE.

digits

An integer passed to round.

warn

Logical. If TRUE (the default), a warning message will be printed if any estimates of the Pareto shape parameter k are problematic. See the PSIS-LOO section in loo-package for details on the interpretation of k. Ignored if x was generated by waic.

plot_k

Logical. If TRUE the estimates of the Pareto shape parameter k are plotted. Ignored if x was generated by waic. To just plot k without printing use plot(x).

label_points

Logical. If TRUE the observation numbers corresponding to any values of k greater than 0.5 will be displayed in the plot. Any arguments specified in ... will be passed to text and can be used to control the appearance of the labels.

Value

The print methods return x invisibly. The plot method is called for its side effect and does not return anything. If x is the result of a call to loo, plot(x) produces a plot of the estimates of the Pareto shape parameter k. There is no plot method for objects generated by a call to waic.