Learn R Programming

joker (version 0.14.2)

tests: Estimation and Variance Tests

Description

This set of functions employs Monte Carlo simulations to check the consistency of the estimators (i.e. that the estimators are coded correctly) and their asymptotic normality (i.e. that their asymptotic variance is coded correctly).

Usage

test_consistency(est, D0, n = 10000, seed = 1, ...)

test_avar(est, D0, n = 10000, m = 1000, seed = 1, bar = FALSE, ...)

Value

A list with the simulation and the expected results so that they can be compared in tests.

Arguments

est

character. The estimator to be tested.

D0

An object of class Distribution.

n

integer. The sample size to be simulated.

seed

integer. Passed to set.seed().

...

extra arguments passed to the estimator.

m

integer. The number of samples to be simulated.

bar

logical. Should a progress bar be printed?

Examples

Run this code
if (FALSE) {
D <- Beta(2, 3)
test1 <- test_consistency("me", D)
test2 <- test_avar("mle", D)
}

Run the code above in your browser using DataLab