Modeling pragmatics and practicalities

John M. Drake & Pej Rohani


“In linguistics and related fields, pragmatics is the study of how context contributes to meaning. The field of study evaluates how human language is utilized in social interactions, as well as the relationship between the interpreter and the interpreted.”

– Wikipedia

What is the goal of the project?

Every project should have an objective.

Write it down. In one sentence.

Use a verb like “test”, “measure”, “identify”, etc.

Your project should be about nature, not a model or modeling.

What is your strategy?

How will you accomplish your objective?

Describe the steps you will take. It is helpful to be specific but non-technical.

How will you know when you have accomplished your goal?


Modeling projects are very prone to mission creep.

  • How will you know if you have satisfactorily achieved your objective?
  • What is your stopping rule?
  • What do you envision the final figures, tables, etc. to look like?

What information do you need to accomplish your objective?


What information, or data, do you need to execute your strategy?

Why do you think this information will contain what you need to accomplish your objective?

Creating a protocol

Modeling projects are very prone to mission creep.

Write down a protocol containing

  • Objective
  • Strategy
  • Endpoint
  • Information needs

Stick to this protocol.

Modeling projects are very prone to mission creep.

Organizing your project

  1. One project = One deliverable (report or manuscript) = One folder/directory/repository
  2. Use a subversion system to manage all but your smallest projects. We recommend, and teach, Github. Github is also useful for collaborative projects, even small ones.
  3. It is helpful to organize your folder/directory/repository with subdirectories for data, figures, and documents.

Do as we say, not as we do. We are old. You can still learn to do better. (And we are trying to, too.)

Executing your project

  1. Write a script for everything. Do not modify data in spreadsheets. Do not modify figures with Illustrator. This is essential for reproducibility. Separate research from communication.
  2. Use statistically literate programming (i.e. a script that allows code-chunking to compile model code and narrative text into a single human-readable output, perhaps with additional outputs, such as tables of modified data).
  3. It is often most efficient to have one main script/document. This often replaces the traditional lab notebook. This script might become a manuscript. But, in our experience, because this script is the comprehensive documentation of a modeling project, it is often more appropriately viewed as an internal report or a piece of supplementary material. It is easy to then write a manuscript using the figure files generated while compiling the report.

Software

Use an Integrated Development Environment (IDE) to write your code. We use RStudio. RStudio integrates smoothly with Github.

Organizing your script

  1. Use the header. There are lots of sophisticated examples on the Internet.
  2. Start with an abbreviated statement of your objective and strategy.
  3. Write text to explain your rationale as you proceed.
  4. Set global options and load libraries at the beginning of the script.
  5. Save intermediate data tables for further use (as appropriate).
  6. Unlike a manuscript (that traditionally follows the IMRD scheme), we find it is helpful to weave together idea, rationale, analysis, and interpretation. Make sure to connect the dots for your reader (i.e. your future self). We promise, it won't be obvious why you did what you did.
  7. Use good code organization, e.g. the DRY (Don't Repeat Yourself) principle.

Acknowledgements

Presentations and exercises draw significantly from materials developed with Pej Rohani, Ben Bolker, Matt Ferrari, Aaron King, and Dave Smith used during the 2009-2011 Ecology and Evolution of Infectious Diseases workshops and the 2009-2019 Summer Institutes in Statistics and Modeling of Infectious Diseases.

Licensed under the Creative Commons attribution-noncommercial license, http://creativecommons.org/licenses/bync/3.0/. Please share and remix noncommercially, mentioning its origin.