Skip to contents

Fits \(\log error = c + \gamma \log n\) and compares gamma with the theoretical exponent. Rate theorems have no single-sample value, so the measured exponent makes the claim checkable rather than asserted. Mirrors morie.fn._horowitz.check_rate.

Usage

morie_rate_check(errors, n_grid, expected_exponent)

Arguments

errors

numeric errors.

n_grid

matching sample sizes.

expected_exponent

the theoretical rate.

Value

list: observed_exponent, expected_exponent, consistent.

References

Horowitz, Ch. 2.

Examples

n <- c(100, 400, 1600, 6400)
morie_rate_check(3 * n^-0.4, n, -0.4)$observed_exponent
#> [1] -0.4