print.summary.ru: Print method for objects of class "summary.ru"

Description Usage Arguments Value See Also Examples

View source: R/sample_diagnostics.R

Description

print method for an object object of class "summary.ru".

Usage

1
2
## S3 method for class 'summary.ru'
print(x, ...)

Arguments

x

an object of class "summary.ru", a result of a call to summary.ru.

...

Additional optional arguments to be passed to print.

Value

Prints

See Also

ru for descriptions of object$sim_vals and object$box.

plot.ru for a diagnostic plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# one-dimensional standard normal ----------------
x <- ru(logf = function(x) -x ^ 2 / 2, d = 1, n = 1000, init = 0)
summary(x)

# two-dimensional normal with positive association ----------------
rho <- 0.9
covmat <- matrix(c(1, rho, rho, 1), 2, 2)
log_dmvnorm <- function(x, mean = rep(0, d), sigma = diag(d)) {
  x <- matrix(x, ncol = length(x))
  d <- ncol(x)
  - 0.5 * (x - mean) %*% solve(sigma) %*% t(x - mean)
}
x <- ru(logf = log_dmvnorm, sigma = covmat, d = 2, n = 1000, init = c(0, 0))
summary(x)

paulnorthrop/rust documentation built on Jan. 6, 2019, 3:09 a.m.