parameter_bootstraps: extract a data.frame of parameters from the bootstrapped...

Description Usage Arguments Details Value See Also Examples

Description

extract a data.frame of parameters from the bootstrapped replicate comparisons

Usage

1

Arguments

reps

a list of outputs from compare()

Details

Consider ggplot2 tools to visualize this data, or use the subset() function on this data set to look at a particular parameter from a particular model fit. see examples for illustrations.

Value

a data.frame of columns "value" (parameter value), "parameter" (name of the parameter), "fit", a double-letter code indicating first which model created the simulation and second which model was fit to the data, "rep", a replicate id number.

See Also

compare, roc_data, lik_ratios, subset

Examples

1
2
3
4
5
6
7
8
9
data("example_analysis")
pars <- parameter_bootstraps(reps)
subset(pars, fit=="BB" && parameter=="m")
require(ggplot2)
require(Hmisc)
ggplot(subset(pars, fit %in% c("AA", "BB")), aes(parameter, value, fill = fit)) +
  stat_summary(fun.y = mean, geom = "bar", position = "dodge") +
  stat_summary(fun.data = median_hilow, geom = "pointrange", aes(color = fit),
              position = position_dodge(width = 0.90), conf.int = 0.95)

cboettig/earlywarning documentation built on May 13, 2019, 2:07 p.m.