COMET
  • Get Started
    • Quickstart Guide
    • Install and Use COMET
    • Get Started
  • Learn By Skill Level
    • Getting Started
    • Beginner
    • Intermediate - Econometrics
    • Intermediate - Geospatial
    • Advanced

    • Browse All
  • Learn By Class
    • Making Sense of Economic Data (ECON 226/227)
    • Econometrics I (ECON 325)
    • Econometrics II (ECON 326)
    • Statistics in Geography (GEOG 374)
  • Learn to Research
    • Learn How to Do a Project
  • Teach With COMET
    • Learn how to teach with Jupyter and COMET
    • Using COMET in the Classroom
    • See COMET presentations
  • Contribute
    • Install for Development
    • Write Self Tests
  • Launch COMET
    • Launch on JupyterOpen (with Data)
    • Launch on JupyterOpen (lite)
    • Launch on Syzygy
    • Launch on Colab
    • Launch Locally

    • Project Datasets
    • Github Repository
  • |
  • About
    • COMET Team
    • Copyright Information
  1. STATA Notebooks
  • Learn to Research


  • STATA Notebooks
    • Setting Up (1)
    • Working with Do-files (2)
    • STATA Essentials (3)
    • Locals and Globals (4)
    • Opening Datasets (5)
    • Creating Variables (6)
    • Within Group Analysis (7)
    • Combining Datasets (8)
    • Creating Meaningful Visuals (9)
    • Combining Graphs (10)
    • Conducting Regression Analysis (11)
    • Exporting Regression Output (12)
    • Dummy Variables and Interactions (13)
    • Good Regression Practices (14)
    • Panel Data Regression (15)
    • Difference in Differences (16)
    • Instrumental Variable Analysis (17)
    • STATA Workflow Guide (18)

  • R Notebooks
    • Setting Up (1)
    • Working with R Scripts (2)
    • R Essentials (3)
    • Opening Datasets (4)
    • Creating Variables (5)
    • Within Group Analysis (6)
    • Combining Datasets (7)
    • Creating Meaningful Visuals (8)
    • Combining Graphs (9)
    • Conducting Regression Analysis (10)
    • Exporting Regression Output (11)
    • Dummy Variables and Interactions (12)
    • Good Regression Practices (13)
    • Panel Data Regression (14)
    • Difference in Differences (15)
    • Instrumental Variable Analysis (16)
    • R Workflow Guide (17)

  • Pystata Notebooks
    • Setting Up (1)
    • Working with Do-files (2)
    • STATA Essentials (3)
    • Locals and Globals (4)
    • Opening Datasets (5)
    • Creating Variables (6)
    • Within Group Analysis (7)
    • Combining Datasets (8)
    • Creating Meaningful Visuals (9)
    • Combining Graphs (10)
    • Conducting Regression Analysis (11)
    • Exporting Regression Output (12)
    • Dummy Variables and Interactions (13)
    • Good Regression Practices (14)
    • Panel Data Regression (15)
    • Difference in Differences (16)
    • Instrumental Variable Analysis (17)
    • STATA Workflow Guide (18)
Categories
All (55)
1:m (2)
2SLS (3)
Breusch-Pagan test (1)
OneDrive (3)
R (2)
aesthetic (1)
append (3)
bar chart (3)
case when (2)
causality (3)
cbind (1)
cleaning (1)
clearing (1)
codebook (2)
coefficients (6)
coefplot (2)
collapse (2)
combining graphs (3)
commenting (6)
controls (3)
csv (2)
data cleaning (1)
data frames (1)
data wrangling (1)
delimiters (3)
describe (4)
difference-in-differences (3)
directories (2)
do-files (2)
dta (2)
dummy variable (4)
dummy variables (4)
econ 325 (1)
econ 326 (1)
econ 490 (53)
egen (2)
endogeneity (3)
estimates (3)
etable (2)
event study (3)
exclusion (3)
exporting (4)
expressions (2)
factorizing (1)
fixed-effects (3)
foreach (2)
forvalues (2)
full join (1)
functions (1)
generate (2)
generating variables (6)
ggplot (2)
glimpse (1)
globals (2)
help (4)
heteroskedasticity (7)
histogram (3)
homoskedasticity (1)
hypothesis testing (1)
ifelse (2)
import (2)
inner join (1)
instrumental variable (3)
interaction (3)
interaction terms (1)
interpretation (6)
intro (3)
left join (1)
lists (1)
loading data (1)
locals (2)
log-files (2)
loops (4)
m:1 (2)
m:m (2)
map (1)
master (3)
matrices (1)
merge (3)
missing data (1)
multicollinearity (4)
multiple regression (4)
mutating (2)
naming (4)
nonlinearity (3)
objects (1)
operations (1)
organization (3)
outliers (3)
panel data (6)
parallel trends (3)
projects (2)
pystata (18)
r (17)
random-effects (3)
rbind (1)
regression (17)
relevance (3)
reshape (2)
save (2)
scatter plot (3)
scripts (4)
serial correlation (3)
setting up (3)
sort (2)
stata (18)
summarize (2)
summary (1)
summary statistics (1)
t-test (1)
tabulate (4)
trimming (3)
twoway (4)
univariate regression (3)
variables (1)
vectors (1)
vif (1)
visualization (11)
weak instrument (3)
winsorizing (3)
workflow (3)

Research Projects: Carrying Out An Economic Research Project

This section contains material to support UBC’s ECON 490 Seminar in Applied Economics. This course is a our senior research class, which focuses on conducting an original research project - including applied econometrics analysis, writing, and presentation.

There are three versions of these notebooks: two for STATA, and one for R.

  • STATA Notebooks
  • R Notebooks
  • pystata Notebooks

These notebooks using the STATA programming language, and are launch in Jupyter using the stata_kernel. You will only be able to run these locally, not via most commercial JupyterHubs.

01 - Jupyter and Stata
This notebook explains how to set up Jupyter, add a Stata Kernel, and connect to COMET. It is the first step to take when embarking on a research project.
29 May 2024

02 - Working with Do-Files
This notebook covers how to write and work with Stata do-files. We go over how to create a do-file, commenting, and generating log-files.
29 May 2024

03 - Stata Essentials
This notebook dives into a few essentials commands in Stata, including describe, summarize, loops, and help.
29 May 2024

04 - Working with Locals and Globals
This notebook explains how to create and use locals and globals.
29 May 2024

05 - Opening Data Sets
This notebook explains how to load, view, and clean data. We go over importing and previewing our data, as well as preparing the data for analysis.
29 May 2024

06 - Generating Variables
In this notebook, we go over how to create variables. We look into how creating dummy variables works, as well as how to create variables using mathematical expressions.
29 May 2024

07 - Conducting Within Group Analysis
In this notebook, we look at within-group analysis. We see how to summarize data for subgroups, how to generate new variables among subgroups, and how to reshape out data.
29 May 2024

08 - Combining Datasets
This notebook explains how to append and merge data sets.
29 May 2024

09 - Creating Meaningful Visuals
This notebook goes over how to make all sorts of visuals. We look at different types of graphs, like scatter plots and histograms, exporting figures, and how to edit the…
29 May 2024

10 - Combining Graphs
This notebook explains how to combine graphs.
29 May 2024

11 - Conducting Regression Analysis
This notebook goes over the theory surrounding linear regressions, as well as how to implement univariate and multivariate regressions in Stata. We dig into coefficient…
29 May 2024

12 - Exporting Regression Output
Here, we work on how to export our regression results. We introduce some commands to make our regression results look professional and to present our coefficients in a…
29 May 2024

13 - Using Dummy Variables and Interactions
In this notebook, we dive into dummy variables and interaction terms. We look at how to include them in our regressions and how to interpret their coefficients.
29 May 2024

14 - Good Regression Practices
This notebook covers some good practices that should be implemented when we perform regression analysis. We look at how to handle outliers, multicollinearity…
29 May 2024

15 - Panel Data Regressions
In this notebook, we go over panel data. We look into what it is, how to run regressions with panel data, as well as fixed and random-effects models. We finish by looking at…
29 May 2024

16 - Differences-in-Differences Analysis
This notebook introduces difference-in-difference analysis. We look the assumptions required to perform this type of analysis, how to run the regressions, how to run event…
29 May 2024

17 - Instrumental Variable Analysis
This notebook introduces instrumental variable analysis. We look the conditions that must be satisfied to perform an IV analysis, how the two-stage-least-squares approach…
29 May 2024

18 - Stata Workflow Guide
This notebook is here to help us organize our files when conducting large-scale research. We talk about workflow management, coding style, and cloud storage.
29 May 2024
No matching items

These notebooks are written for the R programming language and are launched in Jupyter using the IRKernel.

01 - Setting Up Jupyter and R
This notebook explains how to set up Jupyter, add an R Kernel, and connect to COMET. It is the first step to take when embarking on a research project.
29 May 2024

02 - Working with R Scripts
This notebook covers how to write and work with R scripts. We go over how to create a script, commenting, and preparing our R session.
29 May 2024

03 - R Essentials
This notebook dives into a few essentials commands in R, including types of data, how to explore our data, and some basic functions.
29 May 2024

04 - Opening Datasets
This notebook explains how to load, view, and clean data. We go over importing and previewing our data, as well as preparing the data for analysis.
29 May 2024

05 - Generating Variables
In this notebook, we go over how to create variables. We look into how creating dummy variables works, as well as how to create variables using mathematical expressions.
29 May 2024

06 - Conducting Within Group Analysis
In this notebook, we go over how to create variables. We look into how creating dummy variables works, as well as how to create variables using mathematical expressions.
29 May 2024

07 - Combining Data Sets
This notebook explains how to append and merge data sets.
29 May 2024

08 - Creating Meaningful Visuals
This notebook goes over how to make all sorts of visuals. We look at different types of graphs, like scatter plots and histograms, exporting figures, and how to edit the…
29 May 2024

09 - Combining Graphs
This notebook explains how to combine graphs.
29 May 2024

10 - Conducting Regression Analysis
This notebook goes over the theory surrounding linear regressions, as well as how to implement univariate and multivariate regressions in R. We dig into coefficient…
29 May 2024

11 - Exporting Regression Output
Here, we work on how to export our regression results. We introduce some packages to make our regression results look professional and to present our coefficients in a…
29 May 2024

12 - Dummy Variables and Interactions
In this notebook, we dive into dummy variables and interaction terms. We look at how to include them in our regressions and how to interpret their coefficients.
29 May 2024

13 - Good Regression Practice
This notebook covers some good practices that should be implemented when we perform regression analysis. We look at how to handle outliers, multicollinearity…
29 May 2024

14 - Panel Data Regressions
In this notebook, we go over panel data. We look into what it is, how to run regressions with panel data, as well as fixed and random-effects models. We finish by looking at…
29 May 2024

15 - Difference-in-Differences Analysis
This notebook introduces difference-in-difference analysis. We look the assumptions required to perform this type of analysis, how to run the regressions, how to run event…
29 May 2024

16 - Instrumental Variable Analysis
This notebook introduces instrumental variable analysis. We look the conditions that must be satisfied to perform an IV analysis, how the two-stage-least-squares approach…
29 May 2024

17 - R Workflow Guide
This notebook is here to help us organize our files when conducting large-scale research. We talk about workflow management, coding style, and cloud storage.
29 May 2024
No matching items

pystata is a Python package that runs STATA code. So, these are Python notebooks, but they run STATA code. You will only be able to run these locally, not via most commercial JupyterHubs.

01 - Setting up PyStata for your Windows computer
This notebook explains how to set up Jupyter, add a PyStata Kernel, and connect to COMET. It is the first step to take when embarking on a research project.
29 May 2024

02 - Working with Do-Files
This notebook covers how to write and work with Stata do-files. We go over how to create a do-file, commenting, and generating log-files.
29 May 2024

03 - Stata Essentials
This notebook dives into a few essentials commands in Stata, including describe, summarize, loops, and help.
29 May 2024

04 - Working with Locals and Globals
This notebook explains how to create and use locals and globals.
29 May 2024

05 - Opening Datasets
This notebook explains how to load, view, and clean data. We go over importing and previewing our data, as well as preparing the data for analysis.
29 May 2024

06 - Generating Variables
In this notebook, we go over how to create variables. We look into how creating dummy variables works, as well as how to create variables using mathematical expressions.
29 May 2024

07 - Conducting Within Group Analysis
In this notebook, we look at within-group analysis. We see how to summarize data for subgroups, how to generate new variables among subgroups, and how to reshape out data.
29 May 2024

08 - Combining Datasets
This notebook explains how to append and merge data sets.
29 May 2024

09 - Creating Meaningful Visuals
This notebook goes over how to make all sorts of visuals. We look at different types of graphs, like scatter plots and histograms, exporting figures, and how to edit the…
29 May 2024

10 - Combining Graphs
This notebook explains how to combine graphs.
29 May 2024

11 - Conducting Regression Analysis
This notebook goes over the theory surrounding linear regressions, as well as how to implement univariate and multivariate regressions in Stata. We dig into coefficient…
29 May 2024

12 - Exporting Regression Output
Here, we work on how to export our regression results. We introduce some commands to make our regression results look professional and to present our coefficients in a…
29 May 2024

13 - Using Dummy Variables and Interactions
In this notebook, we dive into dummy variables and interaction terms. We look at how to include them in our regressions and how to interpret their coefficients.
29 May 2024

14 - Good Regression Practices
This notebook covers some good practices that should be implemented when we perform regression analysis. We look at how to handle outliers, multicollinearity…
29 May 2024

15 - Panel Data Regressions
In this notebook, we go over panel data. We look into what it is, how to run regressions with panel data, as well as fixed and random-effects models. We finish by looking at…
29 May 2024

16 - Differences-in-Differences Analysis
This notebook introduces difference-in-difference analysis. We look the assumptions required to perform this type of analysis, how to run the regressions, how to run event…
29 May 2024

17: Instrumental Variable Analysis
This notebook introduces instrumental variable analysis. We look the conditions that must be satisfied to perform an IV analysis, how the two-stage-least-squares approach…
29 May 2024

18 - Stata Workflow Guide
This notebook is here to help us organize our files when conducting large-scale research. We talk about workflow management, coding style, and cloud storage.
29 May 2024
No matching items

Project Examples

You can also find some of our project example notebooks below.

Projects - Example Project for ECON 325
Let’s put it all together! This notebook is an example of what a “final project” might look like in ECON 325. It summarizes and uses all of the empirical skills and R…
12 Jan 2023

Projects - Example Project for ECON 326
Let’s put it all together! This notebook is an example of what a “final project” might look like in ECON 326. It summarizes and uses all many of the empirical skills and R…
1 Jul 2023
No matching items
Setting Up (1)
  • Creative Commons License. See details.
 
  • Report an issue
  • The COMET Project and the UBC Vancouver School of Economics are located on the traditional, ancestral and unceded territory of the xʷməθkʷəy̓əm (Musqueam) and Sḵwx̱wú7mesh (Squamish) peoples.