standard_errors: Emulator Standard Errors

Description Usage Arguments Details Value Examples

View source: R/diagnostics.R

Description

Finds and plots emulator standard errors.

Usage

1
2
3
4
5
6
7
8
9
standard_errors(
  emulator,
  input_points,
  output_points,
  output_name,
  plt = T,
  targets = NULL,
  ...
)

Arguments

emulator

An Emulator object.

input_points

A set of validation points.

output_points

The outputs, f(x), from the simulator.

output_name

Optional. A name for the output.

plt

Should a plot be shown (default: T).

targets

The output targets (to check if failing points are relevant). Default: NULL

...

Dummy parameters (for compatibility with diagnostic wrapper)

Details

For an emulator of a simulator function f(x), and a validation data set X, finds the standard errors in the form (f(x)-E[f(x)])/sqrt(Var[f(x)]), where E[f(x)] is the emulator expectation, and Var[f(x)] is the emulator variance, at each point x in X.

Value

A list of standard errors.

Examples

1
2
3
4
5
em <- emulator_from_data(GillespieSIR, output_names = c('nS', 'nI', 'nR'),
 ranges = list(aSI = c(0.1, 0.8), aIR = c(0, 0.5), aSR = c(0, 0.05)),
 quadratic = TRUE)[[1]]
standard_errors(em, GillespieValidation[,1:3], GillespieValidation[,'nS'], 'nS')
#> (0.7864384, 0.01426296, 0.001072935)

Tandethsquire/emulatorr documentation built on April 12, 2021, 1:08 a.m.