Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZORI to estimation panels #252

Closed
santiagohermo opened this issue Mar 28, 2023 · 8 comments · Fixed by #254
Closed

Add ZORI to estimation panels #252

santiagohermo opened this issue Mar 28, 2023 · 8 comments · Fixed by #254
Assignees

Comments

@santiagohermo
Copy link
Collaborator

As part of our review of the paper we will estimate the effect of the MW on rents using the Zillow rental index. While this index on a particular month is a moving average of months around it, it adjust for variation in the available postings each month.

@santiagohermo
Copy link
Collaborator Author

In the revision we planned to use the Zillow rental index for robustness @diegogentilepassaro @gabrieleborg. In this issue I:

  • Downloaded a new version of Zillow's rental index, the ZORI. Raw data can be found in the Google Drive
  • Added the index to the repo.

I added the new ZORI index because the methodology seemed clear enough for a robustness check. We should probably also experiment with the ZRI which we obtained originally for our project. The methodology of the ZRI is here.

I will move to PR to review the changes.


Quick estimates using Zillow rental index downloaded recently.

image

quick coefplot:

image

We observe an effect a few months before the change. This is consistent with the methodology: "Once the index is computed, it is smoothed using a three-month simple moving average."

@santiagohermo
Copy link
Collaborator Author

Continues in #254

@santiagohermo
Copy link
Collaborator Author

The ZORI methodology reports

Once the index is computed, it is smoothed using a three-month simple moving average.

What does this mean?

ChatGPT's interpretation:

A three-month simple moving average (SMA) is a statistical measure used to analyze and smooth out fluctuations in data over a period of three months. It is calculated by adding up the values of the data points from the last three months and dividing the result by three.

The formula for calculating a three-month SMA is as follows:

SMA = (D1 + D2 + D3) / 3

Where:
SMA = Simple Moving Average
D1 = Data point from the current month
D2 = Data point from the previous month
D3 = Data point from the month before the previous month

For example, let's say we have the following data for a company's sales revenue for the last six months:

Month 1: $10,000
Month 2: $12,000
Month 3: $15,000
Month 4: $14,000
Month 5: $16,000
Month 6: $18,000

To calculate the three-month SMA for month 6, we would add up the sales revenue for the last three months (months 4, 5, and 6) and divide the result by three:

SMA = (14,000 + 16,000 + 18,000) / 3
SMA = 16,000

Therefore, the three-month SMA for month 6 is $16,000, which represents the smoothed out average sales revenue for the last three months.

I read this as implying that we should observe an effect three months in advance to the MW change.

@diegogentilepassaro
Copy link
Owner

Don't trust ChatGPT on this one @santiagohermo! Usually 3-month moving average means 1 month before, the current month, and the next month. Most statistical packages, like this, have a window parameter that governs periods around the period and not before!

@diegogentilepassaro
Copy link
Owner

Anyways I read as we should observe effects starting the period before and through the second month after.

@santiagohermo
Copy link
Collaborator Author

Thanks @diegogentilepassaro! I agree, I would think of centering the window in the current month. But maybe data scientists in Zillow think differently? For example, this data.table function computes a moving average using the previous months by default (see align argument).

In this figure I find effects that start in -4, which could be explained by a smoothing like the one proposed by ChatGPT. Anyway, after we do the analysis we can try to understand why it looks like it does!

@diegogentilepassaro
Copy link
Owner

Thanks @santiagohermo! Actually, what you are saying makes a lot of sense in the light of the fact that they don't observe day one month ahead as one would do doing research based on past data. I agree with your plan ☺️

santiagohermo added a commit that referenced this issue Apr 21, 2023
santiagohermo added a commit that referenced this issue Apr 22, 2023
santiagohermo added a commit that referenced this issue Jun 20, 2023
* Adding zri to estimation_samples #252

* Dropping unwated pyc files #252

* Add new zori 2023 variable in `/base/` #

* Add zori 2023 to `zipcode_month` and `estimation_samples` #252

* Add zori_2023 as a rental variable in `estimation_samples` #252

* Go back to original make_main_samples.do #252 #254

* Re-runnnn #252 #254

* Fix to bring back listings dataset #252

* Fix to keep all zipcodes #252

---------

Co-authored-by: santiagohermo <santiagohermo@users.noreply.github.com>
@santiagohermo
Copy link
Collaborator Author

Summary: In this issue we added a ZORI variable to the repo. We plan to use this variable for estimation in #260

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants