This page provides Quarto templates for use with the course book Empirical Research in Accounting: Tools and Methods.

To use a template, you will need Quarto. A recent installation of RStudio will include Quarto. See instructions here for setting up your computer to use this course book.

To download a template, simply "right click" a link below and save the template on your computer, then open it on your computer.

For each template provided below, we have prepared suggested solutions (as both executable Quarto files and the PDFs these produce). Instructors can contact Ian Gow for these solutions.

Templates

Each template below shares its name with the corresponding chapter in the book.

For chapters of the book that use the WRDS PostgreSQL database, we have also included a template that uses a local parquet repository as described in an appendix of the book. To use these templates, you simply need to have downloaded the needed parquet files and edit the line in the template to set DATA_DIR to the location of these files on your hard drive.

Part I: Foundations

Chapter PostgreSQL template Parquet template
Describing data r-intro.qmd Use PostgreSQL template
Regression fundamentals reg-basics.qmd Use PostgreSQL template
Causal inference causal-inf.qmd Use PostgreSQL template
Statistical inference stat-inf.qmd Use PostgreSQL template
Financial statements: A first look fin-state.qmd fin-state-pq.qmd
Financial statements: A second look fin-state-reprise.qmd fin-state-reprise-pq.qmd
Linking databases identifiers.qmd identifiers-pq.qmd
Importing data web-data.qmd Use PostgreSQL template

Part II: Capital markets research

Chapter PostgreSQL template Parquet template
FFJR ffjr.qmd ffjr-pq.qmd
Ball and Brown (1968) bb68.qmd bb68-pq.qmd
Beaver (1968) beaver68.qmd beaver68-pq.qmd
Event studies event-studies.qmd event-studies-pq.qmd
Post-earnings announcement drift pead.qmd Template to come
Accruals accruals.qmd Template to come
Earnings management earnings-mgt.qmd Template to come

Part III: Causal inference

Chapter PostgreSQL template Parquet template
Natural experiments natural.qmd Template to come
Causal mechanisms mechanisms.qmd Template to come
Natural experiments revisited natural-revisited.qmd Template to come
Instrumental variables iv.qmd Template to come
Panel data panel-data.qmd Template to come
Regression discontinuity designs rdd.qmd Template to come

Part IV: Additional topics

Chapter PostgreSQL template Parquet template
Beyond OLS Template to come Template to come
Extreme values and sensitivity analysis Template to come Template to come
Matching Template to come Template to come
Prediction Template to come Template to come

Other files