Description Usage Arguments Author(s) Examples
Run the Simulation of an ezsim object. The simulation result is store into the ezsim object in the argument directly, reassignment is not needed.
1 2 |
x |
An ezsim object |
... |
not used |
TszKin Julian Chan ctszkin@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
ezsim_basic<-ezsim(
m = 100,
run = FALSE,
run_test = TRUE,
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))
)
run(ezsim_basic)
## End(Not run)
|
Testing for estimator...Passed
Testing for estimator parser...Passed
Testing for true value...Passed
Number of Simulation : 100
Estimator :
function (x)
c(mean_hat = mean(x), sd_mean_hat = sd(x)/sqrt(length(x) - 1))
<bytecode: 0x465b688>
dgp :
function ()
rnorm(n, mu, sigma)
True value of estimator :
function ()
c(mu, sigma/sqrt(n - 1))
Selection Parameters:
$n
[1] 20 40 60 80
$mu
[1] 0 2
$sigma
[1] 1 3 5
Banker Parameters:
list()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.