Description Usage Arguments Value Author(s) See Also Examples
For each set of parameters, the simulation is ran once to obtain the value of estimator and true value to make sure everything in ezsim is properly defined. The test results will be shown in the console. The test will be ran automatically when you create an ezsim object.
1 2 |
x |
An ezsim Object |
return_name |
Whehter to return the name of estimator |
print_result |
Whehter to print the return |
... |
unused |
Optional: names of estimator.
TszKin Julian Chan ctszkin@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
ezsim_basic<-ezsim(
m = 100,
run = FALSE,
run_test = FALSE,
display_name = c(mean_hat="hat(mu)",sd_mean_hat="hat(sigma[hat(mu)])"),
parameter_def = createParDef(list(n=seq(20,80,20),mu=c(0,2),sigma=c(1,3,5))),
dgp = function() rnorm(n,mu,sigma),
estimator = function(x) c(mean_hat = mean(x),
sd_mean_hat=sd(x)/sqrt(length(x)-1)),
true_value = function() c(mu, sigma / sqrt(n-1))
)
test(ezsim_basic,print_result=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.