Skip to contents

Generate plots and tables for welfare simulations

Usage

welfare_outputs(
  project,
  mod.name,
  closures,
  betadraws = 1000,
  zone.dat = NULL,
  group_var = NULL
)

Arguments

project

Name of project

mod.name

Model name. Argument can be the name of the model or the name can be pulled the `modelChosen` table. Leave mod.name empty to use the name of the saved `best` model. If more than one model is saved, mod.name should be the numeric indicator of which model to use. Use table_view("modelChosen", project) to view a table of saved models.

closures

Closure scenarios

betadraws

Integer indicating the numer of times to run the welfare simulation. Default value is betadraws = 1000

zone.dat

Variable in primary data table that contains unique zone ID.

group_var

Categorical variable from primary data table to group welfare outputs.

Details

Returns a list with (1) plot showing welfare loss/gain for all scenarios in dollars, (2) plot showing welfare loss/gain as percentage, (3) dataframe with welfare summary stats in dollars, (4) dataframe with welfare summary stats as percentages, and (5) dataframe with welfare details such as number of trips, mean loss per trip, and mean of the total welfare loss across all trips.