Skip to contents

Models

Specify the candidate estimators a simulation will compare.

optic_model()
Optic Model
model_terms()
Parse a formula object into its left-hand-side and right-hand-side components

Simulation setup

Configure the data-generating scenarios and policy exposure.

optic_simulation()
Create a configuration object used to run simulations
calculate_exposure()
Calculates the exposure rate applied to each year provided month of policy implementation and number of years to full implementation
exposure_list()
Applies a time-varying treatment effect

Running simulations

dispatch_simulations()
Dispatch Simulations

Performance metrics

Summarize simulation runs and score each model’s behavior.

summarize_simulation()
Summarize simulation results
sim_bias()
Bias of point estimates
sim_mse()
Mean squared error
sim_coverage()
Coverage of confidence intervals
sim_rejection_rate()
Rejection rate (Type I error under the null)
sim_correct_rejection_rate()
Correct rejection rate
sim_type_s_error()
Type S (sign) error rate
sim_correction_factor()
Empirical correction factor

Data

overdoses
OPTIC Overdoses example data.