tests | R Documentation |
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).
test_consistency(est, D0, n = 10000, seed = 1, ...)
test_avar(est, D0, n = 10000, m = 1000, seed = 1, bar = FALSE, ...)
est |
character. The estimator to be tested. |
D0 |
An object of class |
n |
integer. The sample size to be simulated. |
seed |
integer. Passed to |
... |
extra arguments passed to the estimator. |
m |
integer. The number of samples to be simulated. |
bar |
logical. Should a progress bar be printed? |
A list with the simulation and the expected results so that they can be compared in tests.
## Not run:
D <- Beta(2, 3)
test1 <- test_consistency("me", D)
test2 <- test_avar("mle", D)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.