Description Usage Arguments Value Author(s) See Also Examples
View source: R/summary.ezsim.r
A quick summary to the simulation. Summary statistics included mean, true value (tv), bias, bias percentage (mean/tv-1), sd, rmse (root mean square error), min, q25 (first quarter), median, q75 (third quarter), max, p value of jb-test. See ezsim
and plot.summary.ezsim
for details and examples.
1 2 3 4 |
object |
An ezsim object |
stat |
Some preset summary statistics. Included, |
simple |
If True, shows only mean, true value, bias, sd and rmse of the estimator. If False, shows all statistics in stat. |
subset |
subset of estimators or parameters. See |
... |
Furhter summary statistics. Given in the form stat_name=stat. For example, Mean=mean |
A summary.ezsim object
TszKin Julian Chan ctszkin@gmail.com
ezsim
, plot.summary.ezsim
, getSelectionName.summary.ezsim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## Not run:
ezsim_basic<-ezsim(
m = 100,
run = 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))
)
## Summary of an ezsim object
summary(ezsim_basic)
## Summary of a subset of ezsim object
summary(ezsim_basic,subset=list(estimator='mean_hat',n=c(20,40),sigma=c(1,3)))
## More Summary Statistics
summary(ezsim_basic,simple=FALSE,subset=list(estimator='mean_hat',n=c(20,40),sigma=c(1,3)))
## Customize the Summary Statistics
summary(ezsim_basic,stat=c("q25","median","q75"),Q025=quantile(value_of_estimator,0.025),
Q975=quantile(value_of_estimator,0.975),subset=list(estimator='mean_hat',n=c(20,40),sigma=c(1,3)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.