subset.ezsim {ezsim}R Documentation

Return of the Simulation

Description

Return a subset of the simulation result of an ezsim object.

Usage

## S3 method for class 'ezsim'
subset(x, subset, ...)

Arguments

x

An ezsim Object

subset

A list contains the subset of estimators and parameters. To select a subset of estimators: list(estimator=c('name of estimator1','name of estimator2')). To select a subset of parameters: list(mean=1:3,sd=4:5). Or both.

...

unused

Value

sim of ezsim

Note

For internal use of ezsim.

Author(s)

TszKin Julian Chan ctszkin@gmail.com

See Also

ezsim

Examples

## 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))
)
subset(ezsim_basic,subset=list(estimator='mean_hat',mu=0,n=c(20,40)))

## End(Not run)

[Package ezsim version 0.5.5 Index]