Learn R Programming

loo (version 0.1.5)

print.loo: Print and plot methods

Description

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

Usage

## 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 ca
...
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
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

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.