aggregate_simulation_results: Test a passed test statistic on the simulated data

Description Usage Arguments Value Examples

View source: R/aggregate_simulation_results.R

Description

This method is used to look at summary statistics such as average impact post-policy, and see how the predictive distribution compares to the observed.

Usage

1
2
3
4
5
6
7
aggregate_simulation_results(
  orig.data,
  predictions,
  outcomename,
  summarizer = calculate_average_outcome,
  ...
)

Arguments

orig.data

The raw data (dataframe)

predictions

The results from process_outcome_model.

outcomename

Outcome to use.

summarizer

A function to calculate some summary quantity, Default: calculate_average_outcome

...

Extra arguments passed to the summarizer function.

Value

List of length two, with first item being the observed value of the test statistic and the second being a numeric vector representing the emperical reference distribution.

Examples

1
2
3
4
5
6
7
predictions = process_outcome_model( "pbail", mecklenberg,
                                    t0=0, R = 5,
                                    summarize = FALSE, smooth=FALSE )
sstat = aggregate_simulation_results( orig.data = mecklenberg, outcomename = "pbail",
                                     predictions = predictions, months = 1:18 )
sstat$t
sstat$t.obs

simITS documentation built on July 2, 2020, 4:10 a.m.