Skip to main content
A study holds versions of one book: the book as reported, and one version per scenario. Write a scenario as a function from a book to a changed book, marked with @scenario:
The label names each scenario in the results, with its parameters filled in. baseline is the book as reported.

Set a scenario’s parameters

Call a scenario with parameters to make a new scenario, such as collision_deductible(deductible=2_000). A scenario’s function takes the book first, then keyword parameters with defaults.
  • A scenario changes rows inside each submission, such as a deductible or an added driver.
  • A scenario keeps every submission, in order. The study checks each version as it builds it.

Read one version of the book

A study builds each version when you ask for it:

Fill unknown facts in draws

The example book leaves 4,668 annual mileages blank. To test how much a result depends on blank facts, add draws. A draw fills each blank of the columns you name, and keeps each reported value:
Draw 0 is each scenario as reported, and draws 1 to 10 fill the blanks. fill.like borrows each blank value from a random vehicle with the same postal code. Each filled column gets a _source column, reported or modeled. Books and studies describes scenarios, draws and their seeds.