Learn R Programming

rsimsum (version 0.3.1)

get_data.simsum: get_data.simsum

Description

Extract data from a simsum object

Usage

# S3 method for simsum
get_data(x, sstat = "all", ...)

Arguments

x

An object of class simsum.

sstat

Summary statistics to include; can be a scalar value or a vector. Possible choices are:

  • all, all the summary statistics are returned This is the default option.

  • nsim, the number of replications with non-missing point estimates and standard error.

  • thetamean, average point estimate.

  • thetamedian, median point estimate.

  • se2mean, average standard error.

  • se2median, median standard error.

  • bias, bias in point estimate.

  • empse, empirical standard error.

  • mse, mean squared error.

  • relprec, percentage gain in precision relative to the reference method.

  • modelse, model-based standard error.

  • relerror, relative percentage error in standard error.

  • cover, coverage of a nominal level% confidence interval.

  • bccover, bias corrected coverage of a nominal level% confidence interval.

  • power, power of a (1 - level)% level test.#'

...

Ignored.

Value

A data.frame containing summary statistics from a simulation study.

See Also

simsum(), get_data()

Examples

Run this code
# NOT RUN {
data(MIsim)
x <- simsum(data = MIsim, estvarname = "b", true = 0.5, se = "se",
            methodvar = "method", mcse = TRUE)
get_data(x)

# Exporting only bias and coverage:
get_data(x, ssta = c("bias", "cover"))
# }

Run the code above in your browser using DataLab