├── src
├── .gitignore
├── references
│ └── references.qmd
├── figures
│ ├── dte_qte.png
│ └── ecm_htg.png
├── themes
│ ├── favicon.ico
│ ├── block.scss
│ ├── lang-tag.js
│ ├── ws_light.scss
│ ├── mathjax.html
│ └── ws_dark.scss
├── .vscode
│ └── ltex.dictionary.en-US.txt
├── _quarto.yml
├── linear
│ ├── linear-conclusion.qmd
│ ├── linear-chf.qmd
│ ├── linear-dynamic-panel-heterogeneity.qmd
│ ├── linear-mean-group.qmd
│ ├── linear-introduction.qmd
│ ├── linear-coefficient-variance.qmd
│ ├── linear-distribution.qmd
│ └── linear-dynamic-panel-iv.qmd
├── index.qmd
├── nonparametric
│ ├── nonparametric-heterogeneity-bias.qmd
│ ├── nonparametric-cre.qmd
│ ├── nonparametric-location-scale.qmd
│ ├── nonparametric-average-estimation.qmd
│ └── nonparametric-introduction.qmd
└── intro.qmd
├── .gitignore
├── docs
├── robots.txt
├── themes
│ └── favicon.ico
├── site_libs
│ ├── bootstrap
│ │ └── bootstrap-icons.woff
│ ├── quarto-html
│ │ ├── tippy.css
│ │ ├── tabsets
│ │ │ └── tabsets.js
│ │ ├── quarto-syntax-highlighting-dark-b53751a350365c71b6c909e95f209ed1.css
│ │ ├── quarto-syntax-highlighting-2f5df379a58b258e96c21c0638c20c03.css
│ │ ├── quarto-syntax-highlighting-dark-bc185b5c5bdbcb35c2eb49d8a876ef70.css
│ │ ├── quarto-syntax-highlighting-ea385d0e468b0dd5ea5bf0780b1290d9.css
│ │ └── anchor.min.js
│ ├── quarto-nav
│ │ ├── headroom.min.js
│ │ └── quarto-nav.js
│ └── clipboard
│ │ └── clipboard.min.js
└── sitemap.xml
├── .github
├── ISSUE_TEMPLATE
│ ├── typo.md
│ ├── block.md
│ └── lecture.md
└── PULL_REQUEST_TEMPLATE.md
└── README.md
/src/.gitignore:
--------------------------------------------------------------------------------
1 | /.quarto/
2 | *_extensions/*
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.quarto/
2 | _book/*
3 | _freeze/*
--------------------------------------------------------------------------------
/src/references/references.qmd:
--------------------------------------------------------------------------------
1 | # References {.unnumbered}
2 |
3 | ::: {#refs}
4 | :::
5 |
--------------------------------------------------------------------------------
/docs/robots.txt:
--------------------------------------------------------------------------------
1 | Sitemap: https://vladislav-morozov.github.io/econometrics-heterogeneity/sitemap.xml
2 |
--------------------------------------------------------------------------------
/docs/themes/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladislav-morozov/econometrics-heterogeneity/HEAD/docs/themes/favicon.ico
--------------------------------------------------------------------------------
/src/figures/dte_qte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladislav-morozov/econometrics-heterogeneity/HEAD/src/figures/dte_qte.png
--------------------------------------------------------------------------------
/src/figures/ecm_htg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladislav-morozov/econometrics-heterogeneity/HEAD/src/figures/ecm_htg.png
--------------------------------------------------------------------------------
/src/themes/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladislav-morozov/econometrics-heterogeneity/HEAD/src/themes/favicon.ico
--------------------------------------------------------------------------------
/src/.vscode/ltex.dictionary.en-US.txt:
--------------------------------------------------------------------------------
1 | exogeneity
2 | endogeneity
3 | Nonparametric
4 | deconvolution
5 | stationarity
6 | Stationarity
7 |
--------------------------------------------------------------------------------
/docs/site_libs/bootstrap/bootstrap-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vladislav-morozov/econometrics-heterogeneity/HEAD/docs/site_libs/bootstrap/bootstrap-icons.woff
--------------------------------------------------------------------------------
/src/themes/block.scss:
--------------------------------------------------------------------------------
1 | /*-- scss:functions --*/
2 |
3 | div p.lang-tag {
4 | margin: 0.2rem;
5 | text-align: left;
6 | font-size: 0.8rem;
7 | font-weight: bolder;
8 | color: var(--quarto-hl-co-color);
9 | }
--------------------------------------------------------------------------------
/src/themes/lang-tag.js:
--------------------------------------------------------------------------------
1 | document.addEventListener("DOMContentLoaded", function() {
2 | var codeBlocks = document.querySelectorAll("pre.sourceCode");
3 | codeBlocks.forEach(function(codeBlock) {
4 | var langTag = document.createElement('p');
5 | langTag.className = "lang-tag";
6 | langTag.textContent = codeBlock.className.split(' ')[1];
7 | codeBlock.parentNode.insertBefore(langTag, codeBlock);
8 | });
9 | })
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/typo.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Typos and errors
3 | about: Fixing typos and other errors in the text
4 | title: "[ERROR] "
5 | labels: typo
6 | assignees: ''
7 | ---
8 |
9 | # Error: [Brief Description]
10 |
11 | ## Description
12 | Provide a brief overview of the error. Include a link to the affected section. If possible, propose a correction.
13 |
14 | ## Additional Notes
15 | Include any references or supplementary materials relevant to this issue.
16 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/block.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Block issues
3 | about: Anything related to block-level content
4 | title: "[BLOCK] "
5 | labels: block
6 | assignees: ''
7 | ---
8 |
9 | # Block: [Title of Block]
10 |
11 | ## Description
12 | Provide an overview of the block and its primary objectives. Include a brief summary of the themes, topics, or chapters it covers.
13 |
14 | ## Component Lectures/Sections
15 | List the lectures or sections included in this block:
16 | - [ ] [Lecture 1.1: Title of Lecture]
17 |
18 | (To be filled with sub-issues after creation)
19 |
20 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Lecture/Block/...: [TITLE]
2 |
3 | ## Description
4 | Briefly describe what this PR introduces or changes (e.g., "Adds lecture content for [title]" or "Fixes typos in [title]").
5 |
6 | ## Related Issues
7 | - Closes #[Issue Number] (e.g., the issue tracking this lecture)
8 |
9 | ## Checklist
10 | - [ ] Content added in full.
11 | - [ ] Learning objectives added.
12 | - [ ] References updated.
13 | - [ ] Proofread for grammar, spelling, and clarity.
14 | - [ ] Integrated with the relevant block branch.
15 |
16 | ## Additional Notes
17 |
18 | (If applicable)
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/lecture.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Lecture or section edit
3 | about: Adding new sections or changing existing section content
4 | title: "[LECTURE] "
5 | labels: lecture
6 | assignees: ''
7 | ---
8 |
9 | # Lecture: [Title of Lecture]
10 |
11 | ## Description
12 | Provide a brief overview of the lecture content and its objectives.
13 |
14 | ## Tasks
15 | - [ ] Outline the main topics to cover.
16 | - [ ] Draft the content.
17 | - [ ] Proofread for clarity and accuracy.
18 | - [ ] Finalize and prepare for integration into the block.
19 |
20 | ## Metadata
21 | - **Block**: [Block number/name]
22 | - **Priority**: [High/Medium/Low]
23 | - **Target Completion Date**: [YYYY-MM-DD]
24 |
25 | ## Additional Notes
26 | Include any references or supplementary materials relevant to this lecture.
27 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/tippy.css:
--------------------------------------------------------------------------------
1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
--------------------------------------------------------------------------------
/src/_quarto.yml:
--------------------------------------------------------------------------------
1 | project:
2 | type: book
3 | output-dir: ../docs
4 |
5 | html-math-method: mathjax
6 |
7 | filters:
8 | - diagram
9 | diagram:
10 | engine:
11 | tikz:
12 | execpath: pdflatex
13 | header-includes:
14 | - '\usepackage{adjustbox}'
15 | - '\usetikzlibrary{arrows,calc,fit,shapes.arrows,shapes.geometric,shapes.multipart,decorations.pathmorphing,patterns,positioning,swigs}'
16 |
17 | book:
18 | title: "Econometrics with Unobserved Heterogeneity"
19 | author: "Vladislav Morozov"
20 | date: 03/03/2025
21 | date-format: "YYYY"
22 | favicon: themes/favicon.ico
23 | site-url: https://vladislav-morozov.github.io/econometrics-heterogeneity/
24 | repo-url: https://github.com/vladislav-morozov/econometrics-heterogeneity/
25 | repo-actions: [edit, issue]
26 | repo-subdir: "src"
27 | sidebar:
28 | tools:
29 | - icon: person-arms-up
30 | href: https://vladislav-morozov.github.io/
31 | - icon: linkedin
32 | href: https://www.linkedin.com/in/vladislavvmorozov/
33 | chapters:
34 | - index.qmd
35 | - intro.qmd
36 | - part: "Linear Models"
37 | chapters:
38 | - linear/linear-introduction.qmd
39 | - linear/linear-within-estimator.qmd
40 | - linear/linear-dynamic-panel-iv.qmd
41 | - linear/linear-dynamic-panel-heterogeneity.qmd
42 | - linear/linear-mean-group.qmd
43 | - linear/linear-coefficient-variance.qmd
44 | - linear/linear-chf.qmd
45 | - linear/linear-distribution.qmd
46 | - linear/linear-conclusion.qmd
47 | - part: "Nonparametrics and Heterogeneity"
48 | chapters:
49 | - nonparametric/nonparametric-introduction.qmd
50 | - nonparametric/nonparametric-heterogeneity-bias.qmd
51 | - nonparametric/nonparametric-average-identification.qmd
52 | - nonparametric/nonparametric-average-estimation.qmd
53 | - nonparametric/nonparametric-location-scale.qmd
54 | - nonparametric/nonparametric-cre.qmd
55 | - nonparametric/nonparametric-variance.qmd
56 | - part: "Quantile and Distributional Methods"
57 | - references/references.qmd
58 |
59 | bibliography: references/eco.bib
60 |
61 | format:
62 | html:
63 | include-in-header: themes/mathjax.html
64 | theme:
65 | dark: [themes/ws_dark.scss, themes/block.scss]
66 | light: [themes/ws_light.scss, themes/block.scss]
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Econometrics with Unobserved Heterogeneity – Lecture Notes
2 |
3 | 
4 |
5 | ## Short Description
6 |
7 | [](https://doi.org/10.5281/zenodo.15459848)
8 |
9 | This repository contains lecture notes for the course *Econometrics with Unobserved Heterogeneity*, based on a graduate-level topics course I taught at the University of Bonn.
10 |
11 | 📖 **Read the lecture notes on my website:**
12 |
13 |
14 |
15 | Causal inference with unobserved heterogeneity is the core challenge of empirical economics. Whether due to heterogeneous treatment effects, omitted confounders, or measurement error, unobserved factors create confounding in the data and require developing appropriate methods. This course surveys some modern identification strategies and estimation methods designed to recover causal relationships from observational data, where treatments are endogenously selected and key determinants of outcomes are hidden.
16 |
17 |
18 |
19 | ## Course Overview
20 |
21 | **Instructor:** Vladislav Morozov\
22 | **DOI**: 10.5281/zenodo.15459849\
23 | **Level:** Second-year Master’s and PhD students; accessible to sufficiently prepared upper-level undergraduate students
24 |
25 | The course is structured into three main parts:
26 |
27 | - Linear models with heterogeneous coefficients.
28 | - Nonparametric models with unobserved heterogeneity.
29 | - Quantile and distributional regression.
30 |
31 | 
32 | *Selected image: visual representation of distributional treatment effects (DTEs) and quantile treatment effects (QTEs)*
33 |
34 |
35 |
36 | ## Learning Outcomes
37 |
38 |
39 | By the end of this course, students will be able to:
40 |
41 | - Identify and explain different sources of unobserved heterogeneity in economic data.
42 | - Apply econometric methods, such as heterogeneous coefficient models and quantile regression, to account for unobserved heterogeneity.
43 | - Evaluate the trade-offs and assumptions underlying different modeling approaches in empirical research.
44 |
45 |
46 | ## About These Notes, Feedback & Contributions
47 |
48 |
49 | These notes are being written and uploaded incrementally as part of an ongoing effort to document the lecture material in a clear and structured format.
50 |
51 | If you find any typos or have suggestions, please open an issue here on GitHub! Suggestions, typo reports, and comments are welcome!
52 |
53 | ## License
54 |
55 | These lecture notes are released under the MIT License. Feel free to cite or share this material with attribution. For academic or teaching use, linking to the online version is recommended!
--------------------------------------------------------------------------------
/src/linear/linear-conclusion.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Concluding remarks and further results on linear models with heterogeneous coefficients (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Concluding remarks and further results on linear models with heterogeneous coefficients (Lecture Notes)"
6 | ---
7 |
8 | # Conclusion: Linear Models
9 |
10 | ## Summary
11 |
12 | In this block, we have examined the linear panel data model ([-@eq-lecture_model]) with time-invariant heterogeneous coefficients. Our primary focus was on identifying the moments (mean, variance, etc.) and the full distribution of these coefficients:
13 |
14 | - For the mean:
15 | - We discovered that traditional within and IV estimators are generally inconsistent under coefficient heterogeneity.
16 | - To address this, we introduced the mean group estimator, which is robust to any dependence structure between the coefficients and the covariates @Pesaran1995.
17 | - For the variance and distribution, we employed a constructive approach from @Arellano2012, which relies on assumptions about the idiosyncratic error components. As with the mean, the variance and distribution are identified without restricting the dependence between the coefficients and the covariates.
18 |
19 | ## Some Further Results on Heterogeneous Linear Models
20 |
21 | We have barely scratched the surface of the literature on linear models with unobserved heterogeneity is extensive. If you are interested, here is a selection of some further results:
22 |
23 | - **Further results in model ([-@eq-lecture_model])**: For example, it is possible to identify the average effect even when the number of periods equals the number of covariates (@Graham2012). Additionally, endogeneity can be permitted in the equation (@Laage2019).
24 | - **Time-varying coefficients**: Models ([-@eq-panel_hetero]) with time-varying heterogeneous coefficients have also received some recent attention, particularly in the "grouped fixed effect" literature. Notable papers include @Bonhomme2015 and @Lumsdaine2023EstimationPanelGroup (also see @Bonhomme2022DiscretizingUnobservedHeterogeneity).
25 | - **Unobserved Factors**: Models with unobserved factors allow for common shocks to impact individuals differently and provide a parsimonious way to include cross-sectional dependence. Key references include @Pesaran2006 and @Bai2009.
26 | - **Cross-Sectional Data**: Some identification is possible with cross-sectional data, typically assuming that coefficients are independent from the covariates (a randomized experiment framework). See @Hoderlein2010 and @Masten2018 for identifying the full distribution of coefficients in single-equation and system of equations frameworks, respectively.
27 | - **Deconvolution Applications**: Deconvolution is a versatile technique with broad applications. For examples, see @Bonhomme2009AssessingEqualizingForce and @Bonhomme2010GeneralizedNonParametricDeconvolution.
28 |
29 | ---
30 |
31 | #### Next Section {.unnumbered}
32 |
33 | In the next section we will move beyond linearity and start our discussion of nonparametric models with unobserved heterogeneity.
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/tabsets/tabsets.js:
--------------------------------------------------------------------------------
1 | // grouped tabsets
2 |
3 | export function init() {
4 | window.addEventListener("pageshow", (_event) => {
5 | function getTabSettings() {
6 | const data = localStorage.getItem("quarto-persistent-tabsets-data");
7 | if (!data) {
8 | localStorage.setItem("quarto-persistent-tabsets-data", "{}");
9 | return {};
10 | }
11 | if (data) {
12 | return JSON.parse(data);
13 | }
14 | }
15 |
16 | function setTabSettings(data) {
17 | localStorage.setItem(
18 | "quarto-persistent-tabsets-data",
19 | JSON.stringify(data)
20 | );
21 | }
22 |
23 | function setTabState(groupName, groupValue) {
24 | const data = getTabSettings();
25 | data[groupName] = groupValue;
26 | setTabSettings(data);
27 | }
28 |
29 | function toggleTab(tab, active) {
30 | const tabPanelId = tab.getAttribute("aria-controls");
31 | const tabPanel = document.getElementById(tabPanelId);
32 | if (active) {
33 | tab.classList.add("active");
34 | tabPanel.classList.add("active");
35 | } else {
36 | tab.classList.remove("active");
37 | tabPanel.classList.remove("active");
38 | }
39 | }
40 |
41 | function toggleAll(selectedGroup, selectorsToSync) {
42 | for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) {
43 | const active = selectedGroup === thisGroup;
44 | for (const tab of tabs) {
45 | toggleTab(tab, active);
46 | }
47 | }
48 | }
49 |
50 | function findSelectorsToSyncByLanguage() {
51 | const result = {};
52 | const tabs = Array.from(
53 | document.querySelectorAll(`div[data-group] a[id^='tabset-']`)
54 | );
55 | for (const item of tabs) {
56 | const div = item.parentElement.parentElement.parentElement;
57 | const group = div.getAttribute("data-group");
58 | if (!result[group]) {
59 | result[group] = {};
60 | }
61 | const selectorsToSync = result[group];
62 | const value = item.innerHTML;
63 | if (!selectorsToSync[value]) {
64 | selectorsToSync[value] = [];
65 | }
66 | selectorsToSync[value].push(item);
67 | }
68 | return result;
69 | }
70 |
71 | function setupSelectorSync() {
72 | const selectorsToSync = findSelectorsToSyncByLanguage();
73 | Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => {
74 | Object.entries(tabSetsByValue).forEach(([value, items]) => {
75 | items.forEach((item) => {
76 | item.addEventListener("click", (_event) => {
77 | setTabState(group, value);
78 | toggleAll(value, selectorsToSync[group]);
79 | });
80 | });
81 | });
82 | });
83 | return selectorsToSync;
84 | }
85 |
86 | const selectorsToSync = setupSelectorSync();
87 | for (const [group, selectedName] of Object.entries(getTabSettings())) {
88 | const selectors = selectorsToSync[group];
89 | // it's possible that stale state gives us empty selections, so we explicitly check here.
90 | if (selectors) {
91 | toggleAll(selectedName, selectors);
92 | }
93 | }
94 | });
95 | }
96 |
--------------------------------------------------------------------------------
/docs/sitemap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | https://vladislav-morozov.github.io/econometrics-heterogeneity/index.html
5 | 2025-08-25T13:37:34.902Z
6 |
7 |
8 | https://vladislav-morozov.github.io/econometrics-heterogeneity/intro.html
9 | 2025-08-20T11:54:35.752Z
10 |
11 |
12 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-introduction.html
13 | 2025-08-20T11:54:35.763Z
14 |
15 |
16 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-within-estimator.html
17 | 2025-08-20T11:54:35.769Z
18 |
19 |
20 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-dynamic-panel-iv.html
21 | 2025-08-20T11:54:35.760Z
22 |
23 |
24 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-dynamic-panel-heterogeneity.html
25 | 2025-08-20T11:54:35.757Z
26 |
27 |
28 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-mean-group.html
29 | 2025-08-20T11:54:35.766Z
30 |
31 |
32 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-coefficient-variance.html
33 | 2025-08-20T11:54:35.752Z
34 |
35 |
36 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-chf.html
37 | 2025-08-20T11:54:35.752Z
38 |
39 |
40 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-distribution.html
41 | 2025-08-20T11:54:35.752Z
42 |
43 |
44 | https://vladislav-morozov.github.io/econometrics-heterogeneity/linear/linear-conclusion.html
45 | 2025-05-02T08:44:52.435Z
46 |
47 |
48 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-introduction.html
49 | 2025-08-20T13:10:08.004Z
50 |
51 |
52 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-heterogeneity-bias.html
53 | 2025-08-20T13:10:08.002Z
54 |
55 |
56 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-average-identification.html
57 | 2025-08-20T14:54:37.019Z
58 |
59 |
60 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-average-estimation.html
61 | 2025-08-20T13:10:07.996Z
62 |
63 |
64 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-location-scale.html
65 | 2025-08-20T14:54:37.022Z
66 |
67 |
68 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-cre.html
69 | 2025-08-20T17:15:15.731Z
70 |
71 |
72 | https://vladislav-morozov.github.io/econometrics-heterogeneity/nonparametric/nonparametric-variance.html
73 | 2025-08-20T20:11:14.623Z
74 |
75 |
76 | https://vladislav-morozov.github.io/econometrics-heterogeneity/references/references.html
77 | 2025-03-17T16:13:22.884Z
78 |
79 |
80 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/quarto-syntax-highlighting-dark-b53751a350365c71b6c909e95f209ed1.css:
--------------------------------------------------------------------------------
1 | /* quarto syntax highlight colors */
2 | :root {
3 | --quarto-hl-al-color: #f07178;
4 | --quarto-hl-an-color: #d4d0ab;
5 | --quarto-hl-at-color: #00e0e0;
6 | --quarto-hl-bn-color: #d4d0ab;
7 | --quarto-hl-bu-color: #abe338;
8 | --quarto-hl-ch-color: #abe338;
9 | --quarto-hl-co-color: #f8f8f2;
10 | --quarto-hl-cv-color: #ffd700;
11 | --quarto-hl-cn-color: #ffd700;
12 | --quarto-hl-cf-color: #ffa07a;
13 | --quarto-hl-dt-color: #ffa07a;
14 | --quarto-hl-dv-color: #d4d0ab;
15 | --quarto-hl-do-color: #f8f8f2;
16 | --quarto-hl-er-color: #f07178;
17 | --quarto-hl-ex-color: #00e0e0;
18 | --quarto-hl-fl-color: #d4d0ab;
19 | --quarto-hl-fu-color: #ffa07a;
20 | --quarto-hl-im-color: #abe338;
21 | --quarto-hl-in-color: #d4d0ab;
22 | --quarto-hl-kw-color: #ffa07a;
23 | --quarto-hl-op-color: #ffa07a;
24 | --quarto-hl-ot-color: #00e0e0;
25 | --quarto-hl-pp-color: #dcc6e0;
26 | --quarto-hl-re-color: #00e0e0;
27 | --quarto-hl-sc-color: #abe338;
28 | --quarto-hl-ss-color: #abe338;
29 | --quarto-hl-st-color: #abe338;
30 | --quarto-hl-va-color: #00e0e0;
31 | --quarto-hl-vs-color: #abe338;
32 | --quarto-hl-wa-color: #dcc6e0;
33 | }
34 |
35 | /* other quarto variables */
36 | :root {
37 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
38 | }
39 |
40 | code span.al {
41 | background-color: #2a0f15;
42 | font-weight: bold;
43 | color: #f07178;
44 | }
45 |
46 | code span.an {
47 | color: #d4d0ab;
48 | }
49 |
50 | code span.at {
51 | color: #00e0e0;
52 | }
53 |
54 | code span.bn {
55 | color: #d4d0ab;
56 | }
57 |
58 | code span.bu {
59 | color: #abe338;
60 | }
61 |
62 | code span.ch {
63 | color: #abe338;
64 | }
65 |
66 | code span.co {
67 | font-style: italic;
68 | color: #f8f8f2;
69 | }
70 |
71 | code span.cv {
72 | color: #ffd700;
73 | }
74 |
75 | code span.cn {
76 | color: #ffd700;
77 | }
78 |
79 | code span.cf {
80 | font-weight: bold;
81 | color: #ffa07a;
82 | }
83 |
84 | code span.dt {
85 | color: #ffa07a;
86 | }
87 |
88 | code span.dv {
89 | color: #d4d0ab;
90 | }
91 |
92 | code span.do {
93 | color: #f8f8f2;
94 | }
95 |
96 | code span.er {
97 | color: #f07178;
98 | text-decoration: underline;
99 | }
100 |
101 | code span.ex {
102 | font-weight: bold;
103 | color: #00e0e0;
104 | }
105 |
106 | code span.fl {
107 | color: #d4d0ab;
108 | }
109 |
110 | code span.fu {
111 | color: #ffa07a;
112 | }
113 |
114 | code span.im {
115 | color: #abe338;
116 | }
117 |
118 | code span.in {
119 | color: #d4d0ab;
120 | }
121 |
122 | code span.kw {
123 | font-weight: bold;
124 | color: #ffa07a;
125 | }
126 |
127 | pre > code.sourceCode > span {
128 | color: #f8f8f2;
129 | }
130 |
131 | code span {
132 | color: #f8f8f2;
133 | }
134 |
135 | code.sourceCode > span {
136 | color: #f8f8f2;
137 | }
138 |
139 | div.sourceCode,
140 | div.sourceCode pre.sourceCode {
141 | color: #f8f8f2;
142 | }
143 |
144 | code span.op {
145 | color: #ffa07a;
146 | }
147 |
148 | code span.ot {
149 | color: #00e0e0;
150 | }
151 |
152 | code span.pp {
153 | color: #dcc6e0;
154 | }
155 |
156 | code span.re {
157 | background-color: #f8f8f2;
158 | color: #00e0e0;
159 | }
160 |
161 | code span.sc {
162 | color: #abe338;
163 | }
164 |
165 | code span.ss {
166 | color: #abe338;
167 | }
168 |
169 | code span.st {
170 | color: #abe338;
171 | }
172 |
173 | code span.va {
174 | color: #00e0e0;
175 | }
176 |
177 | code span.vs {
178 | color: #abe338;
179 | }
180 |
181 | code span.wa {
182 | color: #dcc6e0;
183 | }
184 |
185 | .prevent-inlining {
186 | content: "";
187 | }
188 |
189 | /*# sourceMappingURL=ef095d06243fb944689b9469f3a5590a.css.map */
190 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/quarto-syntax-highlighting-2f5df379a58b258e96c21c0638c20c03.css:
--------------------------------------------------------------------------------
1 | /* quarto syntax highlight colors */
2 | :root {
3 | --quarto-hl-ot-color: #003B4F;
4 | --quarto-hl-at-color: #657422;
5 | --quarto-hl-ss-color: #20794D;
6 | --quarto-hl-an-color: #5E5E5E;
7 | --quarto-hl-fu-color: #4758AB;
8 | --quarto-hl-st-color: #20794D;
9 | --quarto-hl-cf-color: #003B4F;
10 | --quarto-hl-op-color: #5E5E5E;
11 | --quarto-hl-er-color: #AD0000;
12 | --quarto-hl-bn-color: #AD0000;
13 | --quarto-hl-al-color: #AD0000;
14 | --quarto-hl-va-color: #111111;
15 | --quarto-hl-bu-color: inherit;
16 | --quarto-hl-ex-color: inherit;
17 | --quarto-hl-pp-color: #AD0000;
18 | --quarto-hl-in-color: #5E5E5E;
19 | --quarto-hl-vs-color: #20794D;
20 | --quarto-hl-wa-color: #5E5E5E;
21 | --quarto-hl-do-color: #5E5E5E;
22 | --quarto-hl-im-color: #00769E;
23 | --quarto-hl-ch-color: #20794D;
24 | --quarto-hl-dt-color: #AD0000;
25 | --quarto-hl-fl-color: #AD0000;
26 | --quarto-hl-co-color: #5E5E5E;
27 | --quarto-hl-cv-color: #5E5E5E;
28 | --quarto-hl-cn-color: #8f5902;
29 | --quarto-hl-sc-color: #5E5E5E;
30 | --quarto-hl-dv-color: #AD0000;
31 | --quarto-hl-kw-color: #003B4F;
32 | }
33 |
34 | /* other quarto variables */
35 | :root {
36 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
37 | }
38 |
39 | pre > code.sourceCode > span {
40 | color: #003B4F;
41 | }
42 |
43 | code span {
44 | color: #003B4F;
45 | }
46 |
47 | code.sourceCode > span {
48 | color: #003B4F;
49 | }
50 |
51 | div.sourceCode,
52 | div.sourceCode pre.sourceCode {
53 | color: #003B4F;
54 | }
55 |
56 | code span.ot {
57 | color: #003B4F;
58 | font-style: inherit;
59 | }
60 |
61 | code span.at {
62 | color: #657422;
63 | font-style: inherit;
64 | }
65 |
66 | code span.ss {
67 | color: #20794D;
68 | font-style: inherit;
69 | }
70 |
71 | code span.an {
72 | color: #5E5E5E;
73 | font-style: inherit;
74 | }
75 |
76 | code span.fu {
77 | color: #4758AB;
78 | font-style: inherit;
79 | }
80 |
81 | code span.st {
82 | color: #20794D;
83 | font-style: inherit;
84 | }
85 |
86 | code span.cf {
87 | color: #003B4F;
88 | font-weight: bold;
89 | font-style: inherit;
90 | }
91 |
92 | code span.op {
93 | color: #5E5E5E;
94 | font-style: inherit;
95 | }
96 |
97 | code span.er {
98 | color: #AD0000;
99 | font-style: inherit;
100 | }
101 |
102 | code span.bn {
103 | color: #AD0000;
104 | font-style: inherit;
105 | }
106 |
107 | code span.al {
108 | color: #AD0000;
109 | font-style: inherit;
110 | }
111 |
112 | code span.va {
113 | color: #111111;
114 | font-style: inherit;
115 | }
116 |
117 | code span.bu {
118 | font-style: inherit;
119 | }
120 |
121 | code span.ex {
122 | font-style: inherit;
123 | }
124 |
125 | code span.pp {
126 | color: #AD0000;
127 | font-style: inherit;
128 | }
129 |
130 | code span.in {
131 | color: #5E5E5E;
132 | font-style: inherit;
133 | }
134 |
135 | code span.vs {
136 | color: #20794D;
137 | font-style: inherit;
138 | }
139 |
140 | code span.wa {
141 | color: #5E5E5E;
142 | font-style: italic;
143 | }
144 |
145 | code span.do {
146 | color: #5E5E5E;
147 | font-style: italic;
148 | }
149 |
150 | code span.im {
151 | color: #00769E;
152 | font-style: inherit;
153 | }
154 |
155 | code span.ch {
156 | color: #20794D;
157 | font-style: inherit;
158 | }
159 |
160 | code span.dt {
161 | color: #AD0000;
162 | font-style: inherit;
163 | }
164 |
165 | code span.fl {
166 | color: #AD0000;
167 | font-style: inherit;
168 | }
169 |
170 | code span.co {
171 | color: #5E5E5E;
172 | font-style: inherit;
173 | }
174 |
175 | code span.cv {
176 | color: #5E5E5E;
177 | font-style: italic;
178 | }
179 |
180 | code span.cn {
181 | color: #8f5902;
182 | font-style: inherit;
183 | }
184 |
185 | code span.sc {
186 | color: #5E5E5E;
187 | font-style: inherit;
188 | }
189 |
190 | code span.dv {
191 | color: #AD0000;
192 | font-style: inherit;
193 | }
194 |
195 | code span.kw {
196 | color: #003B4F;
197 | font-weight: bold;
198 | font-style: inherit;
199 | }
200 |
201 | .prevent-inlining {
202 | content: "";
203 | }
204 |
205 | /*# sourceMappingURL=35eb38a806ee71ea6d2563be2308c832.css.map */
206 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-nav/headroom.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
3 | * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
4 | * License: MIT
5 | */
6 |
7 | !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}(t):function(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}(t)}function n(t,s,e){var n,o=function(){var n=!1;try{var t={get passive(){n=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){n=!1}return n}(),i=!1,r=d(t),l=r.scrollY(),a={};function c(){var t=Math.round(r.scrollY()),n=r.height(),o=r.scrollHeight();a.scrollY=t,a.lastScrollY=l,a.direction=ls.tolerance[a.direction],e(a),l=t,i=!1}function h(){i||(i=!0,n=requestAnimationFrame(c))}var u=!!o&&{passive:!0,capture:!1};return t.addEventListener("scroll",h,u),c(),{destroy:function(){cancelAnimationFrame(n),t.removeEventListener("scroll",h,u)}}}function o(t){return t===Object(t)?t:{down:t,up:t}}function s(t,n){n=n||{},Object.assign(this,s.options,n),this.classes=Object.assign({},s.options.classes,n.classes),this.elem=t,this.tolerance=o(this.tolerance),this.offset=o(this.offset),this.initialised=!1,this.frozen=!1}return s.prototype={constructor:s,init:function(){return s.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=n(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},s.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},s.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),s});
8 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/quarto-syntax-highlighting-dark-bc185b5c5bdbcb35c2eb49d8a876ef70.css:
--------------------------------------------------------------------------------
1 | /* quarto syntax highlight colors */
2 | :root {
3 | --quarto-hl-al-color: #f07178;
4 | --quarto-hl-an-color: #d4d0ab;
5 | --quarto-hl-at-color: #00e0e0;
6 | --quarto-hl-bn-color: #d4d0ab;
7 | --quarto-hl-bu-color: #abe338;
8 | --quarto-hl-ch-color: #abe338;
9 | --quarto-hl-co-color: #f8f8f2;
10 | --quarto-hl-cv-color: #ffd700;
11 | --quarto-hl-cn-color: #ffd700;
12 | --quarto-hl-cf-color: #ffa07a;
13 | --quarto-hl-dt-color: #ffa07a;
14 | --quarto-hl-dv-color: #d4d0ab;
15 | --quarto-hl-do-color: #f8f8f2;
16 | --quarto-hl-er-color: #f07178;
17 | --quarto-hl-ex-color: #00e0e0;
18 | --quarto-hl-fl-color: #d4d0ab;
19 | --quarto-hl-fu-color: #ffa07a;
20 | --quarto-hl-im-color: #abe338;
21 | --quarto-hl-in-color: #d4d0ab;
22 | --quarto-hl-kw-color: #ffa07a;
23 | --quarto-hl-op-color: #ffa07a;
24 | --quarto-hl-ot-color: #00e0e0;
25 | --quarto-hl-pp-color: #dcc6e0;
26 | --quarto-hl-re-color: #00e0e0;
27 | --quarto-hl-sc-color: #abe338;
28 | --quarto-hl-ss-color: #abe338;
29 | --quarto-hl-st-color: #abe338;
30 | --quarto-hl-va-color: #00e0e0;
31 | --quarto-hl-vs-color: #abe338;
32 | --quarto-hl-wa-color: #dcc6e0;
33 | }
34 |
35 | /* other quarto variables */
36 | :root {
37 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
38 | }
39 |
40 | /* syntax highlight based on Pandoc's rules */
41 | pre > code.sourceCode > span {
42 | color: #f8f8f2;
43 | }
44 |
45 | code.sourceCode > span {
46 | color: #f8f8f2;
47 | }
48 |
49 | div.sourceCode,
50 | div.sourceCode pre.sourceCode {
51 | color: #f8f8f2;
52 | }
53 |
54 | /* Normal */
55 | code span {
56 | color: #f8f8f2;
57 | }
58 |
59 | /* Alert */
60 | code span.al {
61 | color: #f07178;
62 | }
63 |
64 | /* Annotation */
65 | code span.an {
66 | color: #d4d0ab;
67 | }
68 |
69 | /* Attribute */
70 | code span.at {
71 | color: #00e0e0;
72 | }
73 |
74 | /* BaseN */
75 | code span.bn {
76 | color: #d4d0ab;
77 | }
78 |
79 | /* BuiltIn */
80 | code span.bu {
81 | color: #abe338;
82 | }
83 |
84 | /* ControlFlow */
85 | code span.cf {
86 | font-weight: bold;
87 | color: #ffa07a;
88 | }
89 |
90 | /* Char */
91 | code span.ch {
92 | color: #abe338;
93 | }
94 |
95 | /* Constant */
96 | code span.cn {
97 | color: #ffd700;
98 | }
99 |
100 | /* Comment */
101 | code span.co {
102 | font-style: italic;
103 | color: #f8f8f2;
104 | }
105 |
106 | /* CommentVar */
107 | code span.cv {
108 | color: #ffd700;
109 | }
110 |
111 | /* Documentation */
112 | code span.do {
113 | color: #f8f8f2;
114 | }
115 |
116 | /* DataType */
117 | code span.dt {
118 | color: #ffa07a;
119 | }
120 |
121 | /* DecVal */
122 | code span.dv {
123 | color: #d4d0ab;
124 | }
125 |
126 | /* Error */
127 | code span.er {
128 | color: #f07178;
129 | text-decoration: underline;
130 | }
131 |
132 | /* Extension */
133 | code span.ex {
134 | font-weight: bold;
135 | color: #00e0e0;
136 | }
137 |
138 | /* Float */
139 | code span.fl {
140 | color: #d4d0ab;
141 | }
142 |
143 | /* Function */
144 | code span.fu {
145 | color: #ffa07a;
146 | }
147 |
148 | /* Import */
149 | code span.im {
150 | color: #abe338;
151 | }
152 |
153 | /* Information */
154 | code span.in {
155 | color: #d4d0ab;
156 | }
157 |
158 | /* Keyword */
159 | code span.kw {
160 | font-weight: bold;
161 | color: #ffa07a;
162 | }
163 |
164 | /* Operator */
165 | code span.op {
166 | color: #ffa07a;
167 | }
168 |
169 | /* Other */
170 | code span.ot {
171 | color: #00e0e0;
172 | }
173 |
174 | /* Preprocessor */
175 | code span.pp {
176 | color: #dcc6e0;
177 | }
178 |
179 | /* RegionMarker */
180 | code span.re {
181 | background-color: #f8f8f2;
182 | color: #00e0e0;
183 | }
184 |
185 | /* SpecialChar */
186 | code span.sc {
187 | color: #abe338;
188 | }
189 |
190 | /* SpecialString */
191 | code span.ss {
192 | color: #abe338;
193 | }
194 |
195 | /* String */
196 | code span.st {
197 | color: #abe338;
198 | }
199 |
200 | /* Variable */
201 | code span.va {
202 | color: #00e0e0;
203 | }
204 |
205 | /* VerbatimString */
206 | code span.vs {
207 | color: #abe338;
208 | }
209 |
210 | /* Warning */
211 | code span.wa {
212 | color: #dcc6e0;
213 | }
214 |
215 | .prevent-inlining {
216 | content: "";
217 | }
218 |
219 | /*# sourceMappingURL=9510e8932c082882303fe901a8ba9f6d.css.map */
220 |
--------------------------------------------------------------------------------
/src/themes/ws_light.scss:
--------------------------------------------------------------------------------
1 | /*-- scss:defaults --*/
2 | // quarto-scss-analysis-annotation { "origin": "cerulean (builtin theme)" }
3 |
4 | $theme: "light" !default;
5 | @import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&family=Roboto+Slab:wght@400;700&display=swap');
6 |
7 | //
8 | // Color system
9 | //
10 |
11 | $white: #fff !default;
12 | $gray-100: #f8f9fa !default;
13 | $gray-200: #e9ecef !default;
14 | $gray-300: #dee2e6 !default;
15 | $gray-400: #ced4da !default;
16 | $gray-500: #adb5bd !default;
17 | $gray-600: #868e96 !default;
18 | $gray-700: #495057 !default;
19 | $gray-800: #343a40 !default;
20 | $gray-900: #212529 !default;
21 | $black: #000 !default;
22 |
23 | $blue: #033c73 !default;
24 | $indigo: #6610f2 !default;
25 | $purple: #6f42c1 !default;
26 | $pink: #e83e8c !default;
27 | $red: #c71c22 !default;
28 | $orange: #fd7e14 !default;
29 | $yellow: #dd5600 !default;
30 | $green: #73a839 !default;
31 | $teal: #20c997 !default;
32 | $cyan: #2fa4e7 !default;
33 | $gold: #FBEE05 !default;
34 |
35 | $primary: $black !default;
36 | $secondary: $gray-100 !default;
37 | $success: $green !default;
38 | $info: $blue !default;
39 | $warning: $yellow !default;
40 | $danger: $red !default;
41 | $light: $gray-100 !default;
42 | $dark: $gray-800 !default;
43 |
44 |
45 | $navbar-bg: #141414 !default;
46 |
47 | $min-contrast-ratio: 2.75 !default;
48 |
49 | // Body
50 |
51 | $body-bg: $gray-100 !default;
52 | $body-color: $gray-900 !default;
53 |
54 | // Fonts
55 |
56 | $headings-color: $black !default;
57 |
58 |
59 | $link-color: $black !default;
60 | $link-hover-color: $link-color !default;
61 |
62 | // Dropdowns
63 |
64 | $dropdown-link-color: $body-color !default;
65 | $dropdown-link-hover-color: $gold !default;
66 | $dropdown-link-hover-bg: $gold !default;
67 | $dropdown-link-active-color: $gold !default;
68 | $dropdown-link-active-bg: $gold !default;
69 | $dropdown-header-color: $gold !default;
70 |
71 | /*-- scss:rules --*/
72 |
73 | // Variables
74 |
75 | $text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;
76 |
77 | // Mixins
78 |
79 | @mixin btn-shadow($color){
80 | @include gradient-y-three-colors(tint-color($color, 16%), $color, 60%, shade-color($color, 6%));
81 | }
82 |
83 | // Navbar
84 |
85 |
86 | $navbar-light-color: $navbar-bg;
87 | $navbar-dark-color: $navbar-bg;
88 |
89 |
90 | .navbar {
91 | background-color: $navbar-bg;
92 |
93 | @each $color, $value in $theme-colors {
94 | &.bg-#{$color} {
95 | @include btn-shadow($value);
96 | }
97 | }
98 | }
99 |
100 | .navbar {
101 | .navbar-brand,
102 | .nav-link {
103 | color: rgba($white, .9);
104 | text-shadow: $text-shadow;
105 |
106 | &:hover {
107 | color: $white;
108 | }
109 | }
110 | }
111 |
112 | // Buttons
113 |
114 | .btn {
115 | text-shadow: $text-shadow;
116 | }
117 |
118 | .btn-secondary,
119 | .btn-outline-secondary {
120 | color: $gray-700;
121 | }
122 |
123 | @each $color, $value in $theme-colors {
124 | .btn-#{$color} {
125 | @include btn-shadow($value);
126 | }
127 | }
128 |
129 | // Typography
130 |
131 | .text-secondary {
132 | color: $gray-500 !important;
133 | }
134 |
135 |
136 | h1, h2, h3, h4, h5, h6 {
137 | font-family: 'Roboto Slab', serif;
138 | }
139 |
140 | .bg-primary,
141 | .bg-success,
142 | .bg-info,
143 | .bg-warning,
144 | .bg-danger,
145 | .bg-dark {
146 | h1,
147 | h2,
148 | h3,
149 | h4,
150 | h5,
151 | h6 {
152 | color: $white;
153 | }
154 | }
155 |
156 | // Navs
157 |
158 | .dropdown-menu {
159 | .dropdown-header {
160 | color: $gray-600;
161 | }
162 | a {
163 | color: $body-color;
164 | text-decoration: underline;
165 | text-decoration-color: $gold;
166 | }
167 | }
168 |
169 | // Indicators
170 |
171 | .badge {
172 | &.bg-secondary,
173 | &.bg-light {
174 | color: $dark;
175 | }
176 |
177 |
178 |
179 | }
180 | $body-bg: $gold;
181 |
182 |
183 |
184 | body {
185 | background-color: $white;
186 | color: $gray-700;
187 | font-family: 'Noto Sans', sans-serif;
188 | }
189 |
190 |
191 | a {
192 | color: $black;
193 | text-decoration: underline;
194 | text-decoration-color: $gold;
195 | }
196 |
197 | ::selection {
198 | background-color: #fefaa4;
199 | }
200 |
201 | // quarto-scss-analysis-annotation { "origin": null }
202 |
203 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/quarto-syntax-highlighting-ea385d0e468b0dd5ea5bf0780b1290d9.css:
--------------------------------------------------------------------------------
1 | /* quarto syntax highlight colors */
2 | :root {
3 | --quarto-hl-ot-color: #003B4F;
4 | --quarto-hl-at-color: #657422;
5 | --quarto-hl-ss-color: #20794D;
6 | --quarto-hl-an-color: #5E5E5E;
7 | --quarto-hl-fu-color: #4758AB;
8 | --quarto-hl-st-color: #20794D;
9 | --quarto-hl-cf-color: #003B4F;
10 | --quarto-hl-op-color: #5E5E5E;
11 | --quarto-hl-er-color: #AD0000;
12 | --quarto-hl-bn-color: #AD0000;
13 | --quarto-hl-al-color: #AD0000;
14 | --quarto-hl-va-color: #111111;
15 | --quarto-hl-bu-color: inherit;
16 | --quarto-hl-ex-color: inherit;
17 | --quarto-hl-pp-color: #AD0000;
18 | --quarto-hl-in-color: #5E5E5E;
19 | --quarto-hl-vs-color: #20794D;
20 | --quarto-hl-wa-color: #5E5E5E;
21 | --quarto-hl-do-color: #5E5E5E;
22 | --quarto-hl-im-color: #00769E;
23 | --quarto-hl-ch-color: #20794D;
24 | --quarto-hl-dt-color: #AD0000;
25 | --quarto-hl-fl-color: #AD0000;
26 | --quarto-hl-co-color: #5E5E5E;
27 | --quarto-hl-cv-color: #5E5E5E;
28 | --quarto-hl-cn-color: #8f5902;
29 | --quarto-hl-sc-color: #5E5E5E;
30 | --quarto-hl-dv-color: #AD0000;
31 | --quarto-hl-kw-color: #003B4F;
32 | }
33 |
34 | /* other quarto variables */
35 | :root {
36 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
37 | }
38 |
39 | /* syntax highlight based on Pandoc's rules */
40 | pre > code.sourceCode > span {
41 | color: #003B4F;
42 | }
43 |
44 | code.sourceCode > span {
45 | color: #003B4F;
46 | }
47 |
48 | div.sourceCode,
49 | div.sourceCode pre.sourceCode {
50 | color: #003B4F;
51 | }
52 |
53 | /* Normal */
54 | code span {
55 | color: #003B4F;
56 | }
57 |
58 | /* Alert */
59 | code span.al {
60 | color: #AD0000;
61 | font-style: inherit;
62 | }
63 |
64 | /* Annotation */
65 | code span.an {
66 | color: #5E5E5E;
67 | font-style: inherit;
68 | }
69 |
70 | /* Attribute */
71 | code span.at {
72 | color: #657422;
73 | font-style: inherit;
74 | }
75 |
76 | /* BaseN */
77 | code span.bn {
78 | color: #AD0000;
79 | font-style: inherit;
80 | }
81 |
82 | /* BuiltIn */
83 | code span.bu {
84 | font-style: inherit;
85 | }
86 |
87 | /* ControlFlow */
88 | code span.cf {
89 | color: #003B4F;
90 | font-weight: bold;
91 | font-style: inherit;
92 | }
93 |
94 | /* Char */
95 | code span.ch {
96 | color: #20794D;
97 | font-style: inherit;
98 | }
99 |
100 | /* Constant */
101 | code span.cn {
102 | color: #8f5902;
103 | font-style: inherit;
104 | }
105 |
106 | /* Comment */
107 | code span.co {
108 | color: #5E5E5E;
109 | font-style: inherit;
110 | }
111 |
112 | /* CommentVar */
113 | code span.cv {
114 | color: #5E5E5E;
115 | font-style: italic;
116 | }
117 |
118 | /* Documentation */
119 | code span.do {
120 | color: #5E5E5E;
121 | font-style: italic;
122 | }
123 |
124 | /* DataType */
125 | code span.dt {
126 | color: #AD0000;
127 | font-style: inherit;
128 | }
129 |
130 | /* DecVal */
131 | code span.dv {
132 | color: #AD0000;
133 | font-style: inherit;
134 | }
135 |
136 | /* Error */
137 | code span.er {
138 | color: #AD0000;
139 | font-style: inherit;
140 | }
141 |
142 | /* Extension */
143 | code span.ex {
144 | font-style: inherit;
145 | }
146 |
147 | /* Float */
148 | code span.fl {
149 | color: #AD0000;
150 | font-style: inherit;
151 | }
152 |
153 | /* Function */
154 | code span.fu {
155 | color: #4758AB;
156 | font-style: inherit;
157 | }
158 |
159 | /* Import */
160 | code span.im {
161 | color: #00769E;
162 | font-style: inherit;
163 | }
164 |
165 | /* Information */
166 | code span.in {
167 | color: #5E5E5E;
168 | font-style: inherit;
169 | }
170 |
171 | /* Keyword */
172 | code span.kw {
173 | color: #003B4F;
174 | font-weight: bold;
175 | font-style: inherit;
176 | }
177 |
178 | /* Operator */
179 | code span.op {
180 | color: #5E5E5E;
181 | font-style: inherit;
182 | }
183 |
184 | /* Other */
185 | code span.ot {
186 | color: #003B4F;
187 | font-style: inherit;
188 | }
189 |
190 | /* Preprocessor */
191 | code span.pp {
192 | color: #AD0000;
193 | font-style: inherit;
194 | }
195 |
196 | /* SpecialChar */
197 | code span.sc {
198 | color: #5E5E5E;
199 | font-style: inherit;
200 | }
201 |
202 | /* SpecialString */
203 | code span.ss {
204 | color: #20794D;
205 | font-style: inherit;
206 | }
207 |
208 | /* String */
209 | code span.st {
210 | color: #20794D;
211 | font-style: inherit;
212 | }
213 |
214 | /* Variable */
215 | code span.va {
216 | color: #111111;
217 | font-style: inherit;
218 | }
219 |
220 | /* VerbatimString */
221 | code span.vs {
222 | color: #20794D;
223 | font-style: inherit;
224 | }
225 |
226 | /* Warning */
227 | code span.wa {
228 | color: #5E5E5E;
229 | font-style: italic;
230 | }
231 |
232 | .prevent-inlining {
233 | content: "";
234 | }
235 |
236 | /*# sourceMappingURL=538754cbb4183396a2435bcb80637e05.css.map */
237 |
--------------------------------------------------------------------------------
/src/linear/linear-chf.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Review characteristic functions and deconvolution for identifying distributions in econometrics. (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Review characteristic functions and deconvolution for identifying distributions in econometrics. (Lecture Notes)"
6 | ---
7 |
8 | # Interlude: Characteristic Functions and Deconvolution {#sec-linear-chf}
9 |
10 | ::: {.callout-note appearance="simple" icon=false}
11 |
12 | ## Summary and Learning Outcomes
13 |
14 | This section reviews characteristic functions and deconvolution.
15 |
16 | By the end of this section, you should be able to:
17 |
18 | - State some key properties of characteristic functions.
19 | - Carry out a basic nonparametric deconvolution argument for identifying distributions.
20 | :::
21 |
22 | To discuss the identification of the full distribution of the coefficients $\bbeta_i$ in model ([-@eq-lecture_model]), we need to review two key concepts: characteristic functions and deconvolution. This brief section can be freely skipped if you are familiar with both.
23 |
24 |
25 |
26 | ## Characteristic Functions
27 |
28 | If $\bV$ is a random $T$-vector, then the characteristic function $\varphi_{\bV}(s): \R^T\to \C$ of $\bV$ is defined as follows:
29 | $$
30 | \varphi_{\bV}(\bs) = \E[\exp(i\bs'\bV)].
31 | $$
32 | See @Durrett2019 (or your favorite probability textbook) regarding general properties of characteristic functions.
33 |
34 |
35 | For our purposes, we need the following three key properties:
36 |
37 | 1. The characteristic function uniquely determines the distribution.
38 |
39 | 2. Let $\bV, \bU$ be two independent random vectors. Then the characteristic function of their sum $\bV+\bU$ is equal to the product of characteristic function of $\bV$ and $\bU$:
40 | $$
41 | \begin{aligned}
42 | \varphi_{\bV+\bU}(\bs) & = \E\left[e^{i\bs'(\bV+\bU)}\right] = \E\left[e^{i\bs'\bV}e^{i\bs'\bU} \right]\\
43 | & = \E\left[e^{i\bs'\bV}\right]\E\left[e^{i\bs'\bU}\right]\\
44 | & = \varphi_{\bV}(\bs) \varphi_{\bU}(\bs).
45 | \end{aligned}
46 | $$ {#eq-linear-chf-independence}
47 |
48 | 1. Let $\bbeta$ be a random $p$-vector and $\bX$ a matrix. Then
49 | $$
50 | \begin{aligned}
51 | \varphi_{\bX\bbeta}(\bs) & = \E\left[\exp(i\bs'(\bX\bbeta)) \right] \\
52 | & = \E\left[\exp(i(\bX'\bs)'\bbeta) \right]\\
53 | & = \varphi_{\bbeta}(\bX'\bs)
54 | \end{aligned}
55 | $$ {#eq-linear-chf-product}
56 |
57 | Conditional characteristic functions may be defined analogously using conditional expectations in place of unconditional ones.
58 |
59 |
60 | ## Deconvolution
61 |
62 | Property ([-@eq-linear-chf-independence]) is particularly useful for statistical applications. It forms the basis of an estimation and identification approach known as *deconvolution*. This approach helps us identify the distribution of the coefficients $\bbeta_i$ in the next section.
63 |
64 | At heart, deconvolution is simple. Suppose that we observe a random vector $\bY$. $\bY$ is generated as a sum of two independent vector $\bV$ and $\bU$. The distribution of $\bU$ is known, while the distribution of $\bV$ is the object of interest.
65 |
66 | By property ([-@eq-linear-chf-independence]) the characteristic function of $\bY$ satisfies
67 | $$
68 | \varphi_{\bY}(\bs) = \varphi_{\bV}(\bs) \varphi_{\bU}(\bs).
69 | $$
70 | If $\varphi_{\bU}(\bs)\neq 0$, we can divide and rearrange to obtain
71 | $$
72 | \varphi_{\bV}(\bs) = \dfrac{\varphi_{\bY}(\bs) }{\varphi_{\bU}(\bs)}
73 | $$
74 | By assumption, the distributions of $\bY$ and $\bU$ are known, and thus $\varphi_{\bY}(\bs)$ and $\varphi_{\bU}(\bs)$ are identified. It follows that the full $\varphi_{\bV}(\cdot)$ is also identified provided $\varphi_{\bU}(\bs)\neq 0$ for all $\bs$ (or at least $\varphi_{\bU}(\bs)= 0$ for "not too many" $\bs$, see @Evdokimov2012). The distribution of $\bV$ is identified since characteristic functions uniquely identify distributions.
75 |
76 | This identification strategy is called deconvolution. The name of the procedure stems from the fact that the distribution of $\bY$ is the convolution of distributions of $\bV$ and $\bU$. Extracting the distribution of $\bV$ from the laws of $\bY, \bU$ may be viewed as an inverse operation.
77 |
78 | Observe that the argument is nonparametric, as it imposes no parametric form assumptions on the distributions involved.
79 |
80 | ::: {.callout-note appearance="simple" icon=false}
81 |
82 |
83 | It is possible to relax the assumption that the distribution of $\bU$ is known by using mulitple observations. We discuss one approach in the following section. Another approach uses a second observation of $\bY$ using a result called Kotlarski's lemma [@Kotlarski1967CharacterizingGammaNormal] (see @Evdokimov2012, @Lewbel2022 for extensions). Used with measurement error [see a review in @Schennach2016RecentAdvancesMeasurement], nonparametric panel data models [@Evdokimov2010], and identification of systems of simultaneous equations [@Lewbel2024IdentificationTriangularTwo].
84 |
85 | :::
86 |
87 |
88 | ---
89 |
90 | #### Next Section {.unnumbered}
91 |
92 | In the next section, we discuss identification of the distribution of the coefficients $\bbeta_i$ in model ([-@eq-lecture_model]) using the tools of this section.
--------------------------------------------------------------------------------
/src/index.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn unobserved heterogeneity-robust causal inference methods — heterogeneous coefficients, nonparametric models, and quantile and distribution regression"
3 | open-graph:
4 | description: "Learn unobserved heterogeneity-robust causal inference methods — heterogeneous coefficients, nonparametric models, and quantile and distribution regression"
5 | ---
6 |
7 |
8 |
9 | ## Course Information {.unnumbered}
10 |
11 |
12 |
13 | **Instructor:** Vladislav Morozov\
14 | **Email:** [morozov [at] uni-bonn.de](mailto:morozov@uni-bonn.de)\
15 | **Level:** Second-year Master’s and PhD students\
16 | **Course Website:** eCampus and this website\
17 | **DOI**: [](https://doi.org/10.5281/zenodo.15459848)
18 |
19 |
20 | ### Short Description
21 |
22 |
23 | Causal inference with unobserved heterogeneity is the core challenge of empirical economics. Whether due to heterogeneous treatment effects, omitted confounders, or measurement error, unobserved factors create confounding in the data and require developing appropriate methods. This course surveys some modern identification strategies and estimation methods designed to recover causal relationships from observational data, where treatments are endogenously selected and key determinants of outcomes are hidden.
24 |
25 | The course is structured into three main parts:
26 |
27 | 1. Linear models with heterogeneous coefficients.
28 | 2. Nonparametric models with unobserved heterogeneity.
29 | 3. Quantile and distributional treatment effects and quantile and distributional regression methods.
30 |
31 | We focus exclusively on observational cross-sectional and panel data, where unobserved heterogeneity cannot be ignored. The emphasis is on identification, rather than asymptotic theory or prediction.
32 |
33 | ### Course Materials
34 |
35 | **Textbook:** None. This course is based on lecture notes and background articles, which are listed in the references.\
36 | **Recommended Readings:** Please see the bibliography for a detailed reading list.
37 |
38 |
39 |
40 | ### About These Notes
41 |
42 | These lectures notes are based on a topics course I delivered at the University of Bonn.
43 | They are currently being uploaded in blocks as I organize and transform my notes. These notes are a work in progress. If you find any typos or have suggestions, please open an issue on GitHub using the link on the right!
44 |
45 | Current version (August 26, 2025): the first two blocks are fully complete. Latest addition: beyond stationarity, stayers, and average effect in nonparametric models with multidimensional unobserved heterogeneity.
46 |
47 | ### Learning Outcomes
48 |
49 | By the end of this course, students will be able to:
50 |
51 | - Identify and explain different sources of unobserved heterogeneity in economic data.
52 | - Apply econometric methods, such as heterogeneous coefficient models and quantile regression, to account for unobserved heterogeneity.
53 | - Evaluate the trade-offs and assumptions underlying different modeling approaches in empirical research.
54 |
55 | ### Syllabus
56 |
57 | **Block 0:** Introduction to Unobserved Heterogeneity
58 |
59 | - Definition and a brief classification
60 | - Examples in applied econometrics
61 | - Overview of key methodological challenges
62 |
63 | **Block 1:** Linear Models with Heterogeneous Coefficients
64 |
65 | - Linear models and their applicability
66 | - Heterogeneity in linear models
67 | - **Average effects:**
68 | - Issues with the within estimator under heterogeneity
69 | - Interlude: Dynamic panels with random intercepts
70 | - Issues with dynamic panel IV estimators under heterogeneity
71 | - Robust estimation with the mean group estimator
72 | - **Variance of coefficients**
73 | - **Distribution of coefficients:**
74 | - A primer on deconvolution
75 | - Identification of the distribution
76 | - Estimation with discrete covariates
77 |
78 | **Block 2:** Nonparametric Models with Unobserved Heterogeneity
79 |
80 | - A partial classification of nonparametric models with unobserved heterogeneity
81 | - Introduction to nonseparable models
82 | - Heterogeneity bias and issues with identification in cross-sectional settings
83 | - **Identification and estimation of average marginal effects in fully nonseparable models with panel data:**
84 | - Identification for stayers under strong stationarity
85 | - Extending identification results beyond stayers
86 | - Accommodating changes in the structural function
87 | - **Variance of marginal effects in nonseparable models**
88 |
89 | **Block 3:** Quantile and Distribution Treatment Effects:
90 |
91 | - **Background:** Quantiles and their properties
92 | - **Causal framework:** Quantile and distributional treatment effects and their interpretation
93 | - **Identification of QTEs and DTEs under unconfoundedness**
94 | - **Methods:**
95 | - *Quantile regression:*
96 | - General formulation
97 | - When is quantile regression correctly specified?
98 | - Quantile crossing and rearrangement techniques
99 | - *Distribution regression:*
100 | - General formulation
101 | - Rearrangement for distribution regression
102 | - **Estimation of QTEs and DTEs**
103 | - **What can quantile regressions tell us about nonseparable models?**
--------------------------------------------------------------------------------
/src/themes/mathjax.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/docs/site_libs/quarto-html/anchor.min.js:
--------------------------------------------------------------------------------
1 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
2 | //
3 | // AnchorJS - v5.0.0 - 2023-01-18
4 | // https://www.bryanbraun.com/anchorjs/
5 | // Copyright (c) 2023 Bryan Braun; Licensed MIT
6 | //
7 | // @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
8 | !function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(globalThis,function(){"use strict";return function(A){function u(A){A.icon=Object.prototype.hasOwnProperty.call(A,"icon")?A.icon:"",A.visible=Object.prototype.hasOwnProperty.call(A,"visible")?A.visible:"hover",A.placement=Object.prototype.hasOwnProperty.call(A,"placement")?A.placement:"right",A.ariaLabel=Object.prototype.hasOwnProperty.call(A,"ariaLabel")?A.ariaLabel:"Anchor",A.class=Object.prototype.hasOwnProperty.call(A,"class")?A.class:"",A.base=Object.prototype.hasOwnProperty.call(A,"base")?A.base:"",A.truncate=Object.prototype.hasOwnProperty.call(A,"truncate")?Math.floor(A.truncate):64,A.titleText=Object.prototype.hasOwnProperty.call(A,"titleText")?A.titleText:""}function d(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new TypeError("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],u(this.options),this.add=function(A){var e,t,o,i,n,s,a,r,l,c,h,p=[];if(u(this.options),0!==(e=d(A=A||"h2, h3, h4, h5, h6")).length){for(null===document.head.querySelector("style.anchorjs")&&((A=document.createElement("style")).className="anchorjs",A.appendChild(document.createTextNode("")),void 0===(h=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(A):document.head.insertBefore(A,h),A.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",A.sheet.cssRules.length),A.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",A.sheet.cssRules.length),A.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",A.sheet.cssRules.length),A.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',A.sheet.cssRules.length)),h=document.querySelectorAll("[id]"),t=[].map.call(h,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}});
9 | // @license-end
--------------------------------------------------------------------------------
/src/linear/linear-dynamic-panel-heterogeneity.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn why standard IV estimators do not estimate average coefficients in heterogeneous dynamic panel models: theory and an example. (Lecture notes)."
3 | open-graph:
4 | description: "Learn why standard IV estimators do not estimate average coefficients in heterogeneous dynamic panel models: theory and an example. (Lecture notes)."
5 | ---
6 |
7 | # Heterogeneous Coefficient Dynamic Panels and Instrumental Variable Estimators
8 |
9 | ::: {.callout-note appearance="simple" icon=false}
10 |
11 | ## Summary and Learning Outcomes
12 |
13 | This section shows that IV estimators (Anderson-Hsiao, Arellano-Bond, etc.) do not estimate average coefficients in heterogeneous dynamic panel models.
14 |
15 | By the end of this section, you should be able to:
16 |
17 | - Understand why lagged outcomes are not valid instruments if the coefficients are heterogeneous.
18 | - Describe the overall challenge of finding valid instruments under
19 | - Explain why dynamic models with heterogeneous coefficients introduce more challenges than static models.
20 |
21 | :::
22 |
23 |
24 |
25 |
26 | ## Introduction and Model
27 |
28 |
29 |
30 | As in the static case, it is not clear why slopes should be homogenous in dynamic models. If the coefficients are the same between units, all units have the same dynamics. Such an assumption seems rather unrealistic in most scenarios.
31 |
32 | As a consequence, we now consider heterogeneous dynamic models. In this section we again focus on a simple AR(1) model with no exogenous regressors. Specifically, we look at the following heterogeneous version of model ([-@eq-dynamic-interlude-dynamic-simple]):
33 | $$
34 | \begin{aligned}
35 | Y_{it} & = A_i + \lambda_i Y_{it-1} + Y_{it}, \\
36 | 0 & = \E[Y_{it}| \curl{Y_{is}}_{s\leq t}] .
37 | \end{aligned}
38 | $$ {#eq-dynamic-heterogeneity-model}
39 | This model allows for unit-specific dynamics, as the coefficients $\lambda_i$ can vary across $i$. The above model is also another instance of the general model ([-@eq-lecture_model]).
40 |
41 | As before, we are interested in the average coefficient $\E[\lambda_i]$.
42 |
43 |
44 | ## Endogeneity due to Heterogeneity
45 |
46 | Can the IV estimators of the previous section estimate $\E[\lambda_i]$ under model ([-@eq-dynamic-heterogeneity-model])? Under what conditions? To answer these questions, recall that the IV estimators of the previous section are based on taking first differences in the model and then using lagged values of $Y_{it}$ as instruments.
47 |
48 | ### Endogeneity in Differenced Heterogeneous Equation
49 | To replicate the procedure, we take differences in @eq-dynamic-heterogeneity-model and write the differenced model as
50 | $$
51 | \begin{aligned}
52 | \Delta Y_{it} & = \lambda \Delta Y_{it-1} + V_{it}, \\
53 | V_{it} & = \eta_i\Delta Y_{it-1} + \Delta U_{it} =0,
54 | \end{aligned}
55 | $$ {#eq-dynamic-heterogeneity-differenced}
56 | where we label
57 | $$
58 | \begin{aligned}
59 | \lambda & = \E[\lambda_i], \\
60 | \eta_i & = \lambda_i - \lambda.
61 | \end{aligned}
62 | $$
63 |
64 |
65 | It is easy to check that $\Delta Y_{it-1}$ is still endogenous because it contains $U_{it-1}$, which is correlated with the residual term. The same problematic term $\lambda \E[U_{it-1}^2]$ is present in $\E[V_{it}\Delta Y_{it-1}]$.
66 |
67 |
68 | ### Conditions for Instruments
69 |
70 | Can we find a suitable instrument for $\Delta Y_{it-1}$? Any valid instrument must satisfy relevance and exogeneity, which now take the following form:
71 | $$
72 | \begin{aligned}
73 | \E[Z_{it}\Delta Y_{it-1}] & \neq 0 ,\\
74 | \E[Z_{it} V_{it}] & = \E[ \eta_i Z_{it}\Delta Y_{it-1} ] + \E[Z_{it}U_{it}].
75 | \end{aligned}
76 | $$
77 | Note that a new $\E[ \eta_i Z_{it}\Delta Y_{it-1} ]$ term now appears in the exogeneity condition.
78 |
79 | ### Endogeneity of Lagged Outcomes
80 |
81 | Unlike in the homogeneous case, $Y_{it-2}$ is not a valid instrument anymore. We show that $Y_{it-2}$ is not exogenous in a simple case with the following assumptions:
82 |
83 | - $\abs{\lambda_i}<1$.
84 | - @eq-dynamic-heterogeneity-model can be extended infinitely far into the past by recursive substitution, so that
85 | $$
86 | Y_{it} = \dfrac{A_i}{1-\lambda_i} + \sum_{k=0}^{\infty} \lambda_i^k U_{it-k}.
87 | $$
88 | - $\curl{U_{it}}_t$ is an IID sequence with finite second moments, and $U_{it}$ is independent of $(A_i, \lambda_i)$.
89 |
90 | Under the above assumptions the first expectation in $\E[Y_{it-2} V_{it}]$ can be evaluated as follows:
91 | $$
92 | \begin{aligned}
93 | & \E[ \eta_i Y_{it-2}\Delta Y_{it-1} ]
94 | \\
95 | % & = \E\left[ \eta_i\left( \left(\sum_{k=0}^{\infty} \lambda_i^k u_{i,t-k-1}\right)\left(\sum_{k=0}^{\infty} \lambda_i^k u_{i,t-k-2}\right) - \left(\sum_{k=0}^{\infty} \lambda_i^k u_{i,t-k-2}\right)^2 \right) \right] \\
96 | & = \E\left[ \eta_i\left( \left(\sum_{k=0}^{\infty} \lambda_i^{1+2k} U_{i,t-k-2}^2 \right) - \left(\sum_{k=0}^{\infty} \lambda_i^{2k} U^2_{i,t-k-2}\right) \right)\right] \\
97 | & = \E[U_{it}^2] \E\left[\eta_i (1-\lambda_i) \sum_{k=0}^{\infty} \lambda_i^{2k} \right].
98 | \end{aligned}
99 | $$
100 | In general, there is no reason to expect the above expectation to be zero if $\eta_i$ is not zero. The second term involves a sum of even-order moments of $\eta_i$ (equivalently, $\lambda_i)$; such a sum would in general be non-zero.
101 |
102 | We conclude that
103 | $$
104 | \E[ \eta_i Y_{it-2}\Delta Y_{it-1} ]\neq 0,
105 | $$
106 | and so in general that
107 | $$
108 | \E[Y_{it-2} V_{it}]\neq 0.
109 | $$
110 | In other words, $Y_{it-2}$ *is not a valid instrument under the heterogeneous mode*l ([-@eq-dynamic-heterogeneity-model]). The same logic applies under more general assumptions and to higher-order lags of $Y_{it}$.
111 |
112 | More broadly, the problem of finding a valid instrument $Z_{it}$ for @eq-dynamic-heterogeneity-differenced appears intractable. The relevance condition requires that $Z_{it}$ be correlated with $\Delta Y_{it-1}$. As a consequence, it is likely that $Z_{it}$ is also correlated with $\eta_i \Delta Y_{it-1}$ (particularly since $\eta_i$ appears inside $\Delta Y_{it-1}$). However, it would then be the case that $\E[ \eta_i Z_{it}\Delta Y_{it-1} ]\neq 0$, and exogeneity would fail.
113 |
114 |
115 | We conclude that the IV estimators of the previous section do not consistently estimate $\E[\lambda_i]$, no matter how we choose the instruments, regardless the magnitude of $T$. Moreover, the results of @Pesaran1995 imply that the estimators may converge to any value (not exceeding 1), regardless of the underlying true values of $\E[\lambda_i]$.
116 |
117 |
118 |
119 |
120 | ### Aside: Regarding Restrictions on Coefficients
121 |
122 | There is a further point of contrast with the static case. In section [-@sec-linear-within] we noted that OLS can consistently estimate the average coefficients in a static model if the coefficients $\bbeta_i$ are (mean) independent of the regressors. We also derived a weaker condition for the consistency of the within estimator.
123 |
124 | However, no such independence assumptions are possible in a dynamic model. By construction, the coefficients $(A_i, \lambda_i)$ are directly embedded in the process for the regressor $Y_{it-1}$ through
125 | $$
126 | Y_{it-1} = A_i + \lambda_i Y_{it-2} + U_{it-2}.
127 | $$
128 | As a result, $Y_{it-1}$ and $(A_i, \lambda_i)$ cannot be (mean) independent by construction.
129 |
130 |
131 | ---
132 |
133 | #### Next Section {.unnumbered}
134 |
135 | In the next section, we study a simple estimator for $\E[\bbeta_i]$ that is robust both to coefficient heterogeneity and dynamics.
--------------------------------------------------------------------------------
/docs/site_libs/clipboard/clipboard.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * clipboard.js v2.0.11
3 | * https://clipboardjs.com/
4 | *
5 | * Licensed MIT © Zeno Rocha
6 | */
7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=10} } \sum_{i=1}^N \I\curl{\det(\bX_i'\bX_i)>0} \hat{\bbeta}_i.
148 | $$
149 | Every unit is checked to see if $\det(\bX_i'\bX_i)>0$. If it is, their $\hat{\bbeta}_i$ is computed and added to the average.
150 |
151 | What does this modified estimator estimate? For simplicity, suppose that $\E[\bU_i|\bX_i]=0$. Then, as $N\to\infty$, $\hat{\bbeta}_{MG}^+$ converges to the average for the units that have enough variation in their data (subject to the above warning regarding existence of moments):
152 | $$
153 | \hat{\bbeta}_{MG}^+ \to \E\left[\bbeta_i| \I\curl{\det(\bX_i'\bX_i)>0} \right].
154 | $$
155 | This limit may be viewed as an average treatment effect of the treated.
156 |
157 | ---
158 |
159 | #### Next Section {.unnumbered}
160 |
161 | In the next section, we move beyond $\E[\bbeta_i]$ and discuss identification of the variance of $\bbeta_i$.
--------------------------------------------------------------------------------
/src/nonparametric/nonparametric-cre.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn how index restrictions (Altonji-Matzkin) extend causal identification beyond stayers in panel data with unobserved heterogeneity (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Learn how index restrictions (Altonji-Matzkin) extend causal identification beyond stayers in panel data with unobserved heterogeneity (Lecture Notes)"
6 | ---
7 |
8 |
9 |
10 |
11 | # Beyond Stayers Using Index Restrictions {#sec-nonparametric-cre}
12 |
13 | ::: {.callout-note appearance="simple" icon=false}
14 |
15 | ## Summary and Learning Outcomes
16 |
17 | This section discusses how to extend identification beyond stayers using index restrictions.
18 |
19 | By the end of this section, you should be able to:
20 |
21 | - Broadly understand index (CRE) restrictions.
22 | - Use a one-dimensional index restriction to identify average marginal effects for non-stayers in model ([-@eq-nonparametric-model-full-nonsep]).
23 |
24 | :::
25 |
26 | ---
27 |
28 |
29 |
30 | ## Index Restrictions
31 |
32 | ### Regarding Stayers
33 |
34 | All the results of sections [-@sec-nonparametric-avg-id]-[-@sec-nonparametric-loc-scale] for the average marginal effect in models ([-@eq-nonparametric-model-full-nonsep]) and ([-@eq-nonparametric-loc-scale-model]) are limited to the subpopulation of stayers (units $X_{i1}=X_{i2}$).
35 |
36 | This restriction is a direct consequence of imposing no structure on how $(X_{i1}, X_{i2})$ relate to the unobserved components $(A_i, U_{it})$. Without restrictions, the dependence between treatments and unobservables may be arbitrarily complex, and @Cooprider2022 shows that no identification is possible for non-stayers if $(A_i, U_{it})$ is multidimensional.
37 |
38 | ### Index Restrictions
39 |
40 | To extend identification beyond stayers, we must restrict the dependence structure between treatments $(X_{i1}, X_{i2})$ and unobserved components $(A_i, U_{it})$. In this section, we look at a popular class of restrictions known as *index restrictions*. Broadly, index restrictions reduce the dimensionality of the dependence structure between the treatments and the unobserved components by assuming that $(A_i, U_{it})$ depends on $(X_{i1}, X_{i2})$ only through a low-dimensional index. They were introduced and studied by @Altonji2005 (see also @Bester2009 and @Liu2021).
41 |
42 |
43 | As a simple example, consider again model ([-@eq-nonparametric-model-full-nonsep]), with the potential outcome in period $t$ determined as
44 | $$
45 | Y_{it}^x = \phi(x, A_i, U_{it}), \quad t=1, 2.
46 | $$
47 |
48 | We now make an assumption about how $(X_{i1}, X_{i2})$ and $(A_i, U_{i1}, U_{i2})$ relate to each other. Specifically, we assume that the joint distribution of $(A_i, U_{i1}, U_{i2})$ only depends on $(X_{i1}, X_{i2})$ through the sum $X_{i1}+X_{i2}$:
49 | $$
50 | \begin{aligned}
51 | & f_{A_i, U_{i1}, U_{i2}|X_{i1}, X_{i2}}(a, u_1, u_2|x_1, x_2) \\
52 | & = f_{A_i, U_{i1}, U_{i2}|X_{i1}+ X_{i2}}(a, u_1, u_2|x_1+x_2).
53 | \end{aligned}
54 | $$ {#eq-nonparametric-index-2}
55 | In other words, the $X_{i1}+X_{i2}$ plays the role of an *index* or a sufficient statistic that captures all the relevant dimensions of the dependence structure between the treatments and the unobserved components. Economically, restriction ([-@eq-nonparametric-index-2]) arises when agents respond to aggregate exposure (see the example below).
56 |
57 | More generally, in a setting with $T$ time periods one may assume that the joint distribution of potential outcomes $(Y_{i1}^{x_1}, \dots, Y_{iT}^{x_T})$ only depends on the treatments $(X_{i1}, \dots, X_{iT})$ through $k] (-0.3,0) -- (4.3,0) node[right] {$x_{1}$};
119 | \draw[->] (0,-0.3) -- (0,4.8) node[above] {$x_{2}$};
120 |
121 | % Draw rectangle
122 | % \fill[pattern=north west lines] (1,1) rectangle (3,3);
123 |
124 | % Draw rectangle border
125 | \draw (1,1) rectangle (4,3);
126 |
127 | % Draw identified set
128 | \fill[pattern=north west lines, pattern color=gray!50] (1,1) -- (1,3) -- (3,3) -- (4,2) -- (4,1) -- cycle;
129 |
130 | % Draw lines to axes
131 | \draw[dashed] (1,1) -- (1,0) node[below] {min $x_1$};
132 | \draw[dashed] (1,1) -- (0,1) node[left] {min $x_2$};
133 | \draw[dashed] (4,3) -- (4,0) node[below] {max $x_1$};
134 | \draw[dashed] (4,3) -- (0,3) node[left] {max $x_2$};
135 |
136 | % Draw the stayer line
137 | \draw[dashed] (0, 0) -- (4, 4) node[right] {Stayers};
138 | \draw (1, 1) -- (3, 3) ;
139 | \end{tikzpicture}
140 | ```
141 |
142 | Summarizing, identification of the average marginal effect with an index restriction proceeds in two steps. First, we identify the average marginal effects for the subpopulation of stayers as before (the diagonal on the diagram). Second, we extrapolate these effects to subpopulations that share the same values of the index as the stayers.
143 |
144 | ### Estimation
145 |
146 | Index restrictions open some new possibilities for estimation. One now faces a choice between two possible approaches:
147 |
148 | - Using only stayer data.
149 | - Pooling data and performing estimation in the index space.
150 |
151 | In the first scenario, one construct estimators for the average effects for stayers using the data for stayers, exactly as in section ([-@sec-nonparametric-avg-est]). Then those estimators are automatically consistent and asymptotically normal estimators for average marginal effects in virtue of @eq-nonparametric-index-ex.
152 |
153 | Under the second scenario, one instead regresses $Y_{i2}-Y_{i1}$ directly on the index $X_{i1} + X_{i2}$. The key connection to data is obtained by combining equations ([-@eq-nonparametric-index-ex]) and ([-@eq-nonparametric-avg-est-me}]). This approach is naturally more efficient, as it relies on more data. However, a potential risk is that even the average marginal effects for stayers may be estimated inconsistently if the index restriction is
154 |
155 | ---
156 |
157 | #### Next Section {.unnumbered}
158 |
159 | In the next section, we go beyond average effects and discuss identification of variance in models with unrestricted unobserved heterogeneity.
--------------------------------------------------------------------------------
/src/linear/linear-introduction.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Explore linear models with heterogeneous coefficients, identification challenges, and econometric estimation techniques in this advanced lecture series."
3 | open-graph:
4 | description: "Explore linear models with heterogeneous coefficients, identification challenges, and econometric estimation techniques in this advanced lecture series."
5 | ---
6 |
7 |
8 |
9 | # Intro: Linear Models with Heterogeneous Coefficients {#sec-linear-intro}
10 |
11 | ::: {.callout-note appearance="simple" icon=false}
12 |
13 | ## Summary and Learning Outcomes
14 |
15 | This section introduces linear models with heterogeneous coefficients, associated identification challenges, and the model used in this block of the course.
16 |
17 | By the end of this section, you should be able to:
18 |
19 | - Recognize cases where heterogeneous coefficients arise.
20 | - Identify key challenges in estimating heterogeneous coefficients.
21 | - Discuss two strategies for identification under coefficient heterogeneity.
22 | :::
23 |
24 | ## Linearity and Heterogeneity
25 |
26 | ### Models with Homogeneous Slopes
27 |
28 | We begin our journey where standard textbooks and first-year foundational courses in econometrics leave off. The "standard" linear models considered in such courses often assume homogeneity in individual responses to covariates (e.g., @Hansen2022). A common cross-sectional specification of a linear potential outcomes model takes the form
29 |
30 | $$
31 | Y^{\bx}_i = \bbeta'\bx + U_{i},
32 | $$ {#eq-standard_linear}
33 | where $i=1, \dots, N$ indexes cross-sectional units, $\bx$ is some potential treatment value (possibly vector-valued), and $Y^{\bx}_i$ is the potential outcome of unit $i$ under $\bx$.
34 |
35 | In panel data, models often include unit-specific $(i)$ and time-specific $(t)$ intercepts while maintaining a common slope vector $\bbeta$:
36 |
37 | $$
38 | Y_{it}^{\bx} = A_i + \Gamma_t + \bbeta'\bx + U_{it},
39 | $$ {#eq-panel_linear}
40 | where $A_i$ and $\Gamma_t$ are not observed.
41 |
42 | ### Heterogeneity in Slopes. Examples
43 |
44 | However, modern economic theory rarely supports the assumption of homogeneous slopes $\bbeta$. Theoretical models recognize that observationally identical individuals, firms, and countries can respond differently to the same stimulus. In a linear model, this requires us to consider more flexible models with heterogeneous coefficients:
45 |
46 |
47 | 1. Cross-sectional model ([-@eq-standard_linear]) generalizes to
48 |
49 | $$
50 | Y_i^{\bx} = \bbeta_{i}'\bx + U_i.
51 | $$ {#eq-cross_sectional_hetero}
52 |
53 | 1. Panel data model ([-@eq-panel_linear]) generalizes to
54 |
55 | $$
56 | Y_{it}^{\bx} = \bbeta_{it}'\bx + U_{it}.
57 | $$ {#eq-panel_hetero}
58 |
59 |
60 | Such models are worth studying, as they naturally arise in a variety of contexts:
61 |
62 |
63 | - **Structural models with parametric restrictions:** Certain parametric restrictions yield linear relationships in coefficients. An example is given by firm-level Cobb-Douglas production functions where firm-specific productivity differences induce heterogeneous coefficients (@Combes2012b; @Sury2011).
64 |
65 | - **Binary covariates and interaction terms**: if all covariates are binary and all interactions are included, a linear model encodes all treatment effects without loss of generality (e.g., @Wooldridge2005).
66 |
67 | - **Log-linearized models:** Nonlinear models may be approximated by linear models around a steady-state. For example, @Heckman1998 demonstrate how the nonlinear @Card2001 education model simplifies to a heterogeneous linear specification after linearization.
68 |
69 |
70 | ::: {.callout-note appearance="simple" icon=false}
71 |
72 | In this block, we use notation $\bbeta_i$ and $\bbeta_{it}$ for the heterogeneous coefficients. This convention is in line with the well-established literature and models ([-@eq-standard_linear]-[-@eq-panel_linear]). However, note that this notation can be connected to the general model in @eq-intro-potential-outcomes as
73 | $$
74 | Y_i^{\bx} = \phi(\bx, A_i) = \beta(A_i)'\bx + U_i,
75 | $$
76 | where $U_i$ is a component of the general vector $A_i$ of unobserved components and $\beta(\cdot)$ is some vector-valued function.
77 |
78 | :::
79 |
80 | ## What Do We Care About? Identification
81 |
82 | ### Parameters of Interest
83 |
84 | The parameters of interest in models ([-@eq-standard_linear]) and ([-@eq-panel_linear]) are straightforward. The common slope $\bbeta$ simultaneously plays the role of both the average treatment effect and all the individual treatment effects. Estimating $\bbeta$ is enough for policy analysis.
85 |
86 | The situation is more complicated for the more general models ([-@eq-cross_sectional_hetero]) and ([-@eq-panel_hetero]). Consider model ([-@eq-cross_sectional_hetero]). Parameters of interest now include:
87 |
88 | - Individual effects: the coefficient vector $\bbeta_i$ for specific units.
89 | - Moments of the distribution: the average coefficient vector ($\E[\bbeta_i]$), variance $\var(\bbeta_i)$, and higher-order moments.
90 | - Distributional properties: The full distribution of $\bbeta_i$ or its quantiles, or just the tail behavior of the distribution.
91 |
92 | Similar objects are relevant for the panel model in
93 | @eq-panel_hetero.
94 |
95 | ### Regarding Identification
96 |
97 | Unfortunately, greater flexibility in terms of parameters also leads to greater challenges in terms of identification. Models ([-@eq-cross_sectional_hetero]) and
98 | ([-@eq-panel_hetero]) are too general to permit identification of the above parameters without further assumptions. This failure of identification is driven by the combination of the following two issues:
99 |
100 | 1. Limited observations per coefficient vector. Since each unit $i$ (or pair $(i,t)$) provides only indirect information through the realized $\bbeta_i'\bX_i$ (or $\bbeta_{it}'\bX_{it}$), there is effectively less than one observation per $\bbeta_i$.
101 | 2. Unrestricted dependence between coefficients and covariates. Without assumptions on the relationship between $\bbeta_i$ and $\bX_i$, one can generally not separate the influence of the two components on linear indices of the form $\bbeta_i'\bX_i$.
102 |
103 | Identification is typically achieved by mitigating one of these challenges. Common strategies to address these challenges include:
104 |
105 | - Increasing the effective number of observations per coefficient vector by restricting coefficient variation.
106 | - In panel settings, assuming time-invariant coefficients simplifies
107 | @eq-panel_hetero to:
108 |
109 | $$
110 | Y_{it}^{\bx} = \bbeta_i'\bx + U_{it}.
111 | $$ {#eq-time_invariant}
112 |
113 | - Alternative approaches assume a finite number of latent groups, each with its own coefficient vector, yielding the grouped structure:
114 |
115 | $$
116 | Y_{it}^{\bx} = \bbeta_{g_i, t}'\bx + U_{it}.
117 | $$ {#eq-grouped_model}
118 |
119 | This model in discussed in @Bonhomme2015, @Bester2016 (see also @Bonhomme2022DiscretizingUnobservedHeterogeneity).
120 |
121 | - Restricting dependence between $\bbeta_i$ and the realized treatment $\bX_i$. For example, there is a strand of literature that assumes that $\bbeta_i$ and $\bX_i$ are independent [@Beran1996; @Hoderlein2010].
122 |
123 | ## Model of This Block
124 |
125 | This block primarily focuses on the first strategy. Specifically, we will consider a version of model ([-@eq-panel_hetero]) with *time-invariant* heterogeneous coefficients:
126 |
127 | $$
128 | Y_{it}^{\bx} = \bbeta_i'\bx + U_{it}.
129 | $$ {#eq-lecture_model}
130 |
131 | The time-invariant coefficients $\bbeta_i$ play the role of $A_i$ in @eq-intro-potential-outcomes.
132 |
133 | The observed realized values $(Y_i, \bX_{it})$ satisfy
134 | $$
135 | Y_{it}= Y_{ii}^{\bX_{it}} = \bbeta_i'\bX_{it} + U_{it}.
136 | $$
137 |
138 | We impose *no* restrictions on the dependence between $\bbeta_i$ and $\bX_{it}$. As noted in the introduction, it is important to allow for such dependence outside of experimental data — economic agents can select their covariates $\bX_{it}$ based on knowledge of their own $\bbeta_i$. Since parametrizing this dependence is non-trivial, we impose no assumptions on it.
139 |
140 | We will also generally focus on the case where the number $N$ of units is large, while the number $T$ of observations per unit is fixed and not necessarily large.
141 |
142 | ::: {.callout-note appearance="simple" icon=false}
143 |
144 | In the panel data literature, approaches that do not restrict the dependence between the unobserved and the observed components are called "fixed effects".
145 | :::
146 |
147 |
148 |
149 | Note that model ([-@eq-lecture_model]) includes a particular special case — the random intercept model (confusingly also called the "fixed effects model"). The random intercept model imposes homogeneity on all parameters except the intercept term. In the one-way case, the model takes the form:
150 |
151 | $$
152 | Y_{it}^{\bx} = A_i + \bbeta'\bx + U_{it}.
153 | $$ {#eq-random_intercept}
154 | Model ([-@eq-random_intercept]) is one of the oldest ways of including unobserved heterogeneity in linear models and goes back at least to @Mundlak1961EmpiricalProductionFunction.
155 |
156 | ## Plan for This Block
157 |
158 | In this block, we will focus on model ([-@eq-lecture_model]) and consider identification of the above parameters of interest. Specifically,
159 |
160 | 1. **Average coefficient vector $\E[\bbeta_i]$**:
161 | - First, we demonstrate that standard estimators for the random intercept model ([-@eq-random_intercept]) are generally inconsistent for $\E[\bbeta_i]$ in the more general model ([-@eq-lecture_model]).
162 | - Next, we introduce a mean group estimator robust to heterogeneity and dynamics.
163 |
164 | 2. **Variance $\var(\bbeta_i)$**: we show how one can identify and estimate $\var(\bbeta_i)$ by imposing structure on the temporal dependence in the residuals $U_{it}$.
165 |
166 | 3. **Identifying the Full Distribution of $\bbeta_i$:** we show how one can obtain the distribution of $\bbeta_i$ with a deconvolution argument.
167 |
168 |
169 | Knowing these features of the distribution of $\bbeta_i$ allows one to compute the corresponding features of the treatment effects of changing from some treatment value $\bx_1$ to $\bx_2$ — these treatment effects are given by $\bbeta_1(\bx_2-\bx_1)$.
170 |
171 | ---
172 |
173 | #### Next Section {.unnumbered}
174 |
175 | Next, we show that the within (fixed effects) estimator recovers $\E[\bbeta_i]$ only under restrictive assumptions.
--------------------------------------------------------------------------------
/src/nonparametric/nonparametric-location-scale.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn to identify average effects in a nonparametric continuous difference-in-differences model with infinite-dimensional heterogeneity (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Learn to identify average effects in a nonparametric continuous difference-in-differences model with infinite-dimensional heterogeneity (Lecture Notes)"
6 | ---
7 |
8 |
9 | # Relaxing Stationarity with Nonparametric Time Effects {#sec-nonparametric-loc-scale}
10 |
11 | ::: {.callout-note appearance="simple" icon=false}
12 |
13 | ## Summary and Learning Outcomes
14 |
15 | This section shows how to extend identification of marginal effects to a model with nonparametric location-scale time effects.
16 |
17 | By the end of this section, you should be able to:
18 |
19 | - Identify the average marginal effects for stayers under a model with location-scale effects and potentially infinite-dimensional heterogeneity.
20 | - Propose estimators for the average marginal effects.
21 | - Draw parallels between the models of this block and event study/difference-in-differences approaches.
22 |
23 | :::
24 |
25 | ---
26 |
27 |
28 |
29 | ## A More General Model
30 |
31 | ### The Drawbacks of Stationarity
32 |
33 | The stationarity assumption ([-@eq-nonparam-stationarity-u]) is crucial to the identification argument of section ([-@sec-nonparametric-avg-id]). It allows us to connect the average change in the realized outcomes $Y_{it}$ to finite differences of the structural function $\phi(\cdot, \cdot, \cdot)$. In turn, this connection leads to our key identification result for average marginal effects:
34 | $$
35 | \begin{aligned}
36 | & \E[\partial^x Y_{it}^{x}|X_{i1} = X_{i2} = x]\\
37 | & = \E[\partial_x\phi (x, A_i, U_{it})|X_{i1}=X_{i2}=x] \\
38 | & = \partial_{x_2} \E\left[Y_{i2}- Y_{i1}|X_{i1}=x_1, X_{i2} = x_2 \right]\Big|_{(x_1, x_2)=(x, x)}.
39 | \end{aligned}
40 | $$
41 |
42 | While useful for identification, assumption ([-@eq-nonparam-stationarity-u]) imposes that the function $\phi(\cdot, \cdot, \cdot)$ *cannot* change across periods. Such time invariance may be reasonable if consecutive observations are not separated by long periods of time. In contrast, it may be untenable if the interval between observations is large or there are meaningful changes in the overall "context" in which the units operate.
43 |
44 |
45 | ### Including Location-Scale Time Effects
46 |
47 | However, it is possible to accommodate some changes over time while preserving our identification results. In particular, it is possible to accommodate flexible location-scale effects that depend on the observables nonparametrically.
48 |
49 | Specifically, we now consider the following extension of the model ([-@eq-nonparametric-model-full-nonsep]), discussed by @Chernozhukov2015:
50 | $$
51 | \begin{aligned}
52 | Y_{i1}^{x_1} &= \phi(x_1, A_i, U_{it}),\\
53 | Y_{i2}^{x_2} & = \mu(x_2) + \sigma(x_2) \phi(x_2, A_i, U_{i2}).
54 | \end{aligned}
55 | $$ {#eq-nonparametric-loc-scale-model}
56 | The functions $\mu(\cdot)$ and $\sigma(\cdot)$ may be viewed as flexible nonparametric *location-scale* time effects. We assume throughout that $\sigma(\cdot)\neq 0$.
57 |
58 | Although we allow the function $\phi$ to change, we retain the conditional stationarity assumption ([-@eq-nonparam-stationarity-u]):
59 | $$
60 | U_{i1}|(X_{i1}, X_{i2}, A_i) \overset{d}{=} U_{i2}|(X_{i1}, X_{i2}, A_i).
61 | $$
62 |
63 | The key objects of interest are the average marginal effects of $x$ for stayers in periods $t=1$:
64 | $$
65 | \begin{aligned}
66 | \E[\partial_x Y_{i1}^x|X_{i1}=X_{i2} =x] & = \E\left[ \partial_x \phi(x, A_{i}, U_{it}) |X_{i1}=X_{i2} =x\right],
67 | \end{aligned}$$ {#eq-nonparametric-loc-scale-t1}
68 | and $t=2$:
69 | $$
70 | \begin{aligned}
71 | & \E[\partial_x Y_{i2}^x|X_{i1}=X_{i2} =x]\\
72 | & = \E\left[ \partial_x \left(\mu(x) + \sigma(x)\phi(x, A_{i}, U_{it}) \right)|X_{i1}=X_{i2} =x\right]
73 | \end{aligned}
74 | $$ {#eq-nonparametric-loc-scale-t2}
75 | Observe that there is now time variation in the average effects, unlike under model ([-@eq-nonparam-stationarity-u]).
76 |
77 | ### Discussion
78 |
79 | Model ([-@eq-nonparametric-loc-scale-model]) preserves the two attractive features of the simpler model ([-@eq-nonparametric-model-full-nonsep]):
80 |
81 | 1. $(A_i, U_{it})$ can take any form, have any dimension, and affect the potential outcomes arbitrarily.
82 | 2. There are no restrictions on the dependence between the treatment $X_{it}$ and potential outcomes.
83 |
84 | Intuitively, the connection between models ([-@eq-nonparametric-model-full-nonsep]) and ([-@eq-nonparametric-loc-scale-model]) mirrors familiar binary-treatment settings. The time-invariant model ([-@eq-nonparametric-model-full-nonsep]) corresponds to a nonparametric event-study design with a continuous treatment (see chapter 17 of @Huntington-Klein2025EffectIntroductionResearch regarding event studies with no trends in the outcome). The location-scale extension ([-@eq-nonparametric-loc-scale-model]), by contrast, generalizes this to a nonparametric difference-in-differences framework, accommodating nonparametric trends in the outcomes.
85 |
86 | ## Identification
87 |
88 | We now turn to identification of the average marginal effects ([-@eq-nonparametric-loc-scale-t1]) and ([-@eq-nonparametric-loc-scale-t2]). Identification proceeds in three steps:
89 |
90 | 1. Identifying the scale function $\sigma(\cdot)$.
91 | 2. Identifying the location function $\mu(\cdot)$.
92 | 3. Identifying the average value $\E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]$ of $\phi$ and the average value of its derivative $\E[\partial_x \phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]$.
93 |
94 | Together, these components are sufficient to identify both ([-@eq-nonparametric-loc-scale-t1]) and ([-@eq-nonparametric-loc-scale-t2]), since the second period effect can be represented as
95 | $$
96 | \begin{aligned}
97 | & \E\left[ \partial_x \left(\mu(x) + \sigma(x)\phi(x, A_{i}, U_{it}) \right)|X_{i1}=X_{i2} =x\right] \\
98 | & = \partial_x \mu(x) \\
99 | & \quad + \sigma(x) \E[\partial_x \phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x] \\
100 | & \quad + \left(\partial_x \sigma(x)\right) \E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]
101 | \end{aligned}
102 | $$
103 |
104 | ### Scale Effect
105 |
106 |
107 | We begin by identifying the scale function $\sigma(\cdot)$. The scale is directly connect to the variance of the second period realized outcome for the subpopulation of stayers as
108 | $$
109 | \begin{aligned}
110 | & \var(Y_{i2}|X_{i1}=X_{i2}=x) \\
111 | & = \sigma^2(x)\var(\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x).
112 | \end{aligned}
113 | $$
114 | As before, the notation $U_{it}$ under $\phi$ emphasizes stationarity of $U_{it}$.
115 |
116 |
117 | At the same time, the conditional variance of $\phi(x, A_i, U_{it})$ for stayers is directly obtained from the variance of the first period realized outcome:
118 | $$
119 | \begin{aligned}
120 | & \var\left(Y_{i1}|X_{i1}=X_{i2}=x \right) \\
121 | & = \var(\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x).
122 | \end{aligned}
123 | $$
124 |
125 | Combining the two expression yields an explicit formula for the scale effect, provided $\var\left(Y_{i1}|X_{i1}=X_{i2}=x \right)\neq 0$:
126 | $$
127 | \sigma^2(x) = \dfrac{ \var(Y_{i2}|X_{i1}=X_{i2}=x) }{ \var(Y_{i1}|X_{i1}=X_{i2}=x) }.
128 | $$
129 |
130 | ### Location Effect and Average of $\phi$
131 |
132 | To obtain the location effect $\mu(\cdot)$ and $\E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]$, we instead look at the averages of the realized outcomes for stayers. By model ([-@eq-nonparametric-loc-scale-model]) it holds that
133 | $$
134 | \begin{aligned}
135 | \E[Y_{i1}|X_{i1}=X_{i2}=x] & = \E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x], \\
136 | \E[Y_{i2}|X_{i1}=X_{i2}=x] & = \mu(x) + \sigma(x)\E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x].
137 | \end{aligned}
138 | $$
139 | Identification for $\E[\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]$ is thus immediate. To obtain $\mu(\cdot)$, we rearrange and multiply the first line by $\sigma(x)$:
140 | $$
141 | \begin{aligned}
142 | \mu(x) & = \E[Y_{i2}|X_{i1}=X_{i2}=x] - \sigma(x)\E[Y_{i1}|X_{i1}=X_{i2}=x] \\
143 | & = \E[Y_{i2}|X_{i1}=X_{i2}=x] \\
144 | & \quad - \sqrt{\dfrac{ \var(Y_{i1}|X_{i1}=X_{i2}=x) }{ \var(Y_{i1}|X_{i1}=X_{i2}=x) }}\E[Y_{i2}|X_{i1}=X_{i2}=x] .
145 | \end{aligned}
146 | $$
147 |
148 |
149 | ### Average Derivative of $\phi$
150 |
151 | Finally, having identified $\mu(\cdot)$ and $\sigma(\cdot)$, we can now proceed to identify $\E[\partial_x \phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]$. To do so, we define new synthetic outcomes that eliminate the location-scale effects, reducing the problem to the stationary case ([-@eq-nonparametric-model-full-nonsep]):
152 | $$
153 | \begin{aligned}
154 | Z_{i1} & = Y_{i1}, \\
155 | Z_{i2} & = \dfrac{Y_{i2}- \mu(X_{i2})}{\sigma(X_{i2})}.
156 | \end{aligned}
157 | $$
158 |
159 | The new variables $(Z_{i1}, Z_{it})$ satisfy two key properties:
160 |
161 | - The distribution of $(Z_{i1}, Z_{i2}, X_{i1}, X_{i2})$ is identified.
162 | - The variables follow
163 | $$
164 | Z_{it} = \phi(X_{it}, A_i, U_{it}).
165 | $$
166 |
167 | In other words, $(Z_{i1}, Z_{i2})$ follow model ([-@eq-nonparametric-model-full-nonsep]).
168 |
169 | By applying the results of sections [-@sec-nonparametric-avg-id]-[-@sec-nonparametric-avg-est] we conclude that
170 | $$
171 | \begin{aligned}
172 | & \E[\partial_x\phi (x, A_i, U_{it})|X_{i1}=X_{i2}=x] \\
173 | & = \partial_{x_2} \E\left[ Z_{i2}- Z_{i1}|X_{i1}=x_1, X_{i2} = x_2 \right]\Big|_{(x_1, x_2)=(x, x)}.
174 | \end{aligned}
175 | $$
176 |
177 | Combining the above results together yields overall identification for average marginal effects ([-@eq-nonparametric-loc-scale-t1]) and ([-@eq-nonparametric-loc-scale-t2]).
178 |
179 |
180 | ## Estimation
181 |
182 | Estimation of ([-@eq-nonparametric-loc-scale-t1]) and ([-@eq-nonparametric-loc-scale-t2]) is now straightforward. As in section [-@sec-nonparametric-avg-est], we have shown that the objects of interest can be expressed in terms of explicit functions of conditional expectations of $(Y_{i1}, Y_{i2})$ given $(X_{i1}, X_{i2})$. This expectations can be replaced with local polynomial estimators, following the logic of section [-@sec-nonparametric-avg-est]. The resulting estimator for the average marginal effects of interest will be consistent and asymptotically normal by the delta method, as local polynomial estimators are consistent and jointly asymptotically normal.
183 |
184 |
185 | For inference, the simplest approach is to use the bootstrap rather than use the expression for the variance implied by the delta method. Accordingly, the simplest way to conduct valid inference is by using bootstrap and recomputing all conditional expectations. See @Chernozhukov2015 regarding bootstrap inference, and also alternative estimation using global methods (as opposed to the local polynomial approach).
186 |
187 | ---
188 |
189 | #### Next Section {.unnumbered}
190 |
191 | In the next section, we extend our identification results for average marginal effects beyond the population of stayers using restrictions on the dependence between $(A_i, U_{it})$ and $X_{it}$.
--------------------------------------------------------------------------------
/docs/site_libs/quarto-nav/quarto-nav.js:
--------------------------------------------------------------------------------
1 | const headroomChanged = new CustomEvent("quarto-hrChanged", {
2 | detail: {},
3 | bubbles: true,
4 | cancelable: false,
5 | composed: false,
6 | });
7 |
8 | const announceDismiss = () => {
9 | const annEl = window.document.getElementById("quarto-announcement");
10 | if (annEl) {
11 | annEl.remove();
12 |
13 | const annId = annEl.getAttribute("data-announcement-id");
14 | window.localStorage.setItem(`quarto-announce-${annId}`, "true");
15 | }
16 | };
17 |
18 | const announceRegister = () => {
19 | const annEl = window.document.getElementById("quarto-announcement");
20 | if (annEl) {
21 | const annId = annEl.getAttribute("data-announcement-id");
22 | const isDismissed =
23 | window.localStorage.getItem(`quarto-announce-${annId}`) || false;
24 | if (isDismissed) {
25 | announceDismiss();
26 | return;
27 | } else {
28 | annEl.classList.remove("hidden");
29 | }
30 |
31 | const actionEl = annEl.querySelector(".quarto-announcement-action");
32 | if (actionEl) {
33 | actionEl.addEventListener("click", function (e) {
34 | e.preventDefault();
35 | // Hide the bar immediately
36 | announceDismiss();
37 | });
38 | }
39 | }
40 | };
41 |
42 | window.document.addEventListener("DOMContentLoaded", function () {
43 | let init = false;
44 |
45 | announceRegister();
46 |
47 | // Manage the back to top button, if one is present.
48 | let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;
49 | const scrollDownBuffer = 5;
50 | const scrollUpBuffer = 35;
51 | const btn = document.getElementById("quarto-back-to-top");
52 | const hideBackToTop = () => {
53 | btn.style.display = "none";
54 | };
55 | const showBackToTop = () => {
56 | btn.style.display = "inline-block";
57 | };
58 | if (btn) {
59 | window.document.addEventListener(
60 | "scroll",
61 | function () {
62 | const currentScrollTop =
63 | window.pageYOffset || document.documentElement.scrollTop;
64 |
65 | // Shows and hides the button 'intelligently' as the user scrolls
66 | if (currentScrollTop - scrollDownBuffer > lastScrollTop) {
67 | hideBackToTop();
68 | lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
69 | } else if (currentScrollTop < lastScrollTop - scrollUpBuffer) {
70 | showBackToTop();
71 | lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop;
72 | }
73 |
74 | // Show the button at the bottom, hides it at the top
75 | if (currentScrollTop <= 0) {
76 | hideBackToTop();
77 | } else if (
78 | window.innerHeight + currentScrollTop >=
79 | document.body.offsetHeight
80 | ) {
81 | showBackToTop();
82 | }
83 | },
84 | false
85 | );
86 | }
87 |
88 | function throttle(func, wait) {
89 | var timeout;
90 | return function () {
91 | const context = this;
92 | const args = arguments;
93 | const later = function () {
94 | clearTimeout(timeout);
95 | timeout = null;
96 | func.apply(context, args);
97 | };
98 |
99 | if (!timeout) {
100 | timeout = setTimeout(later, wait);
101 | }
102 | };
103 | }
104 |
105 | function headerOffset() {
106 | // Set an offset if there is are fixed top navbar
107 | const headerEl = window.document.querySelector("header.fixed-top");
108 | if (headerEl) {
109 | return headerEl.clientHeight;
110 | } else {
111 | return 0;
112 | }
113 | }
114 |
115 | function footerOffset() {
116 | const footerEl = window.document.querySelector("footer.footer");
117 | if (footerEl) {
118 | return footerEl.clientHeight;
119 | } else {
120 | return 0;
121 | }
122 | }
123 |
124 | function dashboardOffset() {
125 | const dashboardNavEl = window.document.getElementById(
126 | "quarto-dashboard-header"
127 | );
128 | if (dashboardNavEl !== null) {
129 | return dashboardNavEl.clientHeight;
130 | } else {
131 | return 0;
132 | }
133 | }
134 |
135 | function updateDocumentOffsetWithoutAnimation() {
136 | updateDocumentOffset(false);
137 | }
138 |
139 | function updateDocumentOffset(animated) {
140 | // set body offset
141 | const topOffset = headerOffset();
142 | const bodyOffset = topOffset + footerOffset() + dashboardOffset();
143 | const bodyEl = window.document.body;
144 | bodyEl.setAttribute("data-bs-offset", topOffset);
145 | bodyEl.style.paddingTop = topOffset + "px";
146 |
147 | // deal with sidebar offsets
148 | const sidebars = window.document.querySelectorAll(
149 | ".sidebar, .headroom-target"
150 | );
151 | sidebars.forEach((sidebar) => {
152 | if (!animated) {
153 | sidebar.classList.add("notransition");
154 | // Remove the no transition class after the animation has time to complete
155 | setTimeout(function () {
156 | sidebar.classList.remove("notransition");
157 | }, 201);
158 | }
159 |
160 | if (window.Headroom && sidebar.classList.contains("sidebar-unpinned")) {
161 | sidebar.style.top = "0";
162 | sidebar.style.maxHeight = "100vh";
163 | } else {
164 | sidebar.style.top = topOffset + "px";
165 | sidebar.style.maxHeight = "calc(100vh - " + topOffset + "px)";
166 | }
167 | });
168 |
169 | // allow space for footer
170 | const mainContainer = window.document.querySelector(".quarto-container");
171 | if (mainContainer) {
172 | mainContainer.style.minHeight = "calc(100vh - " + bodyOffset + "px)";
173 | }
174 |
175 | // link offset
176 | let linkStyle = window.document.querySelector("#quarto-target-style");
177 | if (!linkStyle) {
178 | linkStyle = window.document.createElement("style");
179 | linkStyle.setAttribute("id", "quarto-target-style");
180 | window.document.head.appendChild(linkStyle);
181 | }
182 | while (linkStyle.firstChild) {
183 | linkStyle.removeChild(linkStyle.firstChild);
184 | }
185 | if (topOffset > 0) {
186 | linkStyle.appendChild(
187 | window.document.createTextNode(`
188 | section:target::before {
189 | content: "";
190 | display: block;
191 | height: ${topOffset}px;
192 | margin: -${topOffset}px 0 0;
193 | }`)
194 | );
195 | }
196 | if (init) {
197 | window.dispatchEvent(headroomChanged);
198 | }
199 | init = true;
200 | }
201 |
202 | // initialize headroom
203 | var header = window.document.querySelector("#quarto-header");
204 | if (header && window.Headroom) {
205 | const headroom = new window.Headroom(header, {
206 | tolerance: 5,
207 | onPin: function () {
208 | const sidebars = window.document.querySelectorAll(
209 | ".sidebar, .headroom-target"
210 | );
211 | sidebars.forEach((sidebar) => {
212 | sidebar.classList.remove("sidebar-unpinned");
213 | });
214 | updateDocumentOffset();
215 | },
216 | onUnpin: function () {
217 | const sidebars = window.document.querySelectorAll(
218 | ".sidebar, .headroom-target"
219 | );
220 | sidebars.forEach((sidebar) => {
221 | sidebar.classList.add("sidebar-unpinned");
222 | });
223 | updateDocumentOffset();
224 | },
225 | });
226 | headroom.init();
227 |
228 | let frozen = false;
229 | window.quartoToggleHeadroom = function () {
230 | if (frozen) {
231 | headroom.unfreeze();
232 | frozen = false;
233 | } else {
234 | headroom.freeze();
235 | frozen = true;
236 | }
237 | };
238 | }
239 |
240 | window.addEventListener(
241 | "hashchange",
242 | function (e) {
243 | if (
244 | getComputedStyle(document.documentElement).scrollBehavior !== "smooth"
245 | ) {
246 | window.scrollTo(0, window.pageYOffset - headerOffset());
247 | }
248 | },
249 | false
250 | );
251 |
252 | // Observe size changed for the header
253 | const headerEl = window.document.querySelector("header.fixed-top");
254 | if (headerEl && window.ResizeObserver) {
255 | const observer = new window.ResizeObserver(() => {
256 | setTimeout(updateDocumentOffsetWithoutAnimation, 0);
257 | });
258 | observer.observe(headerEl, {
259 | attributes: true,
260 | childList: true,
261 | characterData: true,
262 | });
263 | } else {
264 | window.addEventListener(
265 | "resize",
266 | throttle(updateDocumentOffsetWithoutAnimation, 50)
267 | );
268 | }
269 | setTimeout(updateDocumentOffsetWithoutAnimation, 250);
270 |
271 | // fixup index.html links if we aren't on the filesystem
272 | if (window.location.protocol !== "file:") {
273 | const links = window.document.querySelectorAll("a");
274 | for (let i = 0; i < links.length; i++) {
275 | if (links[i].href) {
276 | links[i].dataset.originalHref = links[i].href;
277 | links[i].href = links[i].href.replace(/\/index\.html/, "/");
278 | }
279 | }
280 |
281 | // Fixup any sharing links that require urls
282 | // Append url to any sharing urls
283 | const sharingLinks = window.document.querySelectorAll(
284 | "a.sidebar-tools-main-item, a.quarto-navigation-tool, a.quarto-navbar-tools, a.quarto-navbar-tools-item"
285 | );
286 | for (let i = 0; i < sharingLinks.length; i++) {
287 | const sharingLink = sharingLinks[i];
288 | const href = sharingLink.getAttribute("href");
289 | if (href) {
290 | sharingLink.setAttribute(
291 | "href",
292 | href.replace("|url|", window.location.href)
293 | );
294 | }
295 | }
296 |
297 | // Scroll the active navigation item into view, if necessary
298 | const navSidebar = window.document.querySelector("nav#quarto-sidebar");
299 | if (navSidebar) {
300 | // Find the active item
301 | const activeItem = navSidebar.querySelector("li.sidebar-item a.active");
302 | if (activeItem) {
303 | // Wait for the scroll height and height to resolve by observing size changes on the
304 | // nav element that is scrollable
305 | const resizeObserver = new ResizeObserver((_entries) => {
306 | // The bottom of the element
307 | const elBottom = activeItem.offsetTop;
308 | const viewBottom = navSidebar.scrollTop + navSidebar.clientHeight;
309 |
310 | // The element height and scroll height are the same, then we are still loading
311 | if (viewBottom !== navSidebar.scrollHeight) {
312 | // Determine if the item isn't visible and scroll to it
313 | if (elBottom >= viewBottom) {
314 | navSidebar.scrollTop = elBottom;
315 | }
316 |
317 | // stop observing now since we've completed the scroll
318 | resizeObserver.unobserve(navSidebar);
319 | }
320 | });
321 | resizeObserver.observe(navSidebar);
322 | }
323 | }
324 | }
325 | });
326 |
--------------------------------------------------------------------------------
/src/nonparametric/nonparametric-average-estimation.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn how to estimate average effects in nonparametric models with infinite-dimensional heterogeneity using local polynomial regression (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Learn how to estimate average effects in nonparametric models with infinite-dimensional heterogeneity using local polynomial regression (Lecture Notes)"
6 | ---
7 |
8 |
9 | # Nonparametric Estimation of Average Effects {#sec-nonparametric-avg-est}
10 |
11 | ::: {.callout-note appearance="simple" icon=false}
12 |
13 | ## Summary and Learning Outcomes
14 |
15 | This section provides an explicit expression for the average marginal effect and discusses its estimation using local polynomial regression.
16 |
17 | By the end of this section, you should be able to:
18 |
19 | - Derive a limit-free expression for the average marginal effect of stayers.
20 | - Describe local polynomial estimators for derivatives of regression functions.
21 | - Propose an estimator for the average marginal effect.
22 |
23 | :::
24 |
25 | ## An Estimable Form of the Average Marginal Effect
26 |
27 | In the previous section, we have identified the average marginal effect for stayers in model ([-@eq-nonparametric-model-full-nonsep]) in terms of a limit of average change in outcomes across periods (@eq-nonparametric-avg-me-identification-result):
28 | $$
29 | \begin{aligned}
30 | & \E\left[ \partial_x\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x \right] \\
31 | & = \lim_{h\to 0} \left[ \dfrac{Y_{i2}-Y_{i1}}{h}\Bigg|X_{i1}=x, X_{i2} = x+h \right].
32 | \end{aligned}
33 | $$
34 | This representation is convenient for identification and explicitly shows that the source of identification is the within variation of near-stayers.
35 |
36 | However, the limit-based representation poses challenges for estimation, which would benefit from a more explicit representation. To provide such a representation, we define the following function:
37 | $$
38 | g(x_1, x_2) = \E\left[Y_{i2}- Y_{i1}|X_{i1}=x_1, X_{i2} = x_2 \right] .
39 | $$
40 | This function captures how the average difference in outcomes depends on the treatment values in both periods. $g(\cdot, \cdot)$ plays a central role in constructing our estimator.
41 |
42 | Observe that $g(x, x) = 0$, since
43 | $$
44 | \begin{aligned}
45 | g(x, x) & = \E\left[Y_{i2}- Y_{i1}|X_{i1}=X_{i2} = x \right] \\
46 | & = \E\left[\phi(x, A_i, U_{i2}) - \phi(x, A_i, U_{i1})|X_{i1}=X_{i2} = x \right]\\
47 | & = \E\left[\phi(x, A_i, U_{it}) - \phi(x, A_i, U_{it})|X_{i1}=X_{i2} = x \right]\\
48 | & = 0,
49 | \end{aligned}
50 | $$
51 | where we use the stationarity of $U_{it}$ (and hence of $\phi(x, A_i, U_{it})$) in the last two lines.
52 |
53 | Thus, by the definition of partial derivatives it holds that
54 | $$
55 | \begin{aligned}
56 | & \E\left[\dfrac{Y_{i2}-Y_{i1}}{h}\Bigg|X_{i1}=x, X_{i2}= x+h \right] \\
57 | & = \dfrac{g(x, x+h)}{h} = \dfrac{g(x, x+h) - g(x, x)}{h} \\
58 | & \to \partial_{x_2} g(x, x),
59 | \end{aligned}
60 | $$ {#eq-nonparametric-avg-est-g}
61 | where $\partial_{x_2}$ means the partial derivative with respect to the second argument.
62 |
63 | By combining @eq-nonparametric-avg-est-g with @eq-nonparametric-avg-me-identification-result, we obtain the following representation for the average marginal effects of stayers:
64 | $$
65 | \begin{aligned}
66 | & \E[\partial_x\phi (x, A_i, U_{it})|X_{i1}=X_{i2}=x] \\
67 | & = \partial_{x_2} \E\left[Y_{i2}- Y_{i1}|X_{i1}=x_1, X_{i2} = x_2 \right]\Big|_{(x_1, x_2)=(x, x)}.
68 | \end{aligned}
69 | $$ {#eq-nonparametric-avg-est-me}
70 |
71 | The practical importance of @eq-nonparametric-avg-est-me is that it reduces the problem of estimating average marginal effects to the problem of estimating a derivative of a conditional function — a standard nonparametric regression problem.
72 |
73 |
74 | ## A Primer on Multivariate Local Polynomial Estimation
75 |
76 | ### Idea
77 |
78 | In principle, many nonparametric regression methods can estimate derivatives. Of these, local polynomial (LP) regression provides a particularly convenient approach. LP estimators are available in closed form, can estimate derivatives directly, and have favorable asymptotic properties.
79 |
80 | We now provide the essential idea for a local quadratic estimator for a bivariate regression function. However, it is straightforward to extend the argument to any higher order polynomial and any number of variables. See 2.5.2 in @Li2007 and @Fan1996 for some standard references.
81 |
82 |
83 | To motivate the approach, let $g(\cdot, \cdot)$ be a smooth function of two variables, and suppose that we see observations $(Y_i, X_{i1}, X_{i2})$ such that
84 | $$
85 | \E[Y_i|X_{i1}, X_{i2}] = g(X_{i1}, X_{i2}), \quad i=1, \dots, N.
86 | $$
87 | Let $(x_1, x_2)$ be some fixed point.
88 |
89 | The bivariate Taylor's theorem tell us that, if $(X_{i1}, X_{i2})$ is "close" to $(x_1, x_2)$, then (expanding up to the second order)
90 | $$
91 | \begin{aligned}
92 | & g(X_{i1}, X_{i2}) \\
93 | & \approx g(x_1, x_2) \\
94 | & \quad + \partial_{x_1} g(x_1, x_2) (X_{i1}-x_1) + \partial_{x_2} g(x_1, x_2)(X_{i2} - x_2) \\
95 | & \quad + \dfrac{1}{2} \partial_{x_1}^2 g(x_1, x_2)(X_{i1}-x_1)^2 + \dfrac{1}{2} \partial_{x_2}^2 g(x_1, x_2)(X_{i2}-x_2)^2 \\
96 | & \quad + \partial_{x_1}\partial_{x_2} g(x_1, x_2) (X_{i1}-x_1)(X_{i2}-x_2) \\
97 | & = \bZ_i(x_1, x_2)'\bbeta(x_1, x_2)
98 | \end{aligned}
99 | $$
100 | where
101 | $$
102 | \begin{aligned}
103 | \bZ_i(x_1, x_2) & = \begin{pmatrix}
104 | 1\\
105 | X_{i1}- x_1\\
106 | X_{i2} - x_2\\
107 | (X_{i1}-x_1)^2/2\\
108 | (X_{i1}- x_1)(X_{i2}-x_2) \\
109 | (X_{i2} - x_2)^2/2
110 | \end{pmatrix}, \\
111 | \bbeta(x_1, x_2) & = \begin{pmatrix}
112 | g(x_1, x_2)\\
113 | \partial_{x_1} g(x_1, x_2)\\
114 | \partial_{x_2} g(x_1, x_2)\\
115 | \partial^2_{x_1} g(x_1, x_2)\\
116 | \partial_{x_1}\partial_{x_2} g(x_1, x_2)\\
117 | \partial^2_{x_2} g(x_1, x_2)
118 | \end{pmatrix}
119 | \end{aligned}
120 | $$
121 | This expansion suggests that we can estimate the leading derivatives $\bbeta(x_1, x_2)$ by regressing $Y_i$ on $\bZ_i(x_1, x_2)$ using weighted least squares. Observations which are closer to the target point $(x_1, x_2)$ should receive a higher weight.
122 |
123 | ### Estimator
124 |
125 |
126 | We formalize the idea of closeness using a bivariate *kernel* function $K(\cdot, \cdot)$ that measures the distance between data points and the target point $(x_1, x_2)$. In principle, we can take any function $K$ that satisfies the following properties:
127 | $$
128 | \begin{aligned}
129 | K(u_1, u_2) & \geq 0, \\
130 | \iint K(u_1, u_2)du_1du_2 & =1, \\
131 | \int u_j K(u_1, u_2)du_j & =0.
132 | \end{aligned}
133 | $$
134 | A common approach is to take $K$ to be a product of some univariate density functions $K_1$:
135 | $$
136 | K(x_1, x_2) = K_1(x_1) K(x_2),
137 | $$
138 | where $K_1$ may be the probability density function of the standard Gaussian distribution, for example.
139 |
140 | To estimate the derivative coefficients in $\bbeta(x_1, x_2)$, we perform a weighted least squares regression of $Y_i$ on the "covariates"/basis functions $\bZ_i(x_1, x_2)$, using kernel weights that reflect proximity to the target point. The resulting estimator is:
141 | $$
142 | \begin{aligned}
143 | \hat{\bbeta}(x_1, x_2) & = \left( \sum_{i=1}^N K\left(\dfrac{X_{i1}-x_1}{s}, \dfrac{X_{i2}-x_2}{s} \right) \bZ_i(x_1, x_2)\bZ_i(x_1, x_2)'\right)^{-1}\\
144 | & \hspace{0.9cm} \times \sum_{i=1}^N K\left(\dfrac{X_{i1}-x_1}{s}, \dfrac{X_{i2}-x_2}{s} \right) \bZ_i(x_1, x_2) Y_i,
145 | \end{aligned}
146 | $$ {#eq-nonparametric-avg-lp}
147 | where $s>0$ is the smoothing parameter (bandwidth). As usual with kernel estimators, larger values of $s$ correspond to stronger smoothing — the estimator considers points in a larger neighborhood of $(x_1, x_2)$.
148 |
149 | One may generalize the approach to consider local polynomials of general order $p$. Taking higher $p$ permits estimation of higher-order derivatives.
150 |
151 |
152 | ::: {.callout-note appearance="simple" icon=false}
153 |
154 | Which order of local polynomials should one use? The standard advice is to take the degree $p$ of the polynomial to be one higher than the highest derivatives of interest. For example, if we are interested in the regression function itself (zeroth derivative), it is most common to use local linear regression (first degree polynomial). In our case, we are interested in the first derivative. According to this rule, we should run local quadratic regression, as described above.
155 |
156 | :::
157 |
158 | ## Estimating Average Marginal Effects
159 |
160 | ### Estimator
161 |
162 |
163 | Equipped with the local polynomial estimator, we can now estimate the average marginal effect of stayers. To do so, we use $Y_{i2}-Y_{i1}$ as the dependent variable in @eq-nonparametric-avg-lp and select the target point as $(x_1, x_2)=(x, x)$. The third coordinate of $\hat{\bbeta}(x, x)$ is an estimator for the partial derivative of $\E[Y_{i2}-Y_{i1}|X_{i1}=x_1, X_{i2}=x_2]$ with respect to $x_2$, evaluated at $(x, x)$ — precisely the average marginal effect of interest by @eq-nonparametric-avg-est-me:
164 | $$
165 | \widehat{ \E}\left[ \partial_x\phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x \right] = \hat{\bbeta}_3(x, x).
166 | $$
167 |
168 |
169 |
170 |
171 | ### Asymptotic Properties
172 |
173 | Our estimator inherits all the desirable properties of local polynomial estimators, including consistency and asymptotic normality [see theorem 2.10 in @Li2007; @Masry1996; @Masry1996b]. In particular, by suitably undersmoothing the local polynomial estimator (taking $s$ smaller than the MSE-optimal value), one can conduct inference on the target average effect of interest.
174 |
175 |
176 | ## Another Estimator
177 |
178 |
179 | Before we move on to generalizations of the identification result, it is worth discussing @eq-nonparametric-avg-est-me somewhat more. The preceding identification and estimation arguments were based on the one-sided finite difference $(\phi(x+h, a, u)-\phi(x, a, u))$. While the one-sided finite difference yields a valid estimator, symmetric (central) differences [often provide more accurate approximations to derivatives.](https://en.wikipedia.org/wiki/Finite_difference#Relation_with_derivatives).
180 |
181 |
182 | By suitably adjusting the above argument, one can indeed obtain an identification argument based on central differences:
183 | $$
184 | \begin{aligned}
185 | & \E[\partial_x \phi(x, A_i, U_{it})|X_{i1}=X_{i2}=x]
186 | \\
187 | & = \dfrac{1}{2} \dfrac{d}{dh}\Big( \E\left[Y_{i2}- Y_{i1}|X_{i1}=x-h, X_{i2} = x+h \right]\Big)\Big|_{h=0}\\
188 | & = \dfrac{1}{2}\Bigg( \partial_{x_2} \E[Y_{i2}-Y_{i1}|X_{i1}=x_1, X_{i2}=x_2] \\
189 | & \hspace{2cm} -\partial_{x_1} \E[Y_{i2}-Y_{i1}|X_{i1}=x_1, X_{i2}=x_2] \Bigg)\Bigg|_{(x_1, x_2)=(x, x)}.
190 | \end{aligned}
191 | $$
192 | A symmetric estimator would then be based on the difference based on the difference between the estimated partial derivatives with respect to $x_2$ and $x_1$, i.e., the third and second elements of $\hat{\bbeta}(x, x)$.
193 |
194 | ---
195 |
196 | #### Next Section {.unnumbered}
197 |
198 | In the next section, we somewhat relax the stationarity assumption on the model by allowing location-scale shifts in the structural function.
199 |
200 |
--------------------------------------------------------------------------------
/src/intro.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn about different kinds of unobserved heterogeneity in economic and business data and some strategies for dealing with it."
3 | open-graph:
4 | description: "Learn about different kinds of unobserved heterogeneity in economic and business data and some strategies for dealing with it."
5 | ---
6 |
7 |
8 | # Introduction: Causal Inference with Unobserved Heterogeneity {#sec-introduction}
9 |
10 | ::: {.callout-note appearance="simple" icon=false}
11 |
12 | ## Summary and Learning Outcomes
13 |
14 | This section discusses the problem of unobserved heterogeneity and sets out some common themes for the course.
15 |
16 | By the end of this section, you should be able to
17 |
18 | - Discuss the role and nature of unobserved heterogeneity.
19 | - Describe why unobserved heterogeneity matters when working with observational data.
20 | - Describe two broad strategies for causal inference under unobserved heterogeneity.
21 | :::
22 |
23 |
24 | ## The Problem of Unobserved Heterogeneity
25 |
26 | ### Introduction
27 |
28 | In economics, business, and the social sciences, heterogeneity is the rule. No two individuals, firms, or countries are identical, even when they appear statistically similar in observed data. A worker with the same years of education as another may earn a different wage due to unobserved ability. Two firms in the same industry may respond differently to a policy shock because of latent managerial practices. A country’s growth trajectory may diverge from its peers’ due to unmeasured institutions or cultural norms. These unobserved differences — preferences, productivity, measurement errors, or idiosyncratic shocks — determine how agents respond to treatments, policies, or market conditions.
29 |
30 | Our objective is to estimate causal parameters: treatment effects (or their moments and distributions), policy impacts, or other structural quantities that describe how outcomes would change under interventions. We focus on counterfactuals, rather than associational patterns.
31 |
32 | In observational data, however, this task is complicated by unobserved heterogeneity. Treatments (broadly defined) are endogenously selected based on unobserved factors, creating confounding. Naive comparisons fail to isolate causal effects because the treatment-outcome relationship is confounded by unobserved determinants. The challenge of causal inference with unobserved heterogeneity is central to empirical research and the focus of this course.
33 |
34 |
35 | ### Broad Setting
36 |
37 | Formally, suppose we observe a dataset $\lbrace(Y_i, X_i)\rbrace_{i=1}^N$ (cross-section) or $\{(Y_{it}, X_{it})\}_{i=1}^N$ (panel), where $Y_i$ is the realized outcome for unit $i$ and $X_i$ includes observed covariates (e.g., treatments, controls).
38 |
39 | At all points in the course, we adopt the following potential outcomes framework. The outcome of unit $i$ (in period $t$) under "treatment" $x$ is determined as
40 |
41 | $$
42 | \begin{aligned}
43 | Y_i^x & = \phi(x, A_i), && \text{(cross-section)}\\
44 | Y_{it}^x & = \phi(x, A_i, U_{it}), && \text{(panel)}
45 | \end{aligned}
46 | $$ {#eq-intro-potential-outcomes}
47 |
48 | where:
49 |
50 |
51 | - $\phi(\cdot)$ is an unknown structural function.
52 | - $A_i$ is time-invariant unobserved heterogeneity.
53 | - $U_{it}$ is time-varying unobserved heterogeneity.
54 |
55 | Our goal is causal: to infer some feature of $\phi(\cdot)$, such as average treatment or marginal effects, the variance or distribution of such effects, or distributional features of potential outcomes.
56 |
57 | A key challenge to our work is the presence of $(A_i, U_{it})$ which are never observed but systematically influence both treatments and outcomes.
58 |
59 | ### Types of Unobserved Heterogeneity
60 |
61 | What are the $(A_i, U_{it})$? Unobserved heterogeneity arises from three (overlapping) primary sources:
62 |
63 | 1. **Omitted Confounders**:
64 | - Latent variables correlated with both $X_i$ and $Y_i$ .
65 | - **Example**: Estimating the returns to education $X_i$ when unobserved ability $A_i$ affects both education and wages $Y_i$.
66 |
67 | 2. **Heterogeneous Treatment Effects**:
68 | - The impact of $X_i$ varies across units due to $(A_i, U_{it})$, meaning effects are individual-specific.
69 | - **Example**: The benefits $A_i$ of job training program $X_i$ may be larger for some units than for others.
70 |
71 | 3. **Measurement Error**:
72 | - Observed covariates $X_i$ are noisy proxies for true values.
73 | - **Example**: Using self-reported income to proxy true earnings.
74 |
75 |
76 |
77 | ### Consequences of Ignoring Unobserved Heterogeneity
78 |
79 | In randomized experiments, unobserved heterogeneity is less problematic for causal inference because:
80 | $$
81 | \curl{(X_{it}}_{t=1}^T \perp\!\!\!\perp A_i, U_{it} \quad \text{(by design)},
82 | $$
83 | where independence may hold conditionally on some further variables. In other words, treatment assignment is independent of the individual determinants of the potential outcomes. As a consequence, various transformations and comparisons of treatment groups directly estimate causal parameters of interest.
84 |
85 |
86 | However, in observational data, this independence **fails**:
87 | $$
88 | \curl{X_{it}}_{t=1}^T \not\!\perp\!\!\!\perp (A_i, U_{it}).
89 | $$
90 | Real-world data is generated by agents making choices based on *all* information, including the information that is not recorded in the final datasets. A student selects a college $X_i$ based on unobserved ambition $A_i$; a firm adopts a technology $X_{it}$ based on unobserved costs $(A_i, U_{it})$; a patient complies with a medical treatment based on unobserved health beliefs. The resulting data is the result of these endogenous decisions, meaning that naive statistical associations between $Y$ and $X$ are almost always confounded by $(A_i, U_{it})$. This is the **core problem of causal inference with unobserved heterogeneity**. The following graphs schematically illustrate the point:
91 |
92 | ```{dot}
93 | //| fig-cap: "Comparison of causal structures: experimental vs observational"
94 | //| fig-width: 100%
95 | digraph CombinedGraph {
96 | bgcolor="#181818";
97 |
98 | node [
99 | fontcolor = "#e6e6e6",
100 | style = filled,
101 | color = "#e6e6e6",
102 | fillcolor = "#333333"
103 | ]
104 |
105 | edge [
106 | color = "#e6e6e6",
107 | fontcolor = "#e6e6e6"
108 | ]
109 |
110 | // Experimental data: no confounding
111 | subgraph cluster_exp {
112 | label = "Experimental data: no confounding";
113 | fontcolor = "#e6e6e6";
114 | style = filled;
115 | color = "#666666";
116 | fillcolor = "#222222";
117 |
118 | A1 [label="Unobserved", style="dashed"];
119 | B1 [label="Observed"];
120 | C1 [label="Covariates"];
121 |
122 | B1 -> C1;
123 | A1 -> C1;
124 | }
125 |
126 | // Observational data: confounding
127 | subgraph cluster_obs {
128 | label = "Observational data: confounding";
129 | fontcolor = "#e6e6e6";
130 | style = filled;
131 | color = "#666666";
132 | fillcolor = "#222222";
133 |
134 | A2 [label="Unobserved", style="dashed"];
135 | B2 [label="Observed"];
136 | C2 [label="Covariates"];
137 |
138 | A2 -> B2 [dir=none];
139 | B2 -> C2;
140 | A2 -> C2;
141 | }
142 | }
143 | ```
144 |
145 |
146 | Ignoring this confounding leads to misleading conclusions. The issues manifests even in simple linear regression, with some basic examples including:
147 |
148 | - [Omitted variable bias](https://en.wikipedia.org/wiki/Omitted-variable_bias): if an important explanatory variable is missing and correlated with observed covariates, coefficient estimates are be biased and inconsistent.
149 | - [Attenuation bias](https://en.wikipedia.org/wiki/Regression_dilution): When covariates suffer from measurement error, estimated effects tend to be systematically biased toward zero.
150 |
151 | In nonlinear models, the resulting biases become completely unpredictable even in parametric models [e.g. @Stefanski1985].
152 |
153 |
154 |
155 |
156 | ## This Course
157 |
158 | ### Course Description
159 |
160 | As a response to this issue, econometricians have developed a range of statistical techniques that are suitable for observational data and robust to unobserved heterogeneity in varying senses.
161 |
162 | This course surveys some of the advances in this field, structured into three key topics:
163 |
164 | 1. Linear models with heterogeneous coefficients: extending traditional regression models to allow for individual-specific responses to treatment.
165 | 2. Nonparametric models with unobserved heterogeneity: models that do not restrict the form of heterogeneity or how it affects the outcome.
166 | 3. Quantile and distribution regression: approaches that focus on quantile and distributional treatment effects, rather than the distribution *of* treatment effects.
167 |
168 | Throughout, we focus on non-experimental (observational) data, where unobserved heterogeneity cannot be ignored. We also allow for non-binary and continuous treatments throughout. Finally, we emphasize identification strategies over asymptotic theory.
169 |
170 | ### A Common Theme
171 |
172 |
173 | A common theme is that there always will be a price to pay for learning any feature of the counterfactual distribution. This price is paid in the form of assumptions and restrictions on the model ([-@eq-intro-potential-outcomes]) — another manifestation of the fundamental problem of causal inference. Some potential courses of action will include:
174 |
175 | - Imposing functional form restrictions on $\phi$ (e.g. parametric assumptions such as linearity, or assuming that $\alpha_i$ is scalar and that it enters $\phi$ monotonically);
176 | - Restricting the extent of unobserved heterogeneity in the model (e.g. assuming that there is scalar unobserved variables or a vector of heterogeneous coefficients);
177 | - Restricting the relationship between the observed and unobserved variables (e.g. assuming that $\alpha_i$ is independent from $x_i$);
178 | - Focusing on particular parts of the distribution of the outcome (such as quantiles).
179 |
180 |
181 | ### Overview
182 |
183 | We will see examples of each approach throughout the course, and one should see each particular model discussed as a specific variation of model ([-@eq-intro-potential-outcomes]). The table below provides a taste of what is to come and a quick summary of this course:
184 |
185 | | **Model Class** | **What We Pay** | **What We Get** | **Upside** |
186 | |--------------------------------|---------------------------------------------|------------------------------------|-----------------------------------------|
187 | | **Linear Heterogeneous Models** | Linearity of $\phi$: $\phi(X_{it}, A_i, U_{it})$ $=$ $X_{it}'\beta(A_i)$ $+ U_{it}$ and sufficient number of observations per unit | Distribution and moments of individual treatment effects | Full distribution of treatment effects |
188 | | **Nonparametric Models** | Identification only for subpopulation of *stayers* or assumptions on the relationship between $(X_{it})$ and $(A_i, U_{it})$ | Average marginal effects (more with additive separability of $U_{it})$ | No restrictions on the form of $\phi(\cdot)$ or $A_i$ |
189 | | **Quantile and Distributional Regression Models** | Focus on distribution of potential outcomes, not treatment effects. | Quantile and distributional treatment effects (QTEs and DTEs) | No need for panel data |
190 |
191 |
192 |
193 |
194 |
195 | ---
196 |
197 | #### Next Section {.unnumbered}
198 |
199 | In the next section, we begin by examining how unobserved heterogeneity arises naturally in linear models and setting the stage for the first block of the course.
--------------------------------------------------------------------------------
/src/nonparametric/nonparametric-introduction.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Explore nonparametric models with unobserved heterogeneity. Identification under minimal functional form assumptions. (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Explore nonparametric models with unobserved heterogeneity. Identification under minimal functional form assumptions. (Lecture Notes)"
6 | ---
7 |
8 |
9 | # Introduction to Nonparametric Models with Unobserved Heterogeneity {#sec-nonparametric-intro}
10 |
11 | ::: {.callout-note appearance="simple" icon=false}
12 |
13 | ## Summary and Learning Outcomes
14 |
15 | This section introduces nonparametric models with unobserved heterogeneity and lays out the structure and goals for this block.
16 |
17 | By the end of this section, you should be able to:
18 |
19 | - Explain limitations of linear models.
20 | - Write down generic nonparametric models with unobserved heterogeneity.
21 | - Understand identification challenges and the assumptions commonly used to address them.
22 |
23 | :::
24 |
25 |
26 | ## Towards Nonparametric Models
27 |
28 | ### Motivation
29 |
30 | We began these notes by studying linear models with heterogeneous coefficients ([-@eq-lecture_model]), a familiar and flexible starting point. As discussed in section [-@sec-linear-intro], such models are widely used and arise naturally in empirical work.
31 |
32 | But linearity is not innocent. Except for binary-only covariates, the assumption often lacks theoretical support and may be at odds with the data. Many economic settings suggest richer structures: preferences with satiation, production with non-constant returns to scale, or outcomes bounded by construction. Furthermore, differences between individuals may not be compressible into a finite-dimensional vector of heterogeneous coefficients.
33 | In such cases, linear models may be severely misspecified and lead to incorrect conclusions.
34 |
35 | This motivates a shift. In this block, we move beyond linearity and consider nonparametric models with unobserved heterogeneity — a class that allows for far greater flexibility in how outcomes respond to both observed and unobserved variation. These models present new challenges but also offer a more powerful framework for accounting for unobserved differences.
36 |
37 | ### Nonparametric Models
38 |
39 |
40 | Nonparametric models address functional form concerns directly. Rather than imposing a specific shape on the relationship between $Y$ and the treatments $\bX$, we assume only that this relationship is governed by an unknown function $\phi$ of observed and unobserved variables. This leads to the following general potential outcome models:
41 |
42 |
43 | - In cross-sectional settings:
44 | $$
45 | Y_i^{\bx} = \phi(\bx, A_i), \quad {}_{i=1,\dots, N},
46 | $$ {#eq-nonparametric-generic-cross-section}
47 | where $\bX_{i}$ includes the observed variables and $A_i$ includes the unobserved components.
48 |
49 | - In panel data settings
50 | $$
51 | Y_{it}^{\bx} = \phi(\bx, A_i, U_{it}), \quad {}_{i=1,\dots, N}^{t= 1, \dots, T},
52 | $$ {#eq-nonparametric-generic-panel}
53 | where both $A_i$ and $U_{it}$ are not observed.
54 |
55 | Models ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]) parallel and generalize models ([-@eq-cross_sectional_hetero]) and ([-@eq-panel_hetero]).
56 |
57 | In both cases the nature of $(A_i, U_{it})$ is not restricted a priori. These unobserved components may include both finite-dimensional vectors (such as unobserved variables or coefficients) and infinite-dimensional objects (such as utility functions). In such a fully unrestricted setting, we can equivalently represent ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]) as
58 | $$
59 | Y_i^{\bx} = \phi_i(\bx), \quad \quad Y_{it}^{\bx} = \phi_{it}(\bx),
60 | $$
61 | respectively.
62 |
63 |
64 | ### Object of Interest
65 |
66 |
67 | As in the linear case, possible objects of interest include:
68 |
69 | - The full structural function $\phi(\cdot, \cdot)$ or $\phi(\cdot, \cdot, \cdot)$. This function fully traces out the potential outcomes $Y^{\bx}$ for all individuals. This corresponds to the problem of identifying individual treatment effects.
70 | - Some distributional features of "treatment effects" — changes in outcomes due to variation in $\bX_{it}$, conditional on unobserved heterogeneity. In the context of model ([-@eq-nonparametric-generic-panel]), these effects are given by
71 | $$
72 | \begin{aligned}
73 | & \phi(\bx_2, A_i, U_{it}) - \phi(\bx_1, A_i, U_{it}),\\
74 | & \partial_{\bx} \phi(\bx_0, A_i, U_{it}),
75 | \end{aligned}
76 | $$ {#eq-nonparametric-effects}
77 | where $\bx_0, \bx_1, \bx_2$ are some possible values for $\bX_{it}$, and the marginal effect is considered if $\phi$ is suitably differentiable in $\bx$. The distributional feature of interest may include average effects, variances, higher-order moments, or the full distribution.
78 |
79 | ### Common Issue
80 |
81 | Unfortunately, models ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]) require further assumptions to be useful, as discussed in section [-@sec-introduction]. Without assumptions, we cannot hope to identify counterfactual objects of interest, not even average effects.
82 |
83 | ::: {.callout-note appearance="simple" icon=false}
84 |
85 | In a strict sense, one may point out that ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]) are not even models in the sense of offering testable predictions or supporting counterfactual analysis. ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]) are just statements that $\bX$ and $Y$ are related through some function that may differ with $i$ and $t$. Such a statement is vacuously true. For example, without further assumptions one may take $\phi(x, a) = a$ and $A_i = Y_i$ in ([-@eq-nonparametric-generic-cross-section]).
86 |
87 | :::
88 |
89 | Typically, such assumptions fall into two categories:
90 |
91 | 1. Assumptions on the joint distribution of the observed and the unobserved components, including on the nature of $(A_i, U_{it})$.
92 | 2. Assumptions on how unobserved components enter the equation.
93 |
94 | ## Models of This Block
95 |
96 | To make progress, we focus on two general but tractable versions of the general nonparametric panel model ([-@eq-nonparametric-generic-panel]) in these notes. In both cases, we assume that the outcome $Y_{it}$ is continuous and that $T=2$.
97 |
98 |
99 | ### First Model {.unnumbered}
100 |
101 | We begin with the following model:
102 | $$
103 | Y_{it}^{x} = \phi(x, A_i, U_{it}), \quad {}_{i=1, \dots, N}^{t=1, 2}.
104 | $$ {#eq-nonparametric-model-full-nonsep}
105 | where for simplicity we assume that $x$ is scalar. The realized treatment $X_{it}$ is assumed to be continuously distributed, and $\phi$ is continuous in $x$ for all values of $(A_i, U_{it})$. As always, the realized outcomes $Y_{it}$ satisfy
106 | $$
107 | Y_{it} = Y_{it}^{X_{it}} = \phi(x, A_i, U_{it}), \quad {}_{i=1, \dots, N}^{t=1, 2}.
108 | $$
109 |
110 | We consider a version of ([-@eq-nonparametric-model-full-nonsep]) that is very general in terms of unobserved variables $(A_{i}, U_{it})$. In particular, we do not restrict
111 |
112 | - The dimension and the form of $A_i$ and $U_{it}$;
113 | - How the outcome depends on $(A_{i}, U_{it})$;
114 | - The dependence structure between $(A_i, U_{it})$ and $X_{it}$.
115 |
116 | At the same time, we impose an assumption of **stationarity** on $U_{it}$. Its distribution is stable over time conditional on observed and unobserved covariates, allowing us to isolate changes in $Y_{it}$ attributable to variation in $X_{it}$.
117 |
118 |
119 | ### Second Model {.unnumbered}
120 |
121 | After reaching the (probable) limits of identification with ([-@eq-nonparametric-model-full-nonsep]), we consider a different flavor of model ([-@eq-nonparametric-generic-panel]), where the time-varying unobserved component $U_{it}$ is scalar and affects the outcome $Y_{it}$ additively:
122 | $$
123 | Y_{it}^{x} = \phi(x, A_i) + U_{it}, \quad {}_{i=1, \dots, N}^{t=1, 2}
124 | $$ {#eq-nonparametric-model-u-sep}
125 | In contrast to model ([-@eq-nonparametric-model-full-nonsep]), we do not assume that $U_{it}$ is stationary. Models ([-@eq-nonparametric-model-full-nonsep]) and ([-@eq-nonparametric-model-u-sep]) are hence non-nested. We continue to allow $A_i$ to have unrestricted dimensionality and structure. It may also have a complex dependence structure with $X_{it}$.
126 |
127 |
128 | ## Plan for This Block
129 |
130 | In this block, we focus on models ([-@eq-nonparametric-model-full-nonsep])-([-@eq-nonparametric-model-u-sep]) and consider identification of some distributional features of treatment effects ([-@eq-nonparametric-effects]). Specifically,
131 |
132 | 1. **Average** treatment and marginal **effects** for model ([-@eq-nonparametric-model-full-nonsep]):
133 | - Show that identifying average effects is more complicated than considering averages of the outcome directly.
134 | - Discuss heterogeneity bias, a form and consequence of confounding.
135 | - Show how stationarity assumptions on $U_{it}$ allow us to identify the average effects for a population of stayers — units with $X_{i1}=X_{i2}$ — without any further assumptions.
136 | - Consider two generalizations of the identification result: beyond the population of stayers and allowing some non-stationarity in the structural function.
137 | 2. **Variance** of treatment and marginal effects in model ([-@eq-nonparametric-model-u-sep]): identify the variance of effects ([-@eq-nonparametric-effects]) by requiring that $U_{it}$ cannot depend on future values of $\bX_{it}$
138 |
139 |
140 | In the next block, we also revisit model ([-@eq-nonparametric-model-full-nonsep]) through the lens of quantile regression.
141 |
142 | ## A Brief Classification of Nonparametric Models
143 |
144 | In these notes we primarily focus on the general and powerful models ([-@eq-nonparametric-model-full-nonsep])-([-@eq-nonparametric-model-u-sep]). However, much work has gone into analyzing other special instances of ([-@eq-nonparametric-generic-cross-section]) and ([-@eq-nonparametric-generic-panel]). Before moving on to identification of average effects, we offer a brief taxonomy of nonparametric models with unobserved heterogeneity with some essential references. We organize the literature by the types of assumptions made:
145 |
146 |
147 | - *How unobserved heterogeneity enters in the system*:
148 | - Fully non-separable models [@Altonji2005; @Hoderlein2007; @Hoderlein2007; @Chernozhukov2015].
149 | - Partially additive separable panel models: [@Chen2003; @Evdokimov2012; @Blundell2012b; @Morozov2023jmp].
150 | - Fully separable, additively [@Henderson2008NonparametricEstimationTesting; @Boneva2015SemiparametricModelHeterogeneous; @Lee2015PanelNonparametricRegression;@Henderson2024NonparametricModelsFixed] or multiplicatively [@Beckert2008HeterogeneityNonParametricAnalysis].
151 | - *What assumptions are imposed on the form of unobserved components*: restrictions on dimension such as scalarity [@Matzkin2003; @Altonji2005; @Imbens2009] or no restrictions [@Hoderlein2007; @Hoderlein2007; @Chernozhukov2015]]
152 | - *What assumptions are imposed on dependence structure between observed and unobserved components*: full or partial independence restrictions [@Hoderlein2007; @Imbens2009] vs. no independence restrictions [@Hoderlein2012; @Chernozhukov2015].
153 | - *The nature of the outcome variable*: continuous-outcome models [@Chernozhukov2015] or discrete-outcome models [@Manski1987; @Chesher2017; @Chesher2020].
154 |
155 | ---
156 |
157 | #### Next Section {.unnumbered}
158 |
159 | In the next section, we begin our analysis of average effects in model ([-@eq-nonparametric-model-full-nonsep]) and discuss why identification is more complex that analyzing average outcomes.
--------------------------------------------------------------------------------
/src/linear/linear-coefficient-variance.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn how to identify and estimate the variance of heterogeneous coefficients in linear panel models under minimal assumptions (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Learn how to identify and estimate the variance of heterogeneous coefficients in linear panel models under minimal assumptions (Lecture Notes)"
6 | ---
7 |
8 | # Variance of Heterogeneous Coefficients {#sec-linear-variance}
9 |
10 | ::: {.callout-note appearance="simple" icon=false}
11 |
12 | ## Summary and Learning Outcomes
13 |
14 | This section discusses how to identify the variance of heterogeneous coefficients without restricting the dependence between coefficients and covariates.
15 |
16 | By the end of this section, you should be able to:
17 |
18 | - Explain why average coefficients provide an incomplete picture.
19 | - Identify the variance of heterogeneous coefficients using a temporal homoskedasticity assumption on the residuals.
20 | - Construct a consistent estimator for the variance of coefficients.
21 | :::
22 |
23 |
24 | ## Beyond Average Coefficients
25 |
26 | ### Potential Objects of Interest
27 |
28 | Previously, we focused on estimating the average coefficient vector $\E[\bbeta_i]$ in our model ([-@eq-lecture_model]):
29 | $$
30 | Y_{it}^{\bx} = \bbeta_i'\bx + U_{it}.
31 | $$ {#eq-linear-variance-model}
32 | In particular, section [-@sec-linear-mean-group] has shown that the mean group estimator can consistently estimate $\E[\bbeta_i]$ even without imposing restrictions on the dependence between $\bbeta_i$ and $\bX_{it}$.
33 |
34 |
35 | Average effects are informative but limited. They do not capture the full variation in responses across individuals (@Heckman1997). Other parameters of interest include:
36 |
37 | - The moments of $\bbeta_i$:
38 | - Variance: overall dispersion in effects.
39 | - Skewness: asymmetry in responses.
40 | - Higher moments: shape of the distribution.
41 | - The full distribution and quantiles of $\bbeta_i$. For example, the distribution may be used to compute what proportion of people benefit vs. how many people are hurt by changes in $\bX_{it}$.
42 |
43 | ### Model
44 |
45 | As it turns out, it is possible to identify such distributional features in the static version of model ([-@eq-linear-variance-model]) without restricting the dependence structure between $\bbeta_i$ and $\bX_{it}$ [@Arellano2012]. In this section we discuss a streamlined version of their results for variance, while @sec-linear-distribution shows how to identify the maximal object of interest — the full distribution.
46 |
47 | Specifically, we consider model ([-@eq-linear-variance-model]) under a strict exogeneity condition of the form:
48 | $$
49 | \E[U_{it}|\bbeta_i, \bX_i] =0
50 | $$ {#eq-vector-variance-strict-ex}
51 | The number $T$ of unit-level observations is assumed to exceed the number $p$ of covariates. We treat $T$ as fixed, and consider large-$N$ identification and estimation arguments.
52 |
53 | As before, the model can be written in unit matrix form as
54 | $$
55 | \bU_i = \bX_i\bbeta_i + \bU_i.
56 | $$
57 | We again assume that $\det(\bX_i'\bX_i)>0$ for all $i$. If this condition does not hold, our results are about the subpopulation of units with positive determinant, as in section [-@sec-linear-mean-group].
58 |
59 |
60 |
61 | ## Identification
62 |
63 |
64 | Our object of interest in this section is the variance-covariance matrix $\var(\bbeta_i)$ of the coefficients $\bbeta_i$:
65 | $$
66 | \var(\bbeta_i) = \E[\bbeta_i\bbeta_i'] - \E[\bbeta_i]\E[\bbeta_i]'.
67 | $$
68 | Its diagonal terms are the variances of individual coefficients, which show how dispersed the effects are overall. The off-diagonal covariance terms capture whether the effects of different covariates tend to go in the same or contrary directions.
69 |
70 |
71 |
72 |
73 |
74 | ### Variance Decomposition
75 |
76 | To identify $\var(\bbeta_i)$, we first look at the second moments of $\bY_i$. Specifically, we consider the conditional second moment of $\bY_i$ given $\bX_i=\bX$, where $\bX$ is some potential value of $\bX_i$ such that $\det(\bX'\bX)>0$ and $\bX$ lies in the support of $\bX_i$.
77 |
78 | Using model ([-@eq-linear-variance-model]) and condition ([-@eq-vector-variance-strict-ex]), the conditional second moment of $\bY_i$ can be represented as
79 | $$
80 | \begin{aligned}
81 | &\E[\bY_i\bY_i'|\bX_i=\bX]\\
82 | & = \E\left[ (\bX_i\bbeta_i+ \bU_i)(\bX_i\bbeta_i+\bU_i)'|\bX_i=\bX \right]\\
83 | & =\bX \E\left[\bbeta_i\bbeta_i'|\bX_i=\bX \right]\bX' + \E\left[\bU_i\bU_i'|\bX_i=\bX \right].
84 | \end{aligned}
85 | $$ {#eq-linear-variance-second-moment-y}
86 |
87 | The above expression decomposes the conditional second moment of $\bY_i$ into two components --- one corresponding to $\bbeta_i$ and the other one to $\bU_i$.
88 |
89 | In general, we cannot separate the two components of the second moment of $\bY_i$. To see why, consider @eq-linear-variance-second-moment-y as a system of linear equations. The unknowns are the components of the symmetric matrices
90 |
91 | - $\E\left[\bbeta_i\bbeta_i'|\bX_i=\bX \right]$ — a total of $p(p+1)/2$ unknowns.
92 | - $\E\left[\bU_i\bU_i'|\bX_i=\bX \right]$ — a total of $T(T+1)/2$ unknowns.
93 |
94 | The system is underdetermined, as there is a total of only $T(T+1)/2$ distinct equations.
95 |
96 | At heart, the underdeterminacy stems from the fact that the model allows any dynamic structure for $\curl{U_{it}}_{t=1}^T$. As a consequence, $\E[\bU_i\bU_i'|\bX_i=\bX]$ has too many free elements relative to the number of equations.
97 |
98 | ### Imposing Structure on the Error Term
99 |
100 |
101 | This issue can be resolved by imposing assumptions on the time series dependence of $U_{it}$. The magnitudes of $T$ and $p$ determine how many restrictions are necessary. After taking out the $p(p+1)/2$ parameters of $\E[\bbeta_i\bbeta_i'|\bX_i=\bx]$, we have at most $\left[T(T+1)-p(p+1) \right]/2$ equations left. This number is the number of possible free parameters in $\E[\bU_i\bU_i'|\bX_i=\bX]$. In the most unfavorable case $T=p+1$, and we can allow only $T+1$ possible parameters in $\E[\bU_i\bU_i'|\bX_i=\bX]$.
102 |
103 |
104 |
105 | Various assumptions are possible, and @Arellano2012 explore moving average and autoregressive structures for $U_{it}$. Here, we consider the simplest case in which $U_{it}$ is conditionally homoskedastic across time (but not necessarily across $\bX$) and uncorrelated across $t$:
106 | $$
107 | \begin{aligned}
108 | \E[U_{it}^2|\bX_i=\bX] & = \sigma^2(\bX), \\
109 | \E[U_{it}U_{is}|\bX_i=\bX] & = 0, \quad t\neq s.
110 | \end{aligned}
111 | $$ {#eq-linear-variance-spherical}
112 | Under assumption ([-@eq-linear-variance-spherical]) it holds that
113 | $$
114 | \E\left[\bU_i\bU_i'|\bX_i=\bX \right] = \sigma^2(\bX)\bI_T.
115 | $$
116 | There is only one unknown parameter in $\E[\bU_i\bU_i'|\bX_i=\bX]$!
117 |
118 | ### Variance of Residuals
119 |
120 | We can identify the unknown $\sigma^2(\bX)$ using a standard argument. Let the annihilator matrix associated with $\bX$ be given by
121 | $$
122 | \bM(\bX) = \bI_T-\bX(\bX'\bX)^{-1}\bX'.
123 | $$ {#eq-linear-variance-annihilator}
124 | Recall three key properties that $\bM(\cdot)$ possesses
125 | $$
126 | \begin{aligned}
127 | \bM(\bX)\bX & =0, \\
128 | \bM(\bX)\bM(\bX) & =\bM(\bX), \\
129 | \bM(\bX)' & =\bM(\bX).
130 | \end{aligned}
131 | $$
132 | Now consider the following second moment of $\bM(\bX)\bY_i$ conditional on $\bX_i=\bX$:
133 | $$
134 | \begin{aligned}
135 | & \E[\bY_i'\bM(\bX)'\bM(\bX)\bY_i|\bX_i=\bX]\\
136 | & = \E[\bU_i'\bM(\bX)\bU_i|\bX_i=\bX] \\
137 | & = \E\left[ \mathrm{tr}(\bU_i'\bM(\bX)\bU_i)|\bX_i=\bX\right] \\
138 | & = \sigma^2(\bX)(T-p).
139 | \end{aligned}
140 | $$
141 | The details of the trace argument are standard and can be found in section 4.11 of
142 | @Hansen2022.
143 |
144 | We conclude that $\sigma^2(\bX)$ is identified as
145 | $$
146 | \sigma^2(\bX) = \dfrac{1}{T-p} \E[\bY_i'\bM(\bX)\bY_i|\bX_i=\bX].
147 | $$
148 |
149 |
150 | ::: {.callout-note appearance="simple" icon=false}
151 |
152 | Note that it is also possible to solve for variance parameters from @eq-linear-variance-second-moment-y! This approach can be useful when residuals exhibit more general dependence.
153 |
154 | :::
155 |
156 |
157 | ### Variance of Coefficients
158 |
159 |
160 | We are now in a position to identify $\var(\bbeta_i)$. In principle, we can solve for $\E[\bbeta_i\bbeta_i']$ by suitably vectorizing the system in @eq-linear-variance-second-moment-y. However, it is more convenient to go back to the individual estimators ([-@eq-linear-mg-individual-estimator]). For brevity, let $\bH_i = (\bX_i'\bX_i)^{-1}\bX_i'$, so that
161 | $$
162 | \hat{\bbeta}_i = (\bX_i'\bX_i)^{-1}\bX_i'\bY_i = \bbeta_i + \bH_i\bU_i.
163 | $$
164 | As $\E[\bbeta_i\bU_i']=0$ by condition ([-@eq-vector-variance-strict-ex]), the variance of the individual estimator can be decomposed as
165 | $$
166 | \begin{aligned}
167 | & \var(\hat{\bbeta}_i) = \var\left(\bbeta_i + \bH_i\bU_i \right)\\
168 | & = \var(\bbeta_i) + \var(\bH_i\bU_i)\\
169 | %
170 | &
171 | = \var(\bbeta_i) + \E\left[\bH_i\bU_i\bU_i'\bH_i' \right]\\
172 | & = \var(\bbeta_i) + \E\left[\E\left[\bH_i\bU_i\bU_i'\bH_i'|\bX_i \right]\right]\\
173 | & = \var(\bbeta_i) + \E\left[\bH_i\E\left[\bU_i\bU_i'|\bX_i \right]\bH_i'\right]\\
174 | & = \var(\bbeta_i) + \E\left[\sigma(\bX_i)\bH_i\bH_i'\right].
175 | \end{aligned}
176 | $$
177 |
178 | Observe that the variance $\var(\hat{\bbeta}_i)$ of individual estimators $\hat{\bbeta}_i$ (not $\bbeta_i$!) is identified as
179 | $$
180 | \var(\hat{\bbeta}_i) = \var\left( (\bX_i'\bX_i)^{-1}\bX_i\bY_i \right).
181 | $$
182 |
183 |
184 | Substituting @eq-linear-variance-spherical and rearranging, we obtain the following explicit expression for $\var(\bbeta_i)$:
185 | $$
186 | \begin{aligned}
187 | \var(\bbeta_i) & = \var(\hat{\bbeta}_i) - \E\left[\sigma(\bX_i)\bH_i\bH_i'\right]\\
188 | & = \var\left( (\bX_i'\bX_i)^{-1}\bX_i\bY_i \right)\\
189 | & \quad - \dfrac{1}{T-p}\E\left[ \E[\bY_i'\bM(\bX_i)\bY_i|\bX_i]\bH_i\bH_i'\right].
190 | \end{aligned}
191 | $$ {#eq-linear-variance-variance-explicit}
192 | Note that the right-hand side is a function of the distribution of $(\bY_i, \bX_i)$ — hence identification holds.
193 |
194 | ## Estimation
195 |
196 |
197 |
198 | To construct an estimator for $\var(\bbeta_i)$ based on @eq-linear-variance-variance-explicit, we replace the population expectations with their sample counterparts. Specifically, $\var(\hat{\bbeta}_i)$ is estimated using the sample variance of the individual estimators:
199 | $$
200 | \begin{aligned}
201 | \widehat{\var(\hat{\bbeta}_i) } = \dfrac{1}{N}\sum_{i=1}^N \left( \hat{\bbeta}_i - \hat{\bbeta}_{MG} \right)\left(\hat{\bbeta}_i-\hat{\bbeta}_{MG} \right)'.
202 | \end{aligned}
203 | $$
204 | Likewise, we replace the expectation in the second term of @eq-linear-variance-variance-explicit with a sample average.
205 |
206 | This process yields an estimator for the variance of $\bbeta$:
207 | $$
208 | \begin{aligned}
209 | \widehat{\var(\bbeta_i) } & = \dfrac{1}{N}\sum_{i=1}^N \left( \hat{\bbeta}_i - \hat{\bbeta}_{MG} \right)\left(\hat{\bbeta}_i-\hat{\bbeta}_{MG} \right)'\\
210 | & \quad - \dfrac{1}{(T-p)N}\sum_{i=1}^N \bY_i'\bM(\bX_i)\bY_i\bH_i\bH_i'.
211 | \end{aligned}
212 | $$
213 | Under standard regularity conditions, $\widehat{\var(\bbeta_i) }$ is consistent and (with some extra work) asymptotically normal, enabling inference on the variance of $\bbeta_i$.
214 |
215 | ## Higher-Order Moments and Moving Beyond
216 |
217 | It turns out that a similar strategy can be used to identify the third and higher-order moments of $\bbeta_i$. See @Arellano2012 for the details. The key ingredients of the identification argument for the $k$th moments of $\bbeta_i$ are:
218 |
219 | - $k$th moments (or cumulants) of $\bY_i$ and $\hat{\bbeta}_i$
220 | - Restrictions on the time series dynamics of $\curl{U_{it}}_{t=1}^T$
221 | - Multiplicative separability of the moments of $\bbeta_i$ and $\bU_i$ up to order $k$.
222 |
223 |
224 | However, moments of $\bbeta_i$ may be also be obtained from the full distribution of $\bbeta_i$. Moreover, the distribution may also be used to compute quantiles of $\bbeta_i$ and further policy-relevant parameter. As such, this distribution is our maximal object of interest, and we now turn towards its identification.
225 |
226 |
227 |
228 | ---
229 |
230 | #### Next Section {.unnumbered}
231 |
232 | In the next section, we review characteristic functions and deconvolution — key ingredients used in identification in the distribution of $\bbeta_i$.
--------------------------------------------------------------------------------
/src/linear/linear-distribution.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn to identify the full distribution of heterogeneous coefficients in panel data linear models using deconvolution. (Lecture Notes)"
3 |
4 | open-graph:
5 | description: "Learn to identify the full distribution of heterogeneous coefficients in panel data linear models using deconvolution. (Lecture Notes)"
6 | ---
7 |
8 |
9 | # Distribution of Heterogeneous Coefficients {#sec-linear-distribution}
10 |
11 | ::: {.callout-note appearance="simple" icon=false}
12 |
13 | ## Summary and Learning Outcomes
14 |
15 | This section shows how identify the full distribution of coefficients using a conditional deconvolution argument.
16 |
17 | By the end of this section, you should be able to:
18 |
19 | - Describe the impact of conditional independence assumptions between $\bbeta_i$ and $U_{it}$.
20 | - Identify the distribution of $\bbeta_i$ using a conditional deconvolution argument and assumptions on $U_{it}$.
21 | - Propose a distribution estimator for the case of discrete covariates.
22 | :::
23 |
24 | ## Model and Conditional Independence Assumption
25 |
26 |
27 | ### Model
28 |
29 | We are now in a position to obtain our final and strongest result in this block: identify the full distribution of $\bbeta_i$ in model ([-@eq-lecture_model]):
30 | $$
31 | Y_{it}^{\bx} = \bbeta_i'\bx + U_{it}.
32 | $$
33 | As in section [-@sec-linear-variance], we impose strict exogeneity
34 | $$
35 | \E[\bU_i|\bbeta_i, \bX_i] = 0.
36 | $$
37 | We also assume the existence of the first two moments of $\bbeta_i, \bX_i$, and $\bU_i$.
38 |
39 | As before, the number $T$ of unit-level observations is assumed to exceed the number $p$ of covariates. We treat $T$ as fixed, and consider large-$N$ identification and estimation arguments.
40 |
41 | ### Conditional Independence of $\bbeta_i$ and $\bU_i$
42 |
43 | The key to our identification strategy is the following assumption of conditional independence between $\bbeta_i$ and $\bU_i$:
44 | $$
45 | \bbeta_i \independent \curl{U_{it}}_{t=1}^T |\bX_i
46 | $$ {#eq-linear-distribution-cond-ind}
47 | To understand assumption ([-@eq-linear-distribution-cond-ind]), consider a production function example. Let $U_{it}$ be the measurement error in the output value $Y_{it}$. The variance of $U_{it}$ may depend on the scale of the firm (captured by capital), leading to dependence between $\bX_i$ and $\bU_i$. However, it is plausible that the firm size captures all information about firm technology relevant for measurement error in the value of the firm's output. In this case, the assumption appears reasonable.
48 |
49 | ### Implication of Conditional Independence
50 |
51 | Given the conditional independence assumption ([-@eq-linear-distribution-cond-ind]), both $\bY_i$ and the individual estimators $\hat{\bbeta}_i$ are sums of two conditionally independent vectors. Specifically, conditionally on $\curl{\bX_i=\bX}$:
52 |
53 | - $\bY_i$ is the sum of $\bX\bbeta_i$ and $\bU_i$
54 | - $\hat{\bbeta}_i$ is the sum of $\bbeta_i$ and $(\bX'\bX)^{-1}\bX\bU_i$
55 |
56 | We can write the conditional characteristic function of $\bY_i$ given $\bX_i=\bX$ using properties ([-@eq-linear-chf-independence]) and ([-@eq-linear-chf-product]) as:
57 | $$
58 | \begin{aligned}
59 | \varphi_{\bY_i|\bX_i}(\bs|\bX) & = \varphi_{\bX'\bbeta_i|\bX_i}(\bs|\bX)\varphi_{\bU_i|\bX_i}(\bs|\bX) \\
60 | & = \varphi_{\bbeta_i|\bX_i}(\bX'\bs|\bX)\varphi_{\bU_i|\bX_i}(\bs|\bX).
61 | \end{aligned}
62 | $$ {#eq-linear-distribution-chf-data}
63 | Similarly, the conditional characteristic function of $\hat{\bbeta}_i$ given $\bX_i=\bX$ satisfies
64 | $$
65 | \begin{aligned}
66 | \varphi_{\hat{\bbeta}_i|\bX_i}(\bs|\bX) & = \varphi_{\bbeta_i|\bX_i}(\bs|\bX) \varphi_{\bH_i\bU_i|\bX_i}(\bs|\bX) \\
67 | & = \varphi_{\bbeta_i|\bX_i}(\bs|\bX) \varphi_{\bU_i|\bX_i}(\bX(\bX'\bX)^{-1}\bs|\bX),
68 | \end{aligned}
69 | $$ {#eq-linear-distribution-chf-estimators}
70 | where we again define $\bH_i = (\bX_i'\bX_i)^{-1}\bX_i$.
71 |
72 | ## Identification of the Distribution
73 |
74 | ### Overall Strategy
75 |
76 | To identify the distribution, we proceed similarly to how we identified the variance. The steps are:
77 |
78 | 1. Identify $\varphi_{\bU_i|\bX_i}(\cdot|\bX)$ from @eq-linear-distribution-chf-data.
79 | 2. Apply deconvolution to @eq-linear-distribution-chf-estimators to recover $\varphi_{\bbeta_i|\bX_i}(\bs|\bX)$.
80 | 3. Invert the characteristic function of $\bbeta_i$ to obtain the distribution.
81 |
82 |
83 | ### Equation in Hessians of Characteristic Functions
84 |
85 | We start by rewriting @eq-linear-distribution-chf-data in a more useful form. The characteristic functions in ([-@eq-linear-distribution-chf-data]) are twice differentiable under our moment assumptions. Taking logarithms ([see here](https://math.stackexchange.com/questions/3795356/log-of-a-product-of-characteristic-functions-lindebergs-theorem-and-accompanyi)) and differentiating twice yields
86 | $$
87 | \begin{aligned}
88 | & \dfrac{\partial^2 \log( \varphi_{\bY_i|\bX_i}(\bs|\bX))}{\partial\bs\partial\bs'} \\
89 | & = \bX \dfrac{\partial^2 \log( \varphi_{\bbeta_i|\bX_i}(\bX'\bs|\bX)) }{\partial \bs\partial\bs'} \bX' + \dfrac{\partial^2 \log(\varphi_{\bU_i|\bX_i}(\bs|\bX))}{\partial \bs\partial\bs'} .
90 | \end{aligned}
91 | $$ {#eq-linear-chf-hessian}
92 |
93 | This equation is similar to the expression ([-@eq-linear-variance-second-moment-y]) we obtained for variance. It decomposes the characteristic function of the data into contributions from the coefficients $\bbeta_i$ and the residuals $\bU_i$. Unlike the variance expression, system ([-@eq-linear-chf-hessian]) is a functional equation parametrized by $\bs$.
94 |
95 |
96 |
97 | ### Imposing Structure on the Error Term
98 |
99 |
100 | Our goal is to solve for the second term in the linear system ([-@eq-linear-chf-hessian]). However, like system ([-@eq-linear-variance-second-moment-y]), system ([-@eq-linear-chf-hessian]) is underdetermined. Accordingly, we need to impose additional assumptions to disentangle the $\bU_i$ component from the $\bbeta_i$ one.
101 |
102 | In these notes, we consider a simple assumption that strengthens our temporal homoskedasticity assumption ([-@eq-linear-variance-spherical]). Specifically, we assume that $U_{it}$ is IID across $i$ and $t$ conditional on $\bX_i=\bX$. This assumption implies that all $U_{it}$ have the same characteristic function for all $i$ and $t$:
103 | $$
104 | \varphi_{U_{i1}|\bX_i}(s|\bX) = \cdots = \varphi_{U_{iT}|\bX_i}(s|\bX).
105 | $$ {#eq-linear-distribution-iid-error}
106 | We label the common function $\varphi_{U|\bX_i}(s|\bX)$.
107 |
108 | The characteristic function of the $T$-vector $\bU_i$ can be written as
109 | $$
110 | \begin{aligned}
111 | \varphi_{\bU_i|\bX_i}(\bs|\bX) & = \prod_{j=1}^T \varphi_{U|\bX_i}(s_j|\bX), \\
112 | \bs & = (s_1, s_2, \dots, s_T).
113 | \end{aligned}
114 | $$
115 | Taking logarithms turns the product into a sum:
116 | $$
117 | \log\left(\varphi_{\bU_i|\bX_i}(\bs|\bX)\right) = \sum_{j=1}^T \log(\varphi_{U|\bX_i}(s_j|\bX)).
118 | $$
119 | The Hessian of this function with respect to $\bs$ is diagonal:
120 | $$
121 | \begin{aligned}
122 | \dfrac{\partial^2 \log(\varphi_{\bU_i|\bX_i}(\bs|\bX))}{\partial \bs\partial\bs'} & = \diag\curl{\bphi(\bs)},\\
123 | \end{aligned}
124 | $$
125 | where
126 | $$
127 | \bphi(\bs) = \left(\dfrac{d^2\log(\varphi_{U|\bX_i}(s_1|\bX))}{ds_1^2}, \dots, \dfrac{d^2\log(\varphi_{U|\bX_i}(s_T|\bX))}{ds_T^2}\right).
128 | $$
129 | To summarize, assumption ([-@eq-linear-distribution-iid-error]) reduces the unknown $T\times T$ matrix $\frac{\partial^2 \log(\varphi_{\bU_i|\bX_i}(\bs|\bX))}{\partial \bs\partial\bs'}$ to an unknown $T$-vector $\bphi(\bs)$. There are now sufficiently many equations to cover all the remaining unknown components, provided standard rank conditions hold.
130 |
131 |
132 | ### Solving for the Distribution of Residuals
133 |
134 | To solve for $\bphi(\bs)$, we return to ([-@eq-linear-chf-hessian]). We first put it into more familiar tall form (one line, one equation) using the vectorization operator. Applying the vectorization operator yields
135 | $$
136 | \begin{aligned}
137 | & \vecc\left(\dfrac{\partial^2 \log( \varphi_{\bY_i|\bX_i}(\bs|\bX))}{\partial\bs\partial\bs'}\right) \\
138 | & = (\bX \otimes \bX) \vecc\left(\dfrac{\partial^2 \log( \varphi_{\bbeta_i|\bX_i}(\bX'\bs|\bX)) }{\partial \bs\partial\bs'}\right) + \bA\bphi(\bs),
139 | \end{aligned}
140 | $$ {#eq-linear-chf-hessian-vectorized}
141 | where an explicit formula for $\bA$ can be found [here](https://math.stackexchange.com/questions/3365228/vectorization-of-a-diagonal-matrix).
142 |
143 | Now we premultiply system ([-@eq-linear-chf-hessian-vectorized]) by $\bM(\bX\otimes \bX)$ where $\bM(\cdot)$ is defined in ([-@eq-linear-variance-annihilator]):
144 | $$
145 | \begin{aligned}
146 | & \bM(\bX\otimes \bX) \vecc\left(\dfrac{\partial^2 \log( \varphi_{\bY_i|\bX_i}(\bs|\bX))}{\partial\bs\partial\bs'}\right)
147 | \\ & = \bM(\bX\otimes \bX)\bA\bphi(\bs)
148 | \end{aligned}
149 | $$ {#eq-linear-distribution-chf-u}
150 | We can solve this system for $\bphi(\bs)$ provided $\rank(\bM(\bX\otimes \bX)\bA)=T$. Indeed, this rank condition holds in this case, as shown by @Arellano2012. As both $\bM(\bX\otimes\bX)$ and $\varphi_{\bY_i|\bX_i}(\cdot|\cdot)$ are identified, we conclude that $\bphi(\bs)$ is also identified.
151 |
152 |
153 | The characteristic function of $\bU_i$ is now straighforward to recover from $\bphi(\bs)$ by integrating twice with respect to $\bs$. As $\bphi(\bs)$ encodes second derivatives, we need two initial values. These initial values are provided by the properties of the characteristic function and the assumption of strict exogeneity:
154 | $$
155 | \begin{aligned}
156 | \dfrac{\partial \log(\varphi_{\bU_i|\bX_i}(0|\bX))}{\partial\bs'} & = \E[\bU_i|\bX_i=\bX] = 0,\\
157 | \log(\varphi_{\bU_i|\bX_i}(0|\bX)) & = 0.
158 | \end{aligned}
159 | $$
160 | This completes the first identification step.
161 |
162 | ### Identifying the Distribution of Coefficients
163 |
164 | For the second step — identification of $\varphi_{\bbeta_i|\bX_i}$ — we return to @eq-linear-distribution-chf-estimators. We make an additional assumption:
165 | $$
166 | \varphi_{\bU_i|\bX_i}(\bs|\bX)\neq 0 \text{ for all }\bs.
167 | $$
168 | This assumption allows us to divide by the characteristic function of $\bU_i$ in @eq-linear-distribution-chf-estimators and obtain
169 | $$
170 | \varphi_{\bbeta_i|\bX_i}(\bs|\bX) = \dfrac{\varphi_{\hat{\bbeta}_i|\bX_i}(\bs|\bX) }{\varphi_{\bU_i|\bX_i}(\bX(\bX'\bX)^{-1}\bs|\bX)}.
171 | $$ {#eq-linear-distribution-distr-chf}
172 |
173 |
174 | Finally, the density or cumulative distribution functions of the coefficients may be recovered using inversion formulae. For continuously distributed coefficients, the conditional density is:
175 | $$
176 | f_{\bbeta_i|\bX_i}(\bb|\bX) = \dfrac{1}{(2\pi)^n} \int_{\R^p} \exp(-i\bs'\bb)\varphi_{\bbeta_i|\bX_i}(\bs|\bX)d\bs.
177 | $$
178 | Last, we can recover the unconditional distribution of the coefficients since we know the marginal distribution of $\bX_i$. For example, if $f_{\bX_i}$ is the marginal density, the unconditional density of $\bbeta_i$ is obtained by simply integrating $\bX_i$ out as
179 | $$
180 | f_{\bbeta_i}(\bb) = \int f_{\bbeta_i|\bX_i}(\bb|\bX)f_{\bX_i}(\bX)d\bX.
181 | $$
182 |
183 | ## Estimation
184 |
185 | ### With Discrete Covariates
186 |
187 |
188 | For estimation, we discuss the conceptually simpler case where $\bX_i$ has finite support. In such a setting, there is a non-zero probability that $\bX_i$ takes each value in its support.
189 |
190 | Estimation proceeds in three steps:
191 |
192 | 1. Estimation of $\varphi_{\hat{\bbeta}_i|\bX_i}(\cdot|\bX)$.
193 | 2. Estimation of $\varphi_{\bU_i|\bX_i}(\cdot|\bX)$.
194 | 3. Combining the estimators of the first two steps using @eq-linear-distribution-distr-chf and inverting the resulting estimated characteristic function.
195 |
196 | The characteristic function of the individual estimators $\hat{\bbeta}_i$ can be estimated with the empirical characteristic function on the sample of units with $\bX_i=\bX$:
197 | $$
198 | \hat{\varphi}_{\hat{\bbeta}_i|\bX_i}(\bs|\bX) = \dfrac{1 }{\sum_{i=1}^N \I\curl{\bX_i=\bX} }\sum_{i=1}^N \I\curl{\bX_i=\bX} \exp\left( i\bs'\hat{\bbeta}_i \right).
199 | $$
200 |
201 | As for the characteristic function of $\bU_i$, it can be estimated from a sample version of @eq-linear-distribution-chf-u. We replace the characteristic function of the data with its empirical counterpart:
202 | $$
203 | \hat{\varphi}_{\bY_i|\bX_i}(\bs|\bX) = \dfrac{1 }{\sum_{i=1}^N \I\curl{\bX_i=\bX} }\sum_{i=1}^N \I\curl{\bX_i=\bX} \exp\left( i\bs'\bY_i \right).
204 | $$
205 |
206 |
207 |
208 |
209 |
210 | ### With Continuous Covariates
211 |
212 | If $\bX_i$ is continuously distributed, it is instead necessary to estimate the characteristic functions using techniques such as kernel regression. @Evdokimov2010 studies such conditional deconvolution estimators and their asymptotic properties. Inference may be conducted using the results of @Kato2021RobustInferenceDeconvolutiona.
213 |
214 | ::: {.callout-note appearance="simple" icon=false}
215 |
216 | Such nonparametric estimators may perform poorly due to the curse of dimensionality if $T$ and $p$ are not small. In the next block we discuss some assumptions that can reduce the dimensionality of the problem and be applied in this context.
217 |
218 | :::
219 |
220 |
221 |
222 | ---
223 |
224 | #### Next Section {.unnumbered}
225 |
226 | In the next section, we briefly conclude the block and discuss some further results on heterogeneous linear models.
--------------------------------------------------------------------------------
/src/linear/linear-dynamic-panel-iv.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | description: "Learn about instrumental variable estimators for linear dynamic panels: Anderson-Hsiao, Arellano-Bond, and others. Lecture notes."
3 | open-graph:
4 | description: "Learn about instrumental variable estimators for linear dynamic panels: Anderson-Hsiao, Arellano-Bond, and others. Lecture notes."
5 | ---
6 |
7 | # Interlude: Standard Dynamic Panel Estimators
8 |
9 |
10 | ::: {.callout-note appearance="simple" icon=false}
11 |
12 | ## Summary and Learning Outcomes
13 |
14 | This section discusses why strict exogeneity fails in dynamic models and introduces the "workhorse" dynamic panel instrumental variable estimators.
15 |
16 | By the end of this section, you should be able to:
17 |
18 | - Understand why strict exogeneity fails in dynamic panel models.
19 | - Differentiate between strict and sequential exogeneity.
20 | - Explain the endogeneity problem in first-differenced and within estimators.
21 | - Describe IV-based solutions such as the @Anderson1982 and the @Arellano1991 estimators.
22 | :::
23 |
24 | ## Exogeneity and Dynamic Models
25 |
26 | ### Introduction
27 |
28 | Throughout the previous section, we assumed that the idiosyncratic term $U_{it}$ satisfied strict exogeneity with respect to the data:
29 | $$
30 | \E[U_{it}|\bX_i] = 0.
31 | $${#eq-dynamic-interlude-strict-orthogonality}
32 |
33 | However, strict exogeneity is not an innocent assumption. In particular, it implies that for all pairs of indices $s, t$ it holds that
34 | $$
35 | \E[U_{it}\bX_{is}] =0.
36 | $$ {#eq-dynamic-interlude-strict-orthogonality}
37 |
38 | For $t