Skip to content

Flow charts

Creating flow charts in Stata is now easy! Given an Excel spreadsheet with columns A, B, C, and D titled “logic”, “var”, “stat” and “value”, respectively, statflow replaces the “value” column with the requested statistic for the observations in the dataset that fit the condition expressed in “logic”. This allows for the creation of dynamically updating custom tables and flowcharts. Here's an example:

Making flowcharts with Stata

  // Set up a flowchart:
    statflow template using "/path/to/file.xlsx" , [replace]

  // Fill it out, then get all the requested statistics:
    statflow using "/path/to/file.xlsx" [if] [in]

statflow is available on SSC and is open for development on GitHub. Submit bugs and feature requests here. If you like statflow, be sure to visit my homepage and Stata boilerplate code.