© Muehlenbachs 2023
This material is designed for use as part of Econ 323 at the University of Calgary and is the property of the
instructor unless otherwise stated. Copying this material for distribution (e.g. uploading material to a commercial
third-party website) can lead to a violation of Copyright law.
Econ 323: Assignment 1
Hardcopy of assignment due at the beginning of class on February 16, 2023
No need to submit R code, only figures and R output. But the point of this assignment is to learn
R, the assignment cannot be completed using a different software (e.g., Stata or excel).
No late assignments are accepted.
All questions are 1 point each.
Before starting, open the dataset gaswells.dta in R. The data are in a Stata format, so you can
use an R package to open a Stata dataset in R (see the slides from the R session on January 31
st).
Here you can see the monthly production from a random draw of 900 wells in Alberta (900 of
about 400,000 wells!). With the well identifier (wellID) you can track the amount of natural gas
each of the wells produced (monthlyproduction_e3m3) in each month (date). You can also see
the date that the well was drilled (spuddate). And you can already see how few wells have an
abandonment date (abndate)—keep this in mind when we talk about liability management later
in the class.
1. Questions on monthly well-level production:
In the paper Anderson, Soren, Ryan Kellogg, and Steve Salant, “Hotelling Under Pressure,”
Journal of Political Economy. The authors show that oil production from existing wells is not
responsive for oil price changes. See figure from the paper, pasted below.
(a) Plot monthly gas prices (gasprice_e3m3), from 1990 to 2020.
(b) Plot in a separate figure the monthly production (from 1990 to 2020) of the subsample of
wells that were drilled before 1990 (i.e., you don’t want to include production from wells
drilled after 1990 because then variation over time could be driven by wells being drilled).
(Note: you will see production does not form as smooth a decline curve as the figure below)
(c) Now plot a third figure, of the average production using the subsample of wells drilled
before 1960, for the period 1990 to 2020. (Note: here you can see production decline is
smoother, and is more similar to the decline curve in the figure below)
(d) Run a linear regression of log(gas produced) on log(price). What is the coefficient on
log(price) and what does it mean in words? (i.e., how do you interpret the coefficient?)
(Aside: question is just to show you how easy it is to run a regression in R and give you a
chance to interpret a coefficient—there are many things wrong with this regression
specification, e.g., the gas produced might drive prices, not vice versa).

© Muehlenbachs 2023
This material is designed for use as part of Econ 323 at the University of Calgary and is the property of the
instructor unless otherwise stated. Copying this material for distribution (e.g. uploading material to a commercial
third-party website) can lead to a violation of Copyright law.
2. Well-level averages:
(a) Plot the average length of laterals (reported in meters) of wells drilled in each year (note, do
not take the average of the full dataset, which repeats wells by production month. A well
should only contribute to the average once, the year it was drilled). Are you surprised by
the length of these wells?
(b) Plot the average vertical depth (reported in meters) over time (similar to above: do not take
the average of the full dataset, which is a monthly production dataset. You want to take the
average of a well-level dataset).
(c) What is the average surface casing depth and standard deviation?

© Muehlenbachs 2023
This material is designed for use as part of Econ 323 at the University of Calgary and is the property of the
instructor unless otherwise stated. Copying this material for distribution (e.g. uploading material to a commercial
third-party website) can lead to a violation of Copyright law.
3. In this newspaper article: https://www.reuters.com/business/energy/why-western-canada-hassome-cheapest-natural-gas-world-2022-09-14/
(a) Are prices listed by energy content or volume?
(b) Using the price of $3.50/mmBtu, how much is the 12.5 bcf/d worth?
4. The figure below is from
“Welfare and Distributional Implications of Shale Gas.” The thick
orange line represents the supply curve in a world without shale gas, and the thin orange line
represents the supply curve with shale gas. The black line represents the demand curve.
(a) Are consumers of natural gas better or worse off from the shale boom? And what area/s in the
figure represent the change in consumer surplus from the shale boom?
(b) Are producers of natural gas better or worse off from the shale boom? And what area/s
represent the change in producer surplus from the shale boom?
(c) The paper mentions some other groups that benefited from the shale boom. Name two.