├── .gitignore ├── README.md ├── ScPo-advanced.Rproj ├── css ├── scpo-fonts.css └── scpo.css ├── img ├── ISLR │ └── Chapter2 │ │ ├── 2.1.pdf │ │ ├── 2.10.pdf │ │ ├── 2.10.png │ │ ├── 2.11.pdf │ │ ├── 2.11.png │ │ ├── 2.12.pdf │ │ ├── 2.12.png │ │ ├── 2.13.pdf │ │ ├── 2.14.pdf │ │ ├── 2.15.pdf │ │ ├── 2.16.pdf │ │ ├── 2.17.pdf │ │ ├── 2.2.pdf │ │ ├── 2.3.pdf │ │ ├── 2.3.png │ │ ├── 2.4.pdf │ │ ├── 2.4.png │ │ ├── 2.5.pdf │ │ ├── 2.5.png │ │ ├── 2.6.pdf │ │ ├── 2.6.png │ │ ├── 2.7.pdf │ │ ├── 2.7.png │ │ ├── 2.8.pdf │ │ ├── 2.8.png │ │ ├── 2.9.pdf │ │ ├── 2.9.png │ │ └── app.gif ├── IV-dag.png ├── Kensington_slums_large.jpg ├── clustering │ ├── c1.png │ ├── c10.png │ ├── c2.png │ ├── c3.png │ ├── c4.png │ ├── c5.png │ ├── c6.png │ ├── c7.png │ ├── c8.png │ └── c9.png ├── crime-dag.png ├── crime-dag2.png ├── ex │ └── title.png ├── father-thames.jpg ├── gifs │ ├── alert.png │ ├── help.png │ ├── panel.gif │ ├── ray-paris.mp4 │ ├── ray.mp4 │ ├── ray.png │ └── wages.gif ├── logo │ ├── ScPo-econ.png │ ├── ScPo-shield.png │ ├── dplyr.svg │ ├── ggplot2.svg │ ├── magrittr.svg │ └── r-datatable.svg ├── photos │ ├── SSR_cone.png │ ├── Smoking_lung_cancer.png │ ├── adjusted_death_rates.png │ ├── age_by_smoking_status.png │ ├── bootstrap1.JPG │ ├── bootstrap2.JPG │ ├── ci_diagram.png │ ├── correlation_funny.png │ ├── ex_cigar_subclassif.png │ ├── fundamental_pb_inference.png │ ├── fusilli-tricolore.png │ ├── gt_error_table.png │ ├── gt_error_table_ht.png │ ├── hist_building.gif │ ├── hist_building_vline.gif │ ├── ht.png │ ├── manip_1.png │ ├── manip_2.png │ ├── md-bank.jpg │ ├── md-bank2.jpg │ ├── md-pennies.jpg │ ├── min_wage_parallel_trends.png │ ├── nj_penn_map.png │ ├── pasta │ │ ├── pasta_bowl.JPG │ │ ├── sample1.JPG │ │ ├── sample10.JPG │ │ ├── sample11.JPG │ │ ├── sample12.JPG │ │ ├── sample13.JPG │ │ ├── sample14.JPG │ │ ├── sample15.JPG │ │ ├── sample16.JPG │ │ ├── sample17.JPG │ │ ├── sample18.JPG │ │ ├── sample19.JPG │ │ ├── sample2.JPG │ │ ├── sample3.JPG │ │ ├── sample4.JPG │ │ ├── sample5.JPG │ │ ├── sample6.JPG │ │ ├── sample7.JPG │ │ ├── sample8.JPG │ │ └── sample9.JPG │ ├── pasta1.JPG │ ├── pasta2.JPG │ ├── pasta3.JPG │ ├── pasta4.JPG │ ├── pasta5.JPG │ ├── pasta6.JPG │ ├── power.png │ ├── raw_death_rates.png │ ├── spurious.png │ ├── standard_normal_distrib.png │ ├── transition.png │ └── visualize.png ├── simulation-scatter-1.png ├── slum.jpg ├── snow-map.jpg └── snow-supply.jpg ├── js └── ru_xaringan.js ├── lectures ├── 00-DID │ ├── chapter_did.Rmd │ ├── chapter_did.html │ ├── chapter_did.pdf │ ├── chapter_did_files │ │ └── figure-html │ │ │ ├── unnamed-chunk-10-1.svg │ │ │ ├── unnamed-chunk-11-1.svg │ │ │ ├── unnamed-chunk-110-1.svg │ │ │ ├── unnamed-chunk-111-1.svg │ │ │ ├── unnamed-chunk-112-1.svg │ │ │ ├── unnamed-chunk-113-1.svg │ │ │ ├── unnamed-chunk-114-1.svg │ │ │ ├── unnamed-chunk-115-1.svg │ │ │ ├── unnamed-chunk-116-1.svg │ │ │ ├── unnamed-chunk-117-1.svg │ │ │ ├── unnamed-chunk-118-1.svg │ │ │ ├── unnamed-chunk-119-1.svg │ │ │ ├── unnamed-chunk-12-1.svg │ │ │ ├── unnamed-chunk-120-1.svg │ │ │ ├── unnamed-chunk-121-1.svg │ │ │ ├── unnamed-chunk-122-1.svg │ │ │ ├── unnamed-chunk-123-1.svg │ │ │ ├── unnamed-chunk-124-1.svg │ │ │ ├── unnamed-chunk-125-1.svg │ │ │ ├── unnamed-chunk-126-1.svg │ │ │ ├── unnamed-chunk-13-1.svg │ │ │ ├── unnamed-chunk-14-1.svg │ │ │ ├── unnamed-chunk-15-1.svg │ │ │ ├── unnamed-chunk-16-1.svg │ │ │ ├── unnamed-chunk-17-1.svg │ │ │ ├── unnamed-chunk-18-1.svg │ │ │ ├── unnamed-chunk-19-1.svg │ │ │ ├── unnamed-chunk-20-1.svg │ │ │ ├── unnamed-chunk-20-2.svg │ │ │ ├── unnamed-chunk-21-1.svg │ │ │ ├── unnamed-chunk-22-1.svg │ │ │ ├── unnamed-chunk-23-1.svg │ │ │ ├── unnamed-chunk-24-1.svg │ │ │ ├── unnamed-chunk-5-1.svg │ │ │ ├── unnamed-chunk-6-1.svg │ │ │ ├── unnamed-chunk-7-1.svg │ │ │ ├── unnamed-chunk-8-1.svg │ │ │ └── unnamed-chunk-9-1.svg │ ├── img │ │ └── logo │ │ │ └── ScPo-shield.png │ └── libs │ │ ├── elevate-section-attrs │ │ └── elevate-section-attrs.js │ │ ├── header-attrs │ │ └── header-attrs.js │ │ ├── jquery │ │ └── jquery.min.js │ │ ├── kePrint │ │ └── kePrint.js │ │ ├── lightable │ │ └── lightable.css │ │ └── remark-css │ │ └── default.css ├── 01-recap │ ├── libs │ │ ├── header-attrs │ │ │ └── header-attrs.js │ │ └── remark-css │ │ │ └── default.css │ ├── recap1.Rmd │ ├── recap1.html │ └── recap1_files │ │ └── figure-html │ │ ├── biased pdf-1.svg │ │ ├── competing pdfs-1.svg │ │ ├── ex_bad_exog-1.svg │ │ ├── ex_good_exog-1.svg │ │ ├── example: pdf 2-1.svg │ │ ├── example: pdf 3-1.svg │ │ ├── example: pdf-1.svg │ │ ├── ols vs lines 1-1.svg │ │ ├── ols vs lines 3-1.svg │ │ ├── ols vs lines 4-1.svg │ │ ├── ols vs lines 5-1.svg │ │ ├── ols vs lines 6-1.svg │ │ ├── ols vs lines 7-1.svg │ │ ├── plot ovb 1-1.svg │ │ ├── plot ovb 2-1.svg │ │ ├── plot ovb 3-1.svg │ │ ├── plot ovb 4-1.svg │ │ ├── plot ovb 5-1.svg │ │ ├── pop1-1.svg │ │ ├── sample1 scatter-1.svg │ │ ├── sample1-1.svg │ │ ├── sample2 scatter-1.svg │ │ ├── sample2-1.svg │ │ ├── sample3 scatter-1.svg │ │ ├── sample3-1.svg │ │ ├── scatter1-1.svg │ │ ├── simulation ci-1.svg │ │ ├── simulation p plot-1.svg │ │ ├── simulation scatter-1.png │ │ ├── simulation scatter2-1.png │ │ ├── simulation t plot-1.svg │ │ ├── t dist-1.svg │ │ ├── unbiased pdf-1.svg │ │ ├── variance bias-1.svg │ │ ├── variance pdf-1.svg │ │ └── vs lines 2-1.svg ├── 02-recap │ ├── libs │ │ ├── header-attrs │ │ │ └── header-attrs.js │ │ └── remark-css │ │ │ └── default.css │ ├── recap2.Rmd │ ├── recap2.html │ ├── recap2_files │ │ └── figure-html │ │ │ ├── dag1-1.svg │ │ │ ├── dat plot 1-1.svg │ │ │ ├── dat plot 2-1.svg │ │ │ ├── int plot 1-1.svg │ │ │ ├── int plot 2-1.svg │ │ │ ├── log linear plot-1.svg │ │ │ ├── log log plot-1.svg │ │ │ ├── plot ovb 1-1.svg │ │ │ ├── plot ovb 2-1.svg │ │ │ ├── plot ovb 3-1.svg │ │ │ ├── plot ovb 4-1.svg │ │ │ ├── plot ovb 5-1.svg │ │ │ ├── simulation ci-1.svg │ │ │ ├── t dist-1.svg │ │ │ ├── unnamed-chunk-4-1.svg │ │ │ ├── unnamed-chunk-5-1.svg │ │ │ ├── venn2-1.svg │ │ │ └── venn_iv-1.svg │ └── star1-1.png ├── 03-datatable │ ├── 03-datatable.Rmd │ ├── 03-datatable.html │ ├── 03-datatable_files │ │ └── figure-html │ │ │ └── storms_ggplot-1.png │ └── libs │ │ ├── cols.css │ │ ├── cols_macro.js │ │ ├── header-attrs │ │ └── header-attrs.js │ │ └── remark-css │ │ ├── default.css │ │ ├── metropolis-fonts.css │ │ └── metropolis.css ├── 04-IV │ ├── 04-IV.Rmd │ ├── 04-IV.html │ ├── 04-IV_files │ │ └── figure-html │ │ │ ├── dag1-1.svg │ │ │ ├── unnamed-chunk-2-1.svg │ │ │ ├── unnamed-chunk-3-1.svg │ │ │ ├── unnamed-chunk-4-1.svg │ │ │ └── unnamed-chunk-5-1.svg │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ └── remark-css │ │ └── default.css ├── 05-IV2 │ ├── 05-IV2.Rmd │ ├── 05-IV2.html │ ├── 05-IV2_files │ │ └── figure-html │ │ │ ├── IV-dag2-1.svg │ │ │ ├── ak-mod-1.svg │ │ │ ├── ak91-dummy-1.svg │ │ │ ├── ak91-wage-1.svg │ │ │ ├── mincer-1.svg │ │ │ ├── mincer2-1.svg │ │ │ ├── mincer3-1.svg │ │ │ ├── mincer4-1.svg │ │ │ └── se-plot-1.svg │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ ├── kePrint │ │ └── kePrint.js │ │ ├── lightable │ │ └── lightable.css │ │ └── remark-css │ │ └── default.css ├── 06-panel │ ├── 06-panel.Rmd │ ├── 06-panel.html │ ├── 06-panel_files │ │ └── figure-html │ │ │ ├── cri-dag-1.svg │ │ │ ├── cri-dag2-1.svg │ │ │ ├── dummy-1.svg │ │ │ ├── unnamed-chunk-10-1.svg │ │ │ ├── unnamed-chunk-15-1.svg │ │ │ ├── unnamed-chunk-4-1.svg │ │ │ ├── unnamed-chunk-8-1.svg │ │ │ └── unnamed-chunk-9-1.svg │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ ├── kePrint │ │ └── kePrint.js │ │ ├── lightable │ │ └── lightable.css │ │ └── remark-css │ │ └── default.css ├── 07-probit │ ├── 07-probit.Rmd │ ├── 07-probit.html │ ├── 07-probit_files │ │ └── figure-html │ │ │ ├── cdfs-1.svg │ │ │ ├── saturated-1.svg │ │ │ ├── unnamed-chunk-1-1.svg │ │ │ ├── unnamed-chunk-11-1.svg │ │ │ └── unnamed-chunk-3-1.svg │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ ├── kePrint │ │ └── kePrint.js │ │ ├── lightable │ │ └── lightable.css │ │ └── remark-css │ │ └── default.css ├── 08-learning │ ├── 08-learning.Rmd │ ├── 08-learning.html │ ├── imgs │ │ ├── 2.1.pdf │ │ ├── 2.10.pdf │ │ ├── 2.10.png │ │ ├── 2.11.pdf │ │ ├── 2.11.png │ │ ├── 2.12.pdf │ │ ├── 2.12.png │ │ ├── 2.13.pdf │ │ ├── 2.14.pdf │ │ ├── 2.15.pdf │ │ ├── 2.16.pdf │ │ ├── 2.17.pdf │ │ ├── 2.2.pdf │ │ ├── 2.3.pdf │ │ ├── 2.3.png │ │ ├── 2.4.pdf │ │ ├── 2.4.png │ │ ├── 2.5.pdf │ │ ├── 2.5.png │ │ ├── 2.6.pdf │ │ ├── 2.6.png │ │ ├── 2.7.pdf │ │ ├── 2.7.png │ │ ├── 2.8.pdf │ │ ├── 2.8.png │ │ ├── 2.9.pdf │ │ ├── 2.9.png │ │ └── app.gif │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ └── remark-css │ │ └── default.css ├── 09-unsupervised │ ├── 09-unsupervised.Rmd │ ├── 09-unsupervised.html │ ├── 09-unsupervised_files │ │ └── figure-html │ │ │ ├── unnamed-chunk-11-1.svg │ │ │ ├── unnamed-chunk-12-1.svg │ │ │ ├── unnamed-chunk-13-1.svg │ │ │ ├── unnamed-chunk-14-1.svg │ │ │ ├── unnamed-chunk-15-1.svg │ │ │ ├── unnamed-chunk-16-1.svg │ │ │ ├── unnamed-chunk-17-1.svg │ │ │ ├── unnamed-chunk-18-1.svg │ │ │ ├── unnamed-chunk-19-1.svg │ │ │ ├── unnamed-chunk-2-1.svg │ │ │ ├── unnamed-chunk-20-1.svg │ │ │ ├── unnamed-chunk-21-1.svg │ │ │ ├── unnamed-chunk-22-1.svg │ │ │ ├── unnamed-chunk-23-1.svg │ │ │ ├── unnamed-chunk-24-1.svg │ │ │ ├── unnamed-chunk-25-1.svg │ │ │ ├── unnamed-chunk-26-1.svg │ │ │ ├── unnamed-chunk-27-1.svg │ │ │ ├── unnamed-chunk-28-1.svg │ │ │ ├── unnamed-chunk-29-1.svg │ │ │ ├── unnamed-chunk-3-1.svg │ │ │ ├── unnamed-chunk-30-1.svg │ │ │ ├── unnamed-chunk-31-1.svg │ │ │ ├── unnamed-chunk-32-1.svg │ │ │ ├── unnamed-chunk-33-1.svg │ │ │ ├── unnamed-chunk-34-1.svg │ │ │ ├── unnamed-chunk-36-1.svg │ │ │ ├── unnamed-chunk-37-1.svg │ │ │ ├── unnamed-chunk-38-1.svg │ │ │ ├── unnamed-chunk-39-1.svg │ │ │ ├── unnamed-chunk-4-1.svg │ │ │ ├── unnamed-chunk-40-1.svg │ │ │ ├── unnamed-chunk-41-1.svg │ │ │ ├── unnamed-chunk-6-1.svg │ │ │ └── unnamed-chunk-8-1.svg │ └── libs │ │ ├── header-attrs │ │ └── header-attrs.js │ │ └── remark-css │ │ └── default.css └── template │ ├── learning.R │ ├── libs │ └── remark-css │ │ └── default.css │ ├── pca.R │ ├── template.Rmd │ └── template.html ├── libs ├── partials │ └── header.html ├── remark-css-0.0.1 │ └── default.css └── remark-css │ └── default.css └── rds ├── balls_percentile_cis.rds ├── iris_inc.rds ├── iris_shapefile_2015.dbf ├── iris_shapefile_2015.prj ├── iris_shapefile_2015.rds ├── iris_shapefile_2015.shp ├── iris_shapefile_2015.shx ├── pasta_percentile_cis.rds └── shuffled_data.rds /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | *_cache 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **Advanced Econometrics at SciencesPo** 2 | 3 | This is the syllabus for the 2nd year course *advanced econometrics* offered by the department of economics at SciencesPo Paris. 4 | 5 | ## Prerequisites 6 | 7 | You need to have taken the course [**Introduction to Econometrics with R**](https://scpoecon.github.io/ScPoEconometrics/) at SciencesPo. Alternatively, if you are an exchange student, you need to have taken a course that covers the same syllabus. You will have to make sure that you are familiar with `R` knowledge we accumulate in that course as well. 8 | 9 | ## Overview 10 | 11 | We continue with our practical approach to learning Econometrics and R where we left it in the introductory part “Introduction to Econometrics with R”. We will learn about an important method to establish casual relationships in non-experimental data, called “Instrumental Variables”. We will learn about panel data, that is, data which tracks individuals over time. We will look at situations when our outcome data is discrete in nature, like “subject i chose option A (and not B)”. And we will look at a range of simple machine learning methods which are helpful for classification and prediction tasks. 12 | 13 | 14 | ## Syllabus and Slides 15 | 16 | Notice that several of those lectures extend over two sessions. 17 | 18 | 19 | Lecture 0: Introduction and contiuation from intro course: Difference-in-Differences [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/00-DID/chapter_did.html)] 20 | 21 | Lecture 1: Introduction, Logistics and Recap 1 from intro course. Uncertainty in regression estimates, orthogonality of error, BLUE property. [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/01-recap/recap1.html)] 22 | 23 | Lecture 2: Recap 2 from intro course. What's a *model*, omitted variable bias, interpreting coefficients, the log transformation [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/02-recap/recap2.html)] 24 | 25 | Lecture 3: intro to the `data.table` package [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/03-datatable/03-datatable.html)] 26 | 27 | Lecture 4: Instrumental Variables and Causality 1. John Snow's Cholera Experiment as a motivation for the IV estimator, using a DAG to think about the exclusion restriction, the Wald estimator. [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/04-IV/04-IV.html)] 28 | 29 | Lecture 5: Instrumental Variables and Causality 2. 2SLS, returns to schooling and ability bias, replicating Angrist and Krueger (1991), IV mechanics, identification and inference, weak instruments [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/05-IV2/05-IV2.html)] 30 | 31 | Lecture 6: Panel Data 1: What, How and Why? Application to crime rates at county level, within and between variation, the within transformation, running panel regressions in R [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/06-panel/06-panel.html)] 32 | 33 | Lecture 7: Discrete Outcomes: Logit and Probit. Bernoulli reminder, Mroz dataset, the linear probability model, the saturated LPM, logit and probit marginal effects, Goodness of fit in non-linear binary response models. [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/07-probit/07-probit.html)] 34 | 35 | Lecture 8: Intro to Statistical (or *Machine*) Learning 1: the bias-variance-tradeoff, taxonomy of methods, parametric vs non-parametric, linear vs nonlinear, relationship between variance, bias and MSE [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/08-learning/08-learning.html)] 36 | 37 | Lecture 9: Intro to Statistical (or *Machine*) Learning 2: Subset selection (Lasso and Ridge regressions), unsupervised learning (PCA and K-means clustering) [[HTML](https://raw.githack.com/ScPoEcon/Advanced-Metrics-slides/master/lectures/09-unsupervised/09-unsupervised.html)] 38 | 39 | ## Legal 40 | 41 | You can copy and adapt this material for your purposes, as long as you give appropriate credit and share the work yourself under same terms. Of course you can use the slides to teach in your classrooms. *Appropriate Credit* means that somewhere in your slides there is link back to this repo, indicating that this is what you are building upon. Click on the icon for details. 42 | 43 | Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 44 | 45 | ## How to build 46 | 47 | * These are simply Rmarkdown slides. 48 | * So, in Rstudio, just click *knit*. 49 | * To print slides as PDF, do 50 | ```decktape chapter1.html chapter1.pdf --chrome-arg=--disable-web-security``` 51 | using the awesome [decktape](https://github.com/astefanutti/decktape) 52 | -------------------------------------------------------------------------------- /ScPo-advanced.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: No 4 | SaveWorkspace: No 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 4 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | -------------------------------------------------------------------------------- /css/scpo-fonts.css: -------------------------------------------------------------------------------- 1 | /* Add maven for code font (keep other xaringan defaults */ 2 | @import url(https://fonts.googleapis.com/css?family=Inconsolata); 3 | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); 4 | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); 5 | @import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700); 6 | 7 | body { font-family: 'Droid Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC', serif; } 8 | h1, h2, h3 { 9 | font-family: 'Yanone Kaffeesatz'; 10 | font-weight: normal; 11 | } 12 | 13 | .remark-code { 14 | font-family: 'Inconsolata', monospace; 15 | color: #515151; 16 | /*color: #818181;*/ 17 | /*color: rgb(249, 38, 114);*/ 18 | } 19 | 20 | .remark-inline-code { 21 | font-family: 'Inconsolata', monospace; 22 | color: #515151; 23 | background-color: rgba(217, 5, 2, 0.2); 24 | border-radius: 5px; /* Making border radius */ 25 | width: auto; /* Making auto-sizable width */ 26 | height: auto; /* Making auto-sizable height */ 27 | padding: 0px 2px 1px 2px; /*Making space around letters */ 28 | /*color: #818181;*/ 29 | /*color: rgb(249, 38, 114);*/ 30 | } 31 | .remark-code-line-highlighted { background-color: #ffff88; } 32 | -------------------------------------------------------------------------------- /css/scpo.css: -------------------------------------------------------------------------------- 1 | /* 2 | CSS for xaringan slides in RU flavor 3 | Author: Joseph V. Casillas 4 | Updated: 03/06/2018 5 | 6 | Modified by Florian Oswald for ScPo 7 | 18/08/2019 8 | */ 9 | 10 | /* Package defaults that we slightly tweak */ 11 | 12 | .remark-slide-content { font-size: 23px; } 13 | 14 | pre { 15 | display: block; 16 | font-family: monospace; 17 | white-space: pre; 18 | margin-top: 0em; 19 | margin-right: 0px; 20 | margin-bottom: 0.3em; 21 | margin-left: 0px; 22 | } 23 | 24 | a, a > code { 25 | color: #d90502; 26 | text-decoration: none; 27 | 28 | } 29 | 30 | 31 | /* slightly lower and bigger than default */ 32 | .footnote { 33 | position: absolute; 34 | bottom: 1em; 35 | padding-right: 4em; 36 | font-size: 85%; 37 | } 38 | 39 | /* important code slightly red 40 | .remark-code-line-highlighted { 41 | background-color: #FFD3DE !important; 42 | } 43 | */ 44 | 45 | /* color tweak */ 46 | .inverse { 47 | background-color: #ffebf0; 48 | color: #353632; 49 | text-shadow: none; 50 | } 51 | 52 | /* slightly spacing change */ 53 | .inverse h1, .inverse h2, .inverse h3 { 54 | color: #0729a6; 55 | line-height: 1.0em; 56 | } 57 | 58 | .inverse remark-code-line { 59 | background-color: #e0e1df; 60 | } 61 | 62 | /* Two-column layout (slightly wider for aspect ration) */ 63 | .left-column { 64 | color: #777; 65 | width: 25%; 66 | height: 92%; 67 | float: left; 68 | } 69 | 70 | .left-column h2:last-of-type, .left-column h3:last-child { 71 | color: #000; 72 | } 73 | 74 | /* slightly thiner to suppor aspect ration */ 75 | .right-column { 76 | width: 70%; 77 | float: right; 78 | padding-top: 1em; 79 | } 80 | 81 | /* Two-column layout (wide left col) */ 82 | .left-wide { 83 | width: 70%; 84 | float: left; 85 | } 86 | 87 | .right-thin { 88 | width: 30%; 89 | float: right; 90 | } 91 | 92 | /* Two-column layout (wide left col) */ 93 | .right-wide { 94 | width: 70%; 95 | float: right; 96 | } 97 | 98 | .left-thin { 99 | width: 30%; 100 | float: left; 101 | } 102 | 103 | .pull-left { 104 | float: left; 105 | width: 48%; 106 | } 107 | 108 | .pull-right { 109 | float: right; 110 | width: 48%; 111 | } 112 | 113 | .center { 114 | margin: auto; 115 | width: 60%; 116 | padding: 10px; 117 | text-align: center; 118 | } 119 | 120 | .pull-right ~ * { 121 | clear: both; 122 | } 123 | 124 | img, video, iframe { 125 | max-width: 100%; 126 | } 127 | 128 | blockquote { 129 | border-left: solid 5px lightgray; 130 | padding-left: 1em; 131 | } 132 | 133 | /* removed RU table adjustments*/ 134 | 135 | 136 | /* leave this alone */ 137 | @page { margin: 0; } 138 | @media print { 139 | .remark-slide-scaler { 140 | width: 100% !important; 141 | height: 100% !important; 142 | transform: scale(1) !important; 143 | top: 0 !important; 144 | left: 0 !important; 145 | } 146 | } 147 | 148 | /*~~~~~~~~~~~~~~*/ 149 | /* RU additions */ 150 | /*~~~~~~~~~~~~~~*/ 151 | 152 | /* Title slide */ 153 | 154 | /* Add image and change bg color */ 155 | 156 | /* changing background image to ScPo*/ 157 | .title-slide { 158 | background-image: url("../img/logo/ScPo-econ.png"); 159 | background-position: 9% 30%; 160 | background-size: 300px; 161 | background-color: #fff; 162 | padding-left: 100px; /* delete this for 4:3 aspect ratio */ 163 | } 164 | 165 | /* H1 fonts */ 166 | .title-slide h1 { 167 | color: #515151; 168 | padding-top: 250px; 169 | font-weight: normal; 170 | font-size: 45px; 171 | line-height: 0.05; 172 | text-align: left; 173 | text-shadow: none; 174 | padding-bottom: 18px; 175 | margin-bottom: 18px; 176 | } 177 | 178 | /* H2 fonts */ 179 | .title-slide h2 { 180 | color: #d90502; 181 | font-size: 35px; 182 | text-align: left; 183 | text-shadow: none; 184 | padding-top: 0px; 185 | margin-top: 0px; 186 | } 187 | 188 | /* H3 fonts */ 189 | .title-slide h3 { 190 | font-size: 28px; 191 | font-weight: normal; 192 | color: #666666; 193 | text-align: left; 194 | text-shadow: none; 195 | padding: 0px; 196 | margin: 0px; 197 | line-height: 1; 198 | } 199 | 200 | /* Remove slide count */ 201 | .title-slide .remark-slide-number { 202 | text-shadow: none; 203 | } 204 | 205 | 206 | /*add logo in footer*/ 207 | .my-footer { 208 | position: absolute; 209 | bottom: 15px; 210 | left: 15px; 211 | height: 60px; 212 | width: 100%; 213 | } 214 | 215 | /*~~~~~~~~~~~~~~~~~~*/ 216 | /* SECTION DIVIDERS */ 217 | /*~~~~~~~~~~~~~~~~~~*/ 218 | 219 | /* section divider red */ 220 | .separator { 221 | background-color: #d90502; 222 | padding-left: 100px; /* delete this for 4:3 aspect ratio */ 223 | } 224 | 225 | /* section divider red H1 fonts */ 226 | .separator h1, .separator h2, .separator h3, .separator p { 227 | color: #fff; 228 | } 229 | 230 | /* section divider grey */ 231 | .title-slide-section-grey { 232 | background-color: #515151; 233 | padding-left: 100px; /* delete this for 4:3 aspect ratio */ 234 | } 235 | 236 | /* section divider grey H1 fonts */ 237 | .title-slide-section-grey h1, .title-slide-section-grey h2, .title-slide-section-grey h3 { 238 | color: #fff; 239 | } 240 | 241 | .title-slide-section-grey p { 242 | color: #fff; 243 | } 244 | 245 | /*~~~~~~~~~~~~~~~~~~*/ 246 | /* FINAL SLIDE */ 247 | /*~~~~~~~~~~~~~~~~~~*/ 248 | 249 | .title-slide-final { 250 | background-color: #fff; 251 | padding-left: 100px; 252 | text-shadow: 0 0 20px #333; 253 | text-align: center; 254 | } 255 | 256 | 257 | .title-slide-final h1 { 258 | color: #d90502; 259 | } 260 | 261 | 262 | /*~~~~~~~~~~~~~~~~~~~~*/ 263 | /* Global adjustments */ 264 | /*~~~~~~~~~~~~~~~~~~~~*/ 265 | 266 | /* Add padding to all slides for 16:9 aspect ratio */ 267 | .remark-slide-content { 268 | padding-left: 100px; /* delete this for 4:3 aspect ratio */ 269 | } 270 | 271 | /* Color adjustments for text */ 272 | 273 | /* Make bold syntax compile to ScPo-red */ 274 | strong { 275 | color: #d90502; 276 | } 277 | 278 | .ScPored { 279 | color: #d90502; 280 | } 281 | 282 | /* Pink text */ 283 | .red { 284 | color: #d90502 !important; 285 | } 286 | 287 | /* Add blue tag */ 288 | .blue { 289 | color: #0000CC; 290 | font-weight: bold; 291 | } 292 | 293 | /* Add grey tag */ 294 | .grey { 295 | color: #515151; 296 | } 297 | 298 | .lightgrey { 299 | color: #818181; 300 | } 301 | 302 | /* Force black */ 303 | .black { 304 | color: black; 305 | font-weight: bold; 306 | } 307 | 308 | /* Add white tag */ 309 | .white { 310 | color: white; 311 | } 312 | 313 | /* Color adjustments to headers */ 314 | h1 { 315 | color: #d90502; 316 | } 317 | 318 | h3 { 319 | color: #515151; 320 | } 321 | 322 | /* Font size tags */ 323 | .big { 324 | font-size: 1.5em; 325 | } 326 | 327 | /* ru blockquote */ 328 | ru-blockquote { 329 | display: block; 330 | margin-top: 1em; 331 | margin-bottom: 1em; 332 | margin-left: 40px; 333 | margin-right: 40px; 334 | border-left: solid 10px #d90502; 335 | background-color: #818181; 336 | padding: 1em; 337 | color: #fff; 338 | -moz-border-radius: 5px; 339 | -webkit-border-radius: 5px; 340 | } 341 | 342 | .large { font-size: 120% } 343 | .small { font-size: 90% } 344 | 345 | .super{ 346 | vertical-align: super; 347 | font-size: 70%; 348 | } 349 | .sub{ 350 | vertical-align: sub; 351 | font-size: 70%; 352 | } 353 | 354 | /* Create a highlighted class called 'hi' */ 355 | .hi { 356 | font-weight: 600; 357 | color: #d90502 !important; 358 | } 359 | .hi-pink { 360 | font-weight: 600; 361 | color: #e64173 !important; 362 | } 363 | .hi-slate { 364 | font-weight: 600; 365 | color: #314f4f !important; 366 | } 367 | .hi-turquoise { 368 | font-weight: 600; 369 | color: #44C1C4 !important; 370 | } 371 | .hi-purple { 372 | font-weight: 600; 373 | color: #6A5ACD !important; 374 | } 375 | .hi-orange { 376 | font-weight: 600; 377 | color: #FFA500 !important; 378 | } 379 | .hi-yellow{ 380 | font-weight: 600; 381 | color: #D8BD44 !important; 382 | } 383 | .hi-green { 384 | font-weight: 600; 385 | color: #7CAE96 !important; 386 | } 387 | .hi-grey { 388 | font-weight: 600; 389 | color: #8AA19E !important; 390 | } 391 | .hi-blue { 392 | font-weight: 600; 393 | color: #54778B !important; 394 | } 395 | .hi-red { 396 | font-weight: 600; 397 | color: #fb6107 !important; 398 | } -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.1.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.10.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.10.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.11.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.11.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.12.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.12.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.13.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.14.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.14.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.15.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.16.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.16.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.17.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.17.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.2.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.3.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.3.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.4.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.4.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.5.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.5.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.6.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.6.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.7.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.7.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.8.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.8.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.9.pdf -------------------------------------------------------------------------------- /img/ISLR/Chapter2/2.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/2.9.png -------------------------------------------------------------------------------- /img/ISLR/Chapter2/app.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ISLR/Chapter2/app.gif -------------------------------------------------------------------------------- /img/IV-dag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/IV-dag.png -------------------------------------------------------------------------------- /img/Kensington_slums_large.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/Kensington_slums_large.jpg -------------------------------------------------------------------------------- /img/clustering/c1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c1.png -------------------------------------------------------------------------------- /img/clustering/c10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c10.png -------------------------------------------------------------------------------- /img/clustering/c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c2.png -------------------------------------------------------------------------------- /img/clustering/c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c3.png -------------------------------------------------------------------------------- /img/clustering/c4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c4.png -------------------------------------------------------------------------------- /img/clustering/c5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c5.png -------------------------------------------------------------------------------- /img/clustering/c6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c6.png -------------------------------------------------------------------------------- /img/clustering/c7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c7.png -------------------------------------------------------------------------------- /img/clustering/c8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c8.png -------------------------------------------------------------------------------- /img/clustering/c9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/clustering/c9.png -------------------------------------------------------------------------------- /img/crime-dag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/crime-dag.png -------------------------------------------------------------------------------- /img/crime-dag2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/crime-dag2.png -------------------------------------------------------------------------------- /img/ex/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/ex/title.png -------------------------------------------------------------------------------- /img/father-thames.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/father-thames.jpg -------------------------------------------------------------------------------- /img/gifs/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/alert.png -------------------------------------------------------------------------------- /img/gifs/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/help.png -------------------------------------------------------------------------------- /img/gifs/panel.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/panel.gif -------------------------------------------------------------------------------- /img/gifs/ray-paris.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/ray-paris.mp4 -------------------------------------------------------------------------------- /img/gifs/ray.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/ray.mp4 -------------------------------------------------------------------------------- /img/gifs/ray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/ray.png -------------------------------------------------------------------------------- /img/gifs/wages.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/gifs/wages.gif -------------------------------------------------------------------------------- /img/logo/ScPo-econ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/logo/ScPo-econ.png -------------------------------------------------------------------------------- /img/logo/ScPo-shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/logo/ScPo-shield.png -------------------------------------------------------------------------------- /img/logo/ggplot2.svg: -------------------------------------------------------------------------------- 1 | RStudio_Hex 2016 v7 outlines -------------------------------------------------------------------------------- /img/photos/SSR_cone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/SSR_cone.png -------------------------------------------------------------------------------- /img/photos/Smoking_lung_cancer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/Smoking_lung_cancer.png -------------------------------------------------------------------------------- /img/photos/adjusted_death_rates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/adjusted_death_rates.png -------------------------------------------------------------------------------- /img/photos/age_by_smoking_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/age_by_smoking_status.png -------------------------------------------------------------------------------- /img/photos/bootstrap1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/bootstrap1.JPG -------------------------------------------------------------------------------- /img/photos/bootstrap2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/bootstrap2.JPG -------------------------------------------------------------------------------- /img/photos/ci_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/ci_diagram.png -------------------------------------------------------------------------------- /img/photos/correlation_funny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/correlation_funny.png -------------------------------------------------------------------------------- /img/photos/ex_cigar_subclassif.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/ex_cigar_subclassif.png -------------------------------------------------------------------------------- /img/photos/fundamental_pb_inference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/fundamental_pb_inference.png -------------------------------------------------------------------------------- /img/photos/fusilli-tricolore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/fusilli-tricolore.png -------------------------------------------------------------------------------- /img/photos/gt_error_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/gt_error_table.png -------------------------------------------------------------------------------- /img/photos/gt_error_table_ht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/gt_error_table_ht.png -------------------------------------------------------------------------------- /img/photos/hist_building.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/hist_building.gif -------------------------------------------------------------------------------- /img/photos/hist_building_vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/hist_building_vline.gif -------------------------------------------------------------------------------- /img/photos/ht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/ht.png -------------------------------------------------------------------------------- /img/photos/manip_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/manip_1.png -------------------------------------------------------------------------------- /img/photos/manip_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/manip_2.png -------------------------------------------------------------------------------- /img/photos/md-bank.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/md-bank.jpg -------------------------------------------------------------------------------- /img/photos/md-bank2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/md-bank2.jpg -------------------------------------------------------------------------------- /img/photos/md-pennies.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/md-pennies.jpg -------------------------------------------------------------------------------- /img/photos/min_wage_parallel_trends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/min_wage_parallel_trends.png -------------------------------------------------------------------------------- /img/photos/nj_penn_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/nj_penn_map.png -------------------------------------------------------------------------------- /img/photos/pasta/pasta_bowl.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/pasta_bowl.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample1.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample10.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample10.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample11.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample11.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample12.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample12.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample13.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample13.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample14.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample14.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample15.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample15.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample16.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample16.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample17.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample17.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample18.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample18.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample19.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample19.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample2.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample3.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample4.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample5.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample6.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample6.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample7.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample7.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample8.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample8.JPG -------------------------------------------------------------------------------- /img/photos/pasta/sample9.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta/sample9.JPG -------------------------------------------------------------------------------- /img/photos/pasta1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta1.JPG -------------------------------------------------------------------------------- /img/photos/pasta2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta2.JPG -------------------------------------------------------------------------------- /img/photos/pasta3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta3.JPG -------------------------------------------------------------------------------- /img/photos/pasta4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta4.JPG -------------------------------------------------------------------------------- /img/photos/pasta5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta5.JPG -------------------------------------------------------------------------------- /img/photos/pasta6.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/pasta6.JPG -------------------------------------------------------------------------------- /img/photos/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/power.png -------------------------------------------------------------------------------- /img/photos/raw_death_rates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/raw_death_rates.png -------------------------------------------------------------------------------- /img/photos/spurious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/spurious.png -------------------------------------------------------------------------------- /img/photos/standard_normal_distrib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/standard_normal_distrib.png -------------------------------------------------------------------------------- /img/photos/transition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/transition.png -------------------------------------------------------------------------------- /img/photos/visualize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/photos/visualize.png -------------------------------------------------------------------------------- /img/simulation-scatter-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/simulation-scatter-1.png -------------------------------------------------------------------------------- /img/slum.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/slum.jpg -------------------------------------------------------------------------------- /img/snow-map.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/snow-map.jpg -------------------------------------------------------------------------------- /img/snow-supply.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/img/snow-supply.jpg -------------------------------------------------------------------------------- /js/ru_xaringan.js: -------------------------------------------------------------------------------- 1 | 2 | // allow image sizing using percentage 3 | remark.macros.scale = function (percentage) { 4 | var url = this; 5 | return ''; 6 | }; 7 | 8 | 9 | -------------------------------------------------------------------------------- /lectures/00-DID/chapter_did.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/00-DID/chapter_did.pdf -------------------------------------------------------------------------------- /lectures/00-DID/img/logo/ScPo-shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/00-DID/img/logo/ScPo-shield.png -------------------------------------------------------------------------------- /lectures/00-DID/libs/elevate-section-attrs/elevate-section-attrs.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $("div.section[class*='level'], section[class*='level']").each(function(i, el) { 3 | var $section = $(el); 4 | var $header = $section.children().filter(":header").first(); 5 | if ($header.length === 0) return; 6 | var attrs = $header[0].attributes; 7 | for (var a = 0; a < attrs.length; a++) { 8 | var nm = attrs[a].name; 9 | var val = attrs[a].value; 10 | if (nm === "class") { 11 | $section.addClass(val); 12 | $header.removeClass(val); 13 | continue; 14 | } 15 | $section.attr(nm, val); 16 | $header.attr(nm, null); 17 | } 18 | }); 19 | }); 20 | 21 | -------------------------------------------------------------------------------- /lectures/00-DID/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/00-DID/libs/kePrint/kePrint.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') { 3 | $('[data-toggle="tooltip"]').tooltip(); 4 | } 5 | if ($('[data-toggle="popover"]').popover === 'function') { 6 | $('[data-toggle="popover"]').popover(); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /lectures/00-DID/libs/lightable/lightable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * lightable v0.0.1 3 | * Copyright 2020 Hao Zhu 4 | * Licensed under MIT (https://github.com/haozhu233/kableExtra/blob/master/LICENSE) 5 | */ 6 | 7 | .lightable-minimal { 8 | border-collapse: separate; 9 | border-spacing: 16px 1px; 10 | width: 100%; 11 | margin-bottom: 10px; 12 | } 13 | 14 | .lightable-minimal td { 15 | margin-left: 5px; 16 | margin-right: 5px; 17 | } 18 | 19 | .lightable-minimal th { 20 | margin-left: 5px; 21 | margin-right: 5px; 22 | } 23 | 24 | .lightable-minimal thead tr:last-child th { 25 | border-bottom: 2px solid #00000050; 26 | empty-cells: hide; 27 | 28 | } 29 | 30 | .lightable-minimal tbody tr:first-child td { 31 | padding-top: 0.5em; 32 | } 33 | 34 | .lightable-minimal.lightable-hover tbody tr:hover { 35 | background-color: #f5f5f5; 36 | } 37 | 38 | .lightable-minimal.lightable-striped tbody tr:nth-child(even) { 39 | background-color: #f5f5f5; 40 | } 41 | 42 | .lightable-classic { 43 | border-top: 0.16em solid #111111; 44 | border-bottom: 0.16em solid #111111; 45 | width: 100%; 46 | margin-bottom: 10px; 47 | margin: 10px 5px; 48 | } 49 | 50 | .lightable-classic tfoot tr td { 51 | border: 0; 52 | } 53 | 54 | .lightable-classic tfoot tr:first-child td { 55 | border-top: 0.14em solid #111111; 56 | } 57 | 58 | .lightable-classic caption { 59 | color: #222222; 60 | } 61 | 62 | .lightable-classic td { 63 | padding-left: 5px; 64 | padding-right: 5px; 65 | color: #222222; 66 | } 67 | 68 | .lightable-classic th { 69 | padding-left: 5px; 70 | padding-right: 5px; 71 | font-weight: normal; 72 | color: #222222; 73 | } 74 | 75 | .lightable-classic thead tr:last-child th { 76 | border-bottom: 0.10em solid #111111; 77 | } 78 | 79 | .lightable-classic.lightable-hover tbody tr:hover { 80 | background-color: #F9EEC1; 81 | } 82 | 83 | .lightable-classic.lightable-striped tbody tr:nth-child(even) { 84 | background-color: #f5f5f5; 85 | } 86 | 87 | .lightable-classic-2 { 88 | border-top: 3px double #111111; 89 | border-bottom: 3px double #111111; 90 | width: 100%; 91 | margin-bottom: 10px; 92 | } 93 | 94 | .lightable-classic-2 tfoot tr td { 95 | border: 0; 96 | } 97 | 98 | .lightable-classic-2 tfoot tr:first-child td { 99 | border-top: 3px double #111111; 100 | } 101 | 102 | .lightable-classic-2 caption { 103 | color: #222222; 104 | } 105 | 106 | .lightable-classic-2 td { 107 | padding-left: 5px; 108 | padding-right: 5px; 109 | color: #222222; 110 | } 111 | 112 | .lightable-classic-2 th { 113 | padding-left: 5px; 114 | padding-right: 5px; 115 | font-weight: normal; 116 | color: #222222; 117 | } 118 | 119 | .lightable-classic-2 tbody tr:last-child td { 120 | border-bottom: 3px double #111111; 121 | } 122 | 123 | .lightable-classic-2 thead tr:last-child th { 124 | border-bottom: 1px solid #111111; 125 | } 126 | 127 | .lightable-classic-2.lightable-hover tbody tr:hover { 128 | background-color: #F9EEC1; 129 | } 130 | 131 | .lightable-classic-2.lightable-striped tbody tr:nth-child(even) { 132 | background-color: #f5f5f5; 133 | } 134 | 135 | .lightable-material { 136 | min-width: 100%; 137 | white-space: nowrap; 138 | table-layout: fixed; 139 | font-family: Roboto, sans-serif; 140 | border: 1px solid #EEE; 141 | border-collapse: collapse; 142 | margin-bottom: 10px; 143 | } 144 | 145 | .lightable-material tfoot tr td { 146 | border: 0; 147 | } 148 | 149 | .lightable-material tfoot tr:first-child td { 150 | border-top: 1px solid #EEE; 151 | } 152 | 153 | .lightable-material th { 154 | height: 56px; 155 | padding-left: 16px; 156 | padding-right: 16px; 157 | } 158 | 159 | .lightable-material td { 160 | height: 52px; 161 | padding-left: 16px; 162 | padding-right: 16px; 163 | border-top: 1px solid #eeeeee; 164 | } 165 | 166 | .lightable-material.lightable-hover tbody tr:hover { 167 | background-color: #f5f5f5; 168 | } 169 | 170 | .lightable-material.lightable-striped tbody tr:nth-child(even) { 171 | background-color: #f5f5f5; 172 | } 173 | 174 | .lightable-material.lightable-striped tbody td { 175 | border: 0; 176 | } 177 | 178 | .lightable-material.lightable-striped thead tr:last-child th { 179 | border-bottom: 1px solid #ddd; 180 | } 181 | 182 | .lightable-material-dark { 183 | min-width: 100%; 184 | white-space: nowrap; 185 | table-layout: fixed; 186 | font-family: Roboto, sans-serif; 187 | border: 1px solid #FFFFFF12; 188 | border-collapse: collapse; 189 | margin-bottom: 10px; 190 | background-color: #363640; 191 | } 192 | 193 | .lightable-material-dark tfoot tr td { 194 | border: 0; 195 | } 196 | 197 | .lightable-material-dark tfoot tr:first-child td { 198 | border-top: 1px solid #FFFFFF12; 199 | } 200 | 201 | .lightable-material-dark th { 202 | height: 56px; 203 | padding-left: 16px; 204 | padding-right: 16px; 205 | color: #FFFFFF60; 206 | } 207 | 208 | .lightable-material-dark td { 209 | height: 52px; 210 | padding-left: 16px; 211 | padding-right: 16px; 212 | color: #FFFFFF; 213 | border-top: 1px solid #FFFFFF12; 214 | } 215 | 216 | .lightable-material-dark.lightable-hover tbody tr:hover { 217 | background-color: #FFFFFF12; 218 | } 219 | 220 | .lightable-material-dark.lightable-striped tbody tr:nth-child(even) { 221 | background-color: #FFFFFF12; 222 | } 223 | 224 | .lightable-material-dark.lightable-striped tbody td { 225 | border: 0; 226 | } 227 | 228 | .lightable-material-dark.lightable-striped thead tr:last-child th { 229 | border-bottom: 1px solid #FFFFFF12; 230 | } 231 | 232 | .lightable-paper { 233 | width: 100%; 234 | margin-bottom: 10px; 235 | color: #444; 236 | } 237 | 238 | .lightable-paper tfoot tr td { 239 | border: 0; 240 | } 241 | 242 | .lightable-paper tfoot tr:first-child td { 243 | border-top: 1px solid #00000020; 244 | } 245 | 246 | .lightable-paper thead tr:last-child th { 247 | color: #666; 248 | vertical-align: bottom; 249 | border-bottom: 1px solid #00000020; 250 | line-height: 1.15em; 251 | padding: 10px 5px; 252 | } 253 | 254 | .lightable-paper td { 255 | vertical-align: middle; 256 | border-bottom: 1px solid #00000010; 257 | line-height: 1.15em; 258 | padding: 7px 5px; 259 | } 260 | 261 | .lightable-paper.lightable-hover tbody tr:hover { 262 | background-color: #F9EEC1; 263 | } 264 | 265 | .lightable-paper.lightable-striped tbody tr:nth-child(even) { 266 | background-color: #00000008; 267 | } 268 | 269 | .lightable-paper.lightable-striped tbody td { 270 | border: 0; 271 | } 272 | 273 | -------------------------------------------------------------------------------- /lectures/00-DID/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/01-recap/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/01-recap/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/01-recap/recap1_files/figure-html/simulation scatter-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/01-recap/recap1_files/figure-html/simulation scatter-1.png -------------------------------------------------------------------------------- /lectures/01-recap/recap1_files/figure-html/simulation scatter2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/01-recap/recap1_files/figure-html/simulation scatter2-1.png -------------------------------------------------------------------------------- /lectures/02-recap/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/02-recap/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/02-recap/star1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/02-recap/star1-1.png -------------------------------------------------------------------------------- /lectures/03-datatable/03-datatable_files/figure-html/storms_ggplot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/03-datatable/03-datatable_files/figure-html/storms_ggplot-1.png -------------------------------------------------------------------------------- /lectures/03-datatable/libs/cols.css: -------------------------------------------------------------------------------- 1 | 2 | /* Required: Clear floats after the columns */ 3 | .multicolrow:after { 4 | content: ""; 5 | display: table; 6 | clear: both; 7 | } 8 | 9 | /*Optional: Color header boxes*/ 10 | .multicolhead { 11 | background-color:#4B9CD3; 12 | color: #FFFFFF; 13 | } 14 | 15 | .wordwrap { 16 | white-space: pre-wrap; /* CSS3 */ 17 | white-space: -moz-pre-wrap; /* Firefox */ 18 | white-space: -o-pre-wrap; /* Opera 7 */ 19 | word-wrap: break-word; /* IE */ 20 | } -------------------------------------------------------------------------------- /lectures/03-datatable/libs/cols_macro.js: -------------------------------------------------------------------------------- 1 | // creates equal-width column headers with css class multicolhead for styling 2 | // ...titles is a comma-separated list a values to determine number and contents of columns 3 | 4 | remark.macros.col_header = function (...titles) { 5 | 6 | var num_items = titles.length; 7 | var width = Math.floor(100/num_items) - 2*0.5; 8 | 9 | var code = 10 | '
'+ 11 | '
'; 13 | 14 | for(let i = 0; i < num_items; i++) 15 | code = 16 | code + 17 | '
' + 25 | titles[i] + 26 | '
'; 27 | 28 | 29 | code = code + 30 | '
' + 31 | '
'; 32 | 33 | return code; 34 | 35 | }; 36 | 37 | // creates row of equal-width column list elements 38 | // ...bodies is a comma-separated list a values to determine number and contents of columns 39 | 40 | remark.macros.col_list = function (...bodies) { 41 | 42 | var num_items = bodies.length; 43 | var width = Math.floor(100/num_items) - 0.5; 44 | 45 | var code = 46 | '
'+ 47 | '
' ; 48 | 49 | for(let i = 0; i
  • ' + 57 | bodies[i] + 58 | '
  • '; 59 | 60 | code = code + 61 | '' + 62 | '
    '; 63 | 64 | return code; 65 | 66 | }; 67 | 68 | // creates row of equal-width column contents 69 | // ...bodies is a comma-separated list a values to determine number and contents of columns 70 | 71 | remark.macros.col_row = function (...bodies) { 72 | 73 | var num_items = bodies.length; 74 | var width = Math.floor(100/num_items) - 0.5; 75 | 76 | var code = 77 | '
    '+ 78 | '
    ' ; 79 | 80 | for(let i = 0; i' + 88 | bodies[i] + 89 | '
    '; 90 | 91 | code = code + 92 | '' + 93 | '
    '; 94 | 95 | return code; 96 | 97 | }; -------------------------------------------------------------------------------- /lectures/03-datatable/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/03-datatable/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/03-datatable/libs/remark-css/metropolis-fonts.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i,500,500i,700,700i); 2 | @import url(https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css); 3 | 4 | body { 5 | font-family: 'Fira Sans','Droid Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC', serif; 6 | } 7 | 8 | .remark-code, .remark-inline-code { 9 | font-family: 'Fira Code', 'Lucida Console', Monaco, monospace; 10 | font-size: 80%; 11 | } 12 | -------------------------------------------------------------------------------- /lectures/03-datatable/libs/remark-css/metropolis.css: -------------------------------------------------------------------------------- 1 | .remark-slide-content { 2 | background-color: #FAFAFA; 3 | border-top: 80px solid #23373B; 4 | font-size: 20px; 5 | font-weight: 300; 6 | line-height: 1.5; 7 | padding: 1em 2em 1em 2em 8 | } 9 | 10 | .title-slide .inverse .remark-slide-content { 11 | background-color: #FAFAFA; 12 | } 13 | 14 | .inverse { 15 | background-color: #23373B; 16 | text-shadow: none; 17 | } 18 | 19 | /* Removes colored bar from top of the slide resulting in a clear slide */ 20 | .clear{ 21 | border-top: 0px solid #FAFAFA; 22 | } 23 | 24 | h1 { 25 | font-weight: normal; 26 | margin-top: -95px; 27 | margin-left: -00px; 28 | color: #FAFAFA; 29 | } 30 | 31 | h2, h3, h4 { 32 | padding-top: -15px; 33 | padding-bottom: 00px; 34 | color: #1A292C; 35 | text-shadow: none; 36 | font-weight: 400; 37 | text-align: left; 38 | margin-left: 00px; 39 | margin-bottom: -10px; 40 | } 41 | 42 | .remark-slide-content h1 { 43 | font-size: 45px; 44 | } 45 | 46 | .remark-slide-content h2 { 47 | font-size: 35px; 48 | } 49 | 50 | .remark-slide-content h3 { 51 | font-size: 30px; 52 | } 53 | 54 | .left-column h2, .left-column h3, .left-column h4 { 55 | color: #777; 56 | } 57 | 58 | .left-column h2:last-of-type, .left-column h3:last-child { 59 | color: #1A292C; 60 | } 61 | 62 | .title-slide { 63 | background-color: #FAFAFA; 64 | border-top: 80px solid #FAFAFA; 65 | } 66 | 67 | .title-slide h1 { 68 | color: #1A292C; 69 | font-size: 40px; 70 | text-shadow: none; 71 | font-weight: 400; 72 | text-align: left; 73 | margin-left: 15px; 74 | padding-top: 80px; 75 | } 76 | .title-slide h2 { 77 | margin-top: -25px; 78 | padding-bottom: -20px; 79 | color: #1A292C; 80 | text-shadow: none; 81 | font-weight: 300; 82 | font-size: 35px; 83 | text-align: left; 84 | margin-left: 15px; 85 | } 86 | .title-slide h3 { 87 | color: #1A292C; 88 | text-shadow: none; 89 | font-weight: 300; 90 | font-size: 25px; 91 | text-align: left; 92 | margin-left: 15px; 93 | margin-bottom: -30px; 94 | } 95 | 96 | hr, .title-slide h2::after, .mline h1::after { 97 | content: ''; 98 | display: block; 99 | border: none; 100 | background-color: #EB811B; 101 | color: #EB811B; 102 | height: 1px; 103 | } 104 | 105 | hr, .mline h1::after { 106 | margin: 1em 15px 0 15px; 107 | } 108 | 109 | .title-slide h2::after { 110 | margin: 10px 15px 35px 0; 111 | } 112 | 113 | .mline h1::after { 114 | margin: 10px 15px 0 15px; 115 | } 116 | 117 | .remark-slide-number { 118 | font-size: 13pt; 119 | color: #272822; 120 | opacity: 1; 121 | } 122 | .inverse .remark-slide-number { 123 | font-size: 13pt; 124 | color: #FAFAFA; 125 | opacity: 1; 126 | } 127 | 128 | /* turns off slide numbers for title page: https://github.com/gnab/remark/issues/298 */ 129 | .title-slide .remark-slide-number { 130 | display: none; 131 | } 132 | 133 | .remark-inline-code { 134 | /* background: #F5F5F5; /* lighter */ 135 | background: #e7e8e2; /* darker */ 136 | border-radius: 3px; 137 | padding: 4px; 138 | } 139 | 140 | .code10 .remark-code { 141 | font-size: 10%; 142 | } 143 | 144 | .code20 .remark-code { 145 | font-size: 20%; 146 | } 147 | 148 | .code30 .remark-code { 149 | font-size: 30%; 150 | } 151 | 152 | .code40 .remark-code { 153 | font-size: 40%; 154 | } 155 | 156 | .code50 .remark-code { 157 | font-size: 50%; 158 | } 159 | 160 | .code60 .remark-code { 161 | font-size: 60%; 162 | } 163 | 164 | .code70 .remark-code { 165 | font-size: 70%; 166 | } 167 | 168 | .code80 .remark-code { 169 | font-size: 80%; 170 | } 171 | 172 | .code90 .remark-code { 173 | font-size: 90%; 174 | } 175 | 176 | .code100 .remark-code { 177 | font-size: 100%; 178 | } 179 | 180 | .font10 { 181 | font-size: 10%; 182 | } 183 | 184 | .font20 { 185 | font-size: 20%; 186 | } 187 | 188 | .font30 { 189 | font-size: 30%; 190 | } 191 | 192 | .font40 { 193 | font-size: 40%; 194 | } 195 | 196 | .font50 { 197 | font-size: 50%; 198 | } 199 | 200 | .font60 { 201 | font-size: 60%; 202 | } 203 | 204 | .font70 { 205 | font-size: 70%; 206 | } 207 | 208 | .font80 { 209 | font-size: 80%; 210 | } 211 | 212 | .font90 { 213 | font-size: 90%; 214 | } 215 | 216 | .font100 { 217 | font-size: 100%; 218 | } 219 | 220 | .font110 { 221 | font-size: 110%; 222 | } 223 | 224 | .font120 { 225 | font-size: 120%; 226 | } 227 | 228 | .font130 { 229 | font-size: 130%; 230 | } 231 | 232 | .font140 { 233 | font-size: 140%; 234 | } 235 | 236 | .font150 { 237 | font-size: 150%; 238 | } 239 | 240 | .font160 { 241 | font-size: 160%; 242 | } 243 | .font170 { 244 | font-size: 170%; 245 | } 246 | .font180 { 247 | font-size: 180%; 248 | } 249 | .font190 { 250 | font-size: 190%; 251 | } 252 | .font200 { 253 | font-size: 200%; 254 | } 255 | -------------------------------------------------------------------------------- /lectures/04-IV/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/04-IV/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/05-IV2/05-IV2_files/figure-html/ak-mod-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lectures/05-IV2/05-IV2_files/figure-html/mincer-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lectures/05-IV2/05-IV2_files/figure-html/mincer2-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lectures/05-IV2/05-IV2_files/figure-html/mincer3-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lectures/05-IV2/05-IV2_files/figure-html/mincer4-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lectures/05-IV2/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/05-IV2/libs/kePrint/kePrint.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') { 3 | $('[data-toggle="tooltip"]').tooltip(); 4 | } 5 | if ($('[data-toggle="popover"]').popover === 'function') { 6 | $('[data-toggle="popover"]').popover(); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /lectures/05-IV2/libs/lightable/lightable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * lightable v0.0.1 3 | * Copyright 2020 Hao Zhu 4 | * Licensed under MIT (https://github.com/haozhu233/kableExtra/blob/master/LICENSE) 5 | */ 6 | 7 | .lightable-minimal { 8 | border-collapse: separate; 9 | border-spacing: 16px 1px; 10 | width: 100%; 11 | margin-bottom: 10px; 12 | } 13 | 14 | .lightable-minimal td { 15 | margin-left: 5px; 16 | margin-right: 5px; 17 | } 18 | 19 | .lightable-minimal th { 20 | margin-left: 5px; 21 | margin-right: 5px; 22 | } 23 | 24 | .lightable-minimal thead tr:last-child th { 25 | border-bottom: 2px solid #00000050; 26 | empty-cells: hide; 27 | 28 | } 29 | 30 | .lightable-minimal tbody tr:first-child td { 31 | padding-top: 0.5em; 32 | } 33 | 34 | .lightable-minimal.lightable-hover tbody tr:hover { 35 | background-color: #f5f5f5; 36 | } 37 | 38 | .lightable-minimal.lightable-striped tbody tr:nth-child(even) { 39 | background-color: #f5f5f5; 40 | } 41 | 42 | .lightable-classic { 43 | border-top: 0.16em solid #111111; 44 | border-bottom: 0.16em solid #111111; 45 | width: 100%; 46 | margin-bottom: 10px; 47 | margin: 10px 5px; 48 | } 49 | 50 | .lightable-classic tfoot tr td { 51 | border: 0; 52 | } 53 | 54 | .lightable-classic tfoot tr:first-child td { 55 | border-top: 0.14em solid #111111; 56 | } 57 | 58 | .lightable-classic caption { 59 | color: #222222; 60 | } 61 | 62 | .lightable-classic td { 63 | padding-left: 5px; 64 | padding-right: 5px; 65 | color: #222222; 66 | } 67 | 68 | .lightable-classic th { 69 | padding-left: 5px; 70 | padding-right: 5px; 71 | font-weight: normal; 72 | color: #222222; 73 | } 74 | 75 | .lightable-classic thead tr:last-child th { 76 | border-bottom: 0.10em solid #111111; 77 | } 78 | 79 | .lightable-classic.lightable-hover tbody tr:hover { 80 | background-color: #F9EEC1; 81 | } 82 | 83 | .lightable-classic.lightable-striped tbody tr:nth-child(even) { 84 | background-color: #f5f5f5; 85 | } 86 | 87 | .lightable-classic-2 { 88 | border-top: 3px double #111111; 89 | border-bottom: 3px double #111111; 90 | width: 100%; 91 | margin-bottom: 10px; 92 | } 93 | 94 | .lightable-classic-2 tfoot tr td { 95 | border: 0; 96 | } 97 | 98 | .lightable-classic-2 tfoot tr:first-child td { 99 | border-top: 3px double #111111; 100 | } 101 | 102 | .lightable-classic-2 caption { 103 | color: #222222; 104 | } 105 | 106 | .lightable-classic-2 td { 107 | padding-left: 5px; 108 | padding-right: 5px; 109 | color: #222222; 110 | } 111 | 112 | .lightable-classic-2 th { 113 | padding-left: 5px; 114 | padding-right: 5px; 115 | font-weight: normal; 116 | color: #222222; 117 | } 118 | 119 | .lightable-classic-2 tbody tr:last-child td { 120 | border-bottom: 3px double #111111; 121 | } 122 | 123 | .lightable-classic-2 thead tr:last-child th { 124 | border-bottom: 1px solid #111111; 125 | } 126 | 127 | .lightable-classic-2.lightable-hover tbody tr:hover { 128 | background-color: #F9EEC1; 129 | } 130 | 131 | .lightable-classic-2.lightable-striped tbody tr:nth-child(even) { 132 | background-color: #f5f5f5; 133 | } 134 | 135 | .lightable-material { 136 | min-width: 100%; 137 | white-space: nowrap; 138 | table-layout: fixed; 139 | font-family: Roboto, sans-serif; 140 | border: 1px solid #EEE; 141 | border-collapse: collapse; 142 | margin-bottom: 10px; 143 | } 144 | 145 | .lightable-material tfoot tr td { 146 | border: 0; 147 | } 148 | 149 | .lightable-material tfoot tr:first-child td { 150 | border-top: 1px solid #EEE; 151 | } 152 | 153 | .lightable-material th { 154 | height: 56px; 155 | padding-left: 16px; 156 | padding-right: 16px; 157 | } 158 | 159 | .lightable-material td { 160 | height: 52px; 161 | padding-left: 16px; 162 | padding-right: 16px; 163 | border-top: 1px solid #eeeeee; 164 | } 165 | 166 | .lightable-material.lightable-hover tbody tr:hover { 167 | background-color: #f5f5f5; 168 | } 169 | 170 | .lightable-material.lightable-striped tbody tr:nth-child(even) { 171 | background-color: #f5f5f5; 172 | } 173 | 174 | .lightable-material.lightable-striped tbody td { 175 | border: 0; 176 | } 177 | 178 | .lightable-material.lightable-striped thead tr:last-child th { 179 | border-bottom: 1px solid #ddd; 180 | } 181 | 182 | .lightable-material-dark { 183 | min-width: 100%; 184 | white-space: nowrap; 185 | table-layout: fixed; 186 | font-family: Roboto, sans-serif; 187 | border: 1px solid #FFFFFF12; 188 | border-collapse: collapse; 189 | margin-bottom: 10px; 190 | background-color: #363640; 191 | } 192 | 193 | .lightable-material-dark tfoot tr td { 194 | border: 0; 195 | } 196 | 197 | .lightable-material-dark tfoot tr:first-child td { 198 | border-top: 1px solid #FFFFFF12; 199 | } 200 | 201 | .lightable-material-dark th { 202 | height: 56px; 203 | padding-left: 16px; 204 | padding-right: 16px; 205 | color: #FFFFFF60; 206 | } 207 | 208 | .lightable-material-dark td { 209 | height: 52px; 210 | padding-left: 16px; 211 | padding-right: 16px; 212 | color: #FFFFFF; 213 | border-top: 1px solid #FFFFFF12; 214 | } 215 | 216 | .lightable-material-dark.lightable-hover tbody tr:hover { 217 | background-color: #FFFFFF12; 218 | } 219 | 220 | .lightable-material-dark.lightable-striped tbody tr:nth-child(even) { 221 | background-color: #FFFFFF12; 222 | } 223 | 224 | .lightable-material-dark.lightable-striped tbody td { 225 | border: 0; 226 | } 227 | 228 | .lightable-material-dark.lightable-striped thead tr:last-child th { 229 | border-bottom: 1px solid #FFFFFF12; 230 | } 231 | 232 | .lightable-paper { 233 | width: 100%; 234 | margin-bottom: 10px; 235 | color: #444; 236 | } 237 | 238 | .lightable-paper tfoot tr td { 239 | border: 0; 240 | } 241 | 242 | .lightable-paper tfoot tr:first-child td { 243 | border-top: 1px solid #00000020; 244 | } 245 | 246 | .lightable-paper thead tr:last-child th { 247 | color: #666; 248 | vertical-align: bottom; 249 | border-bottom: 1px solid #00000020; 250 | line-height: 1.15em; 251 | padding: 10px 5px; 252 | } 253 | 254 | .lightable-paper td { 255 | vertical-align: middle; 256 | border-bottom: 1px solid #00000010; 257 | line-height: 1.15em; 258 | padding: 7px 5px; 259 | } 260 | 261 | .lightable-paper.lightable-hover tbody tr:hover { 262 | background-color: #F9EEC1; 263 | } 264 | 265 | .lightable-paper.lightable-striped tbody tr:nth-child(even) { 266 | background-color: #00000008; 267 | } 268 | 269 | .lightable-paper.lightable-striped tbody td { 270 | border: 0; 271 | } 272 | 273 | -------------------------------------------------------------------------------- /lectures/05-IV2/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/06-panel/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/06-panel/libs/kePrint/kePrint.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') { 3 | $('[data-toggle="tooltip"]').tooltip(); 4 | } 5 | if ($('[data-toggle="popover"]').popover === 'function') { 6 | $('[data-toggle="popover"]').popover(); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /lectures/06-panel/libs/lightable/lightable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * lightable v0.0.1 3 | * Copyright 2020 Hao Zhu 4 | * Licensed under MIT (https://github.com/haozhu233/kableExtra/blob/master/LICENSE) 5 | */ 6 | 7 | .lightable-minimal { 8 | border-collapse: separate; 9 | border-spacing: 16px 1px; 10 | width: 100%; 11 | margin-bottom: 10px; 12 | } 13 | 14 | .lightable-minimal td { 15 | margin-left: 5px; 16 | margin-right: 5px; 17 | } 18 | 19 | .lightable-minimal th { 20 | margin-left: 5px; 21 | margin-right: 5px; 22 | } 23 | 24 | .lightable-minimal thead tr:last-child th { 25 | border-bottom: 2px solid #00000050; 26 | empty-cells: hide; 27 | 28 | } 29 | 30 | .lightable-minimal tbody tr:first-child td { 31 | padding-top: 0.5em; 32 | } 33 | 34 | .lightable-minimal.lightable-hover tbody tr:hover { 35 | background-color: #f5f5f5; 36 | } 37 | 38 | .lightable-minimal.lightable-striped tbody tr:nth-child(even) { 39 | background-color: #f5f5f5; 40 | } 41 | 42 | .lightable-classic { 43 | border-top: 0.16em solid #111111; 44 | width: 100%; 45 | margin-bottom: 10px; 46 | margin: 10px 5px; 47 | } 48 | 49 | .lightable-classic caption { 50 | color: #222222; 51 | } 52 | 53 | .lightable-classic td { 54 | padding-left: 5px; 55 | padding-right: 5px; 56 | color: #222222; 57 | } 58 | 59 | .lightable-classic th { 60 | padding-left: 5px; 61 | padding-right: 5px; 62 | font-weight: normal; 63 | color: #222222; 64 | } 65 | 66 | .lightable-classic thead tr:last-child th { 67 | border-bottom: 0.10em solid #111111; 68 | } 69 | 70 | .lightable-classic tbody tr:last-child td { 71 | border-bottom: 0.14em solid #111111; 72 | } 73 | 74 | .lightable-classic.lightable-hover tbody tr:hover { 75 | background-color: #F9EEC1; 76 | } 77 | 78 | .lightable-classic.lightable-striped tbody tr:nth-child(even) { 79 | background-color: #f5f5f5; 80 | } 81 | 82 | .lightable-classic-2 { 83 | border-top: 3px double #111111; 84 | width: 100%; 85 | margin-bottom: 10px; 86 | } 87 | 88 | .lightable-classic-2 caption { 89 | color: #222222; 90 | } 91 | 92 | .lightable-classic-2 td { 93 | padding-left: 5px; 94 | padding-right: 5px; 95 | color: #222222; 96 | } 97 | 98 | .lightable-classic-2 th { 99 | padding-left: 5px; 100 | padding-right: 5px; 101 | font-weight: normal; 102 | color: #222222; 103 | } 104 | 105 | .lightable-classic-2 tbody tr:last-child td { 106 | border-bottom: 3px double #111111; 107 | } 108 | 109 | .lightable-classic-2 thead tr:last-child th { 110 | border-bottom: 1px solid #111111; 111 | } 112 | 113 | .lightable-classic-2.lightable-hover tbody tr:hover { 114 | background-color: #F9EEC1; 115 | } 116 | 117 | .lightable-classic-2.lightable-striped tbody tr:nth-child(even) { 118 | background-color: #f5f5f5; 119 | } 120 | 121 | .lightable-material { 122 | min-width: 100%; 123 | white-space: nowrap; 124 | table-layout: fixed; 125 | font-family: Roboto, sans-serif; 126 | border: 1px solid #EEE; 127 | border-collapse: collapse; 128 | margin-bottom: 10px; 129 | } 130 | 131 | .lightable-material th { 132 | height: 56px; 133 | padding-left: 16px; 134 | padding-right: 16px; 135 | } 136 | 137 | .lightable-material td { 138 | height: 52px; 139 | padding-left: 16px; 140 | padding-right: 16px; 141 | border-top: 1px solid #eeeeee; 142 | } 143 | 144 | .lightable-material.lightable-hover tbody tr:hover { 145 | background-color: #f5f5f5; 146 | } 147 | 148 | .lightable-material.lightable-striped tbody tr:nth-child(even) { 149 | background-color: #f5f5f5; 150 | } 151 | 152 | .lightable-material.lightable-striped tbody td { 153 | border: 0; 154 | } 155 | 156 | .lightable-material.lightable-striped thead tr:last-child th { 157 | border-bottom: 1px solid #ddd; 158 | } 159 | 160 | .lightable-material-dark { 161 | min-width: 100%; 162 | white-space: nowrap; 163 | table-layout: fixed; 164 | font-family: Roboto, sans-serif; 165 | border: 1px solid #FFFFFF12; 166 | border-collapse: collapse; 167 | margin-bottom: 10px; 168 | background-color: #363640; 169 | } 170 | 171 | .lightable-material-dark th { 172 | height: 56px; 173 | padding-left: 16px; 174 | padding-right: 16px; 175 | color: #FFFFFF60; 176 | } 177 | 178 | .lightable-material-dark td { 179 | height: 52px; 180 | padding-left: 16px; 181 | padding-right: 16px; 182 | color: #FFFFFF; 183 | border-top: 1px solid #FFFFFF12; 184 | } 185 | 186 | .lightable-material-dark.lightable-hover tbody tr:hover { 187 | background-color: #FFFFFF12; 188 | } 189 | 190 | .lightable-material-dark.lightable-striped tbody tr:nth-child(even) { 191 | background-color: #FFFFFF12; 192 | } 193 | 194 | .lightable-material-dark.lightable-striped tbody td { 195 | border: 0; 196 | } 197 | 198 | .lightable-material-dark.lightable-striped thead tr:last-child th { 199 | border-bottom: 1px solid #FFFFFF12; 200 | } 201 | 202 | .lightable-paper { 203 | width: 100%; 204 | margin-bottom: 10px; 205 | color: #444; 206 | } 207 | 208 | .lightable-paper thead tr:last-child th { 209 | color: #666; 210 | vertical-align: bottom; 211 | border-bottom: 1px solid #00000020; 212 | line-height: 1.15em; 213 | padding: 10px 5px; 214 | } 215 | 216 | .lightable-paper td { 217 | vertical-align: middle; 218 | border-bottom: 1px solid #00000010; 219 | line-height: 1.15em; 220 | padding: 7px 5px; 221 | } 222 | 223 | .lightable-paper.lightable-hover tbody tr:hover { 224 | background-color: #F9EEC1; 225 | } 226 | 227 | .lightable-paper.lightable-striped tbody tr:nth-child(even) { 228 | background-color: #00000008; 229 | } 230 | 231 | .lightable-paper.lightable-striped tbody td { 232 | border: 0; 233 | } 234 | 235 | -------------------------------------------------------------------------------- /lectures/06-panel/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/07-probit/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/07-probit/libs/kePrint/kePrint.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | if (typeof $('[data-toggle="tooltip"]').tooltip === 'function') { 3 | $('[data-toggle="tooltip"]').tooltip(); 4 | } 5 | if ($('[data-toggle="popover"]').popover === 'function') { 6 | $('[data-toggle="popover"]').popover(); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /lectures/07-probit/libs/lightable/lightable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * lightable v0.0.1 3 | * Copyright 2020 Hao Zhu 4 | * Licensed under MIT (https://github.com/haozhu233/kableExtra/blob/master/LICENSE) 5 | */ 6 | 7 | .lightable-minimal { 8 | border-collapse: separate; 9 | border-spacing: 16px 1px; 10 | width: 100%; 11 | margin-bottom: 10px; 12 | } 13 | 14 | .lightable-minimal td { 15 | margin-left: 5px; 16 | margin-right: 5px; 17 | } 18 | 19 | .lightable-minimal th { 20 | margin-left: 5px; 21 | margin-right: 5px; 22 | } 23 | 24 | .lightable-minimal thead tr:last-child th { 25 | border-bottom: 2px solid #00000050; 26 | empty-cells: hide; 27 | 28 | } 29 | 30 | .lightable-minimal tbody tr:first-child td { 31 | padding-top: 0.5em; 32 | } 33 | 34 | .lightable-minimal.lightable-hover tbody tr:hover { 35 | background-color: #f5f5f5; 36 | } 37 | 38 | .lightable-minimal.lightable-striped tbody tr:nth-child(even) { 39 | background-color: #f5f5f5; 40 | } 41 | 42 | .lightable-classic { 43 | border-top: 0.16em solid #111111; 44 | width: 100%; 45 | margin-bottom: 10px; 46 | margin: 10px 5px; 47 | } 48 | 49 | .lightable-classic caption { 50 | color: #222222; 51 | } 52 | 53 | .lightable-classic td { 54 | padding-left: 5px; 55 | padding-right: 5px; 56 | color: #222222; 57 | } 58 | 59 | .lightable-classic th { 60 | padding-left: 5px; 61 | padding-right: 5px; 62 | font-weight: normal; 63 | color: #222222; 64 | } 65 | 66 | .lightable-classic thead tr:last-child th { 67 | border-bottom: 0.10em solid #111111; 68 | } 69 | 70 | .lightable-classic tbody tr:last-child td { 71 | border-bottom: 0.14em solid #111111; 72 | } 73 | 74 | .lightable-classic.lightable-hover tbody tr:hover { 75 | background-color: #F9EEC1; 76 | } 77 | 78 | .lightable-classic.lightable-striped tbody tr:nth-child(even) { 79 | background-color: #f5f5f5; 80 | } 81 | 82 | .lightable-classic-2 { 83 | border-top: 3px double #111111; 84 | width: 100%; 85 | margin-bottom: 10px; 86 | } 87 | 88 | .lightable-classic-2 caption { 89 | color: #222222; 90 | } 91 | 92 | .lightable-classic-2 td { 93 | padding-left: 5px; 94 | padding-right: 5px; 95 | color: #222222; 96 | } 97 | 98 | .lightable-classic-2 th { 99 | padding-left: 5px; 100 | padding-right: 5px; 101 | font-weight: normal; 102 | color: #222222; 103 | } 104 | 105 | .lightable-classic-2 tbody tr:last-child td { 106 | border-bottom: 3px double #111111; 107 | } 108 | 109 | .lightable-classic-2 thead tr:last-child th { 110 | border-bottom: 1px solid #111111; 111 | } 112 | 113 | .lightable-classic-2.lightable-hover tbody tr:hover { 114 | background-color: #F9EEC1; 115 | } 116 | 117 | .lightable-classic-2.lightable-striped tbody tr:nth-child(even) { 118 | background-color: #f5f5f5; 119 | } 120 | 121 | .lightable-material { 122 | min-width: 100%; 123 | white-space: nowrap; 124 | table-layout: fixed; 125 | font-family: Roboto, sans-serif; 126 | border: 1px solid #EEE; 127 | border-collapse: collapse; 128 | margin-bottom: 10px; 129 | } 130 | 131 | .lightable-material th { 132 | height: 56px; 133 | padding-left: 16px; 134 | padding-right: 16px; 135 | } 136 | 137 | .lightable-material td { 138 | height: 52px; 139 | padding-left: 16px; 140 | padding-right: 16px; 141 | border-top: 1px solid #eeeeee; 142 | } 143 | 144 | .lightable-material.lightable-hover tbody tr:hover { 145 | background-color: #f5f5f5; 146 | } 147 | 148 | .lightable-material.lightable-striped tbody tr:nth-child(even) { 149 | background-color: #f5f5f5; 150 | } 151 | 152 | .lightable-material.lightable-striped tbody td { 153 | border: 0; 154 | } 155 | 156 | .lightable-material.lightable-striped thead tr:last-child th { 157 | border-bottom: 1px solid #ddd; 158 | } 159 | 160 | .lightable-material-dark { 161 | min-width: 100%; 162 | white-space: nowrap; 163 | table-layout: fixed; 164 | font-family: Roboto, sans-serif; 165 | border: 1px solid #FFFFFF12; 166 | border-collapse: collapse; 167 | margin-bottom: 10px; 168 | background-color: #363640; 169 | } 170 | 171 | .lightable-material-dark th { 172 | height: 56px; 173 | padding-left: 16px; 174 | padding-right: 16px; 175 | color: #FFFFFF60; 176 | } 177 | 178 | .lightable-material-dark td { 179 | height: 52px; 180 | padding-left: 16px; 181 | padding-right: 16px; 182 | color: #FFFFFF; 183 | border-top: 1px solid #FFFFFF12; 184 | } 185 | 186 | .lightable-material-dark.lightable-hover tbody tr:hover { 187 | background-color: #FFFFFF12; 188 | } 189 | 190 | .lightable-material-dark.lightable-striped tbody tr:nth-child(even) { 191 | background-color: #FFFFFF12; 192 | } 193 | 194 | .lightable-material-dark.lightable-striped tbody td { 195 | border: 0; 196 | } 197 | 198 | .lightable-material-dark.lightable-striped thead tr:last-child th { 199 | border-bottom: 1px solid #FFFFFF12; 200 | } 201 | 202 | .lightable-paper { 203 | width: 100%; 204 | margin-bottom: 10px; 205 | color: #444; 206 | } 207 | 208 | .lightable-paper thead tr:last-child th { 209 | color: #666; 210 | vertical-align: bottom; 211 | border-bottom: 1px solid #00000020; 212 | line-height: 1.15em; 213 | padding: 10px 5px; 214 | } 215 | 216 | .lightable-paper td { 217 | vertical-align: middle; 218 | border-bottom: 1px solid #00000010; 219 | line-height: 1.15em; 220 | padding: 7px 5px; 221 | } 222 | 223 | .lightable-paper.lightable-hover tbody tr:hover { 224 | background-color: #F9EEC1; 225 | } 226 | 227 | .lightable-paper.lightable-striped tbody tr:nth-child(even) { 228 | background-color: #00000008; 229 | } 230 | 231 | .lightable-paper.lightable-striped tbody td { 232 | border: 0; 233 | } 234 | 235 | -------------------------------------------------------------------------------- /lectures/07-probit/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.1.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.10.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.10.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.11.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.11.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.11.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.12.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.12.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.12.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.13.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.13.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.14.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.14.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.15.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.16.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.16.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.17.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.17.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.2.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.3.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.3.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.4.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.4.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.5.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.5.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.6.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.6.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.7.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.7.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.8.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.8.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.9.pdf -------------------------------------------------------------------------------- /lectures/08-learning/imgs/2.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/2.9.png -------------------------------------------------------------------------------- /lectures/08-learning/imgs/app.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/lectures/08-learning/imgs/app.gif -------------------------------------------------------------------------------- /lectures/08-learning/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/08-learning/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/09-unsupervised/libs/header-attrs/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /lectures/09-unsupervised/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right + * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/template/learning.R: -------------------------------------------------------------------------------- 1 | rm(list=ls()) 2 | library(ggplot2) 3 | library(splines) 4 | library(dplyr) 5 | # 6 | # tfun <- function(x) { 7 | # x + 0.1 * x^2 - 0.002 * x^3 + 0.00001 *x^4 8 | # } 9 | 10 | # sin(x-2) + x-0.05*x^2 11 | 12 | getmodels <- function(x,y,newx,dfs = 2:20){ 13 | r = data.frame(x=x,y=y) 14 | o = data.frame(x=newx) 15 | s = list() 16 | # browser() 17 | for (i in 1:length(dfs)){ 18 | if (dfs[i] == 2){ 19 | s[[i]] <- lm(y~x,r) 20 | o = cbind(o, predict(s[[i]], newdata = o)) 21 | } else { 22 | s[[i]] <- smooth.spline(x,y,df = dfs[i]) 23 | o = cbind(o, predict(s[[i]], o$x)$y) 24 | } 25 | } 26 | names(o)[-c(1)] <- paste0("df",dfs) 27 | names(s) <- paste0("df",dfs) 28 | list(models = s, pred = o) 29 | } 30 | 31 | datafig2.12 <- function(fun = function(x) {x*sin(x-2) + 0.2*x},n=90,eps = 1,df1=5, df2=40, ub = 5,nnew = 200){ 32 | set.seed(1234) 33 | 34 | r = data.frame(x = seq(0,ub,length.out = n)) 35 | r$truth = fun(r$x) 36 | r$epsi = rnorm(n,mean = 0, sd = eps) 37 | r$y = r$truth + r$epsi 38 | # browser() 39 | 40 | mods = getmodels(r$x,r$y,seq(0,ub, length.out = nnew)) 41 | # add test data to predictions 42 | mods$pred$truth = fun(mods$pred$x) 43 | mods$pred$testdata = mods$pred$truth + rnorm(nnew,mean = 0, sd = eps) 44 | # mses and bias 45 | mses = list( 46 | train = colMeans(sapply(mods$models,residuals)^2) 47 | ) # test mses 48 | mses$test <- colMeans((mods$pred[,names(mods$models)] - mods$pred[,"testdata"])^2) 49 | 50 | # bias 51 | mses$bias <- colMeans((mods$pred[,names(mods$models)] - mods$pred[,"truth"])^2) 52 | mses$var <- diag(var(mods$pred[,names(mods$models)])) 53 | list(mods,mses) 54 | 55 | } 56 | x = datafig2.12() 57 | 58 | plotfig2.12 <- function(d) { 59 | stopifnot(is.list(d)) 60 | m = data.frame(d) 61 | m$x = 2:(nrow(m)+1) 62 | m = reshape2::melt(m,id.vars = "x") 63 | m %>% 64 | rename(model = variable) %>% 65 | ggplot(aes(x=x,y = value, color = model)) + geom_point() 66 | 67 | } 68 | plot(plotfig2.12(x[[2]])) 69 | 70 | smes1 <- function(fun = function(x) {x*sin(x-2) + 0.2*x},n=90,eps = 1,df1=5, df2=40, ub = 5,nnew = 200){ 71 | set.seed(1234) 72 | 73 | r = data.frame(x = seq(0,ub,length.out = n)) 74 | r$truth = fun(r$x) 75 | r$epsi = rnorm(n,mean = 0, sd = eps) 76 | r$y = r$truth + r$epsi 77 | # browser() 78 | mods = list() 79 | mods$lm = lm(y ~ x,data = r) 80 | mods$low = smooth.spline(r$x,r$y,df = df1) 81 | mods$hi = smooth.spline(r$x,r$y, df = df2) 82 | # mods$ns5 = gam::gam(formula = as.formula(paste0("y ~ s(x,",df1,")")),data = r) 83 | # mods$ns5 = mgcv::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df1,")")),data = r) 84 | # mods$ns20 = gam::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df2,")")),data = r) 85 | # mods$ns20 = mgcv::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df2,")")),data = r) 86 | 87 | names(mods)[2:3] <- paste0("s",c(df1,df2)) 88 | 89 | 90 | # mses and bias 91 | mses = list( 92 | train = colMeans(sapply(mods,residuals)^2) 93 | ) 94 | 95 | # predictions 96 | preds = data.frame(x = seq(0,ub, length.out = nnew)) 97 | preds = cbind(preds, lm = predict(mods$lm,newdata = preds)) 98 | preds = cbind(preds,sapply(mods[2:3],function(x) predict(x,preds$x)$y)) 99 | preds$truth = fun(preds$x) #+ rnorm(nnew,mean = 0, sd = eps) 100 | mnames = names(preds)[-1] 101 | preds$testdata = preds$truth + rnorm(nnew,mean = 0, sd = eps) 102 | 103 | # test mses 104 | mses$test <- colMeans((preds[,names(mods)] - preds[,"testdata"])^2) 105 | 106 | # bias 107 | mses$bias <- colMeans((preds[,names(mods)] - preds[,"truth"])^2) 108 | mses$var <- diag(var(preds[,names(mods)])) 109 | 110 | mp = reshape2::melt(preds[,-ncol(preds)], id.vars = "x") 111 | names(mp)[2] <- "model" 112 | 113 | # make plots 114 | p1 = ggplot() + theme_bw() 115 | # points 116 | p1 = p1 + geom_point(data = r,aes(x = x, y = y),shape = 1,size = 2) 117 | p1 = p1 + geom_line(data=mp, aes(x = x, y = value, color = model), size = 1) 118 | # 119 | # color scale 120 | cnames = c("orange", "blue" , "green","black") 121 | names(cnames) <- mnames 122 | p1 = p1 + scale_color_manual(values = cnames) 123 | 124 | # flexilibty plot 125 | d2 = data.frame(flexibility = c(2,df1,df2),model = c("lm",paste0(df1," df"),paste0(df2," df")), train = mses$train, test = mses$test) 126 | d2 = reshape2::melt(d2, id.vars = c("flexibility","model")) 127 | names(d2)[3] <- "type" 128 | p2 = ggplot(data = d2, aes(x = flexibility, y = value,linetype = type)) + geom_path(color = "black") + scale_y_continuous(name = "MSE") 129 | cnames = c("orange", "blue" , "green") 130 | names(cnames) <- c("lm",paste0(df1," df"),paste0(df2," df")) 131 | p2 = p2 + geom_point(data = d2, aes(color = model), size = 3, shape = 15) + scale_color_manual(values = cnames) 132 | # add minimal test MSE 133 | p2 = p2 + geom_hline(yintercept = eps^2, linetype = "dashed", color = "grey")+ theme_bw() 134 | cowplot::plot_grid(p1,p2) 135 | # list(p1,p2) 136 | } 137 | 138 | smes2 <- function(fun = function(x) {x*sin(x-2) + 0.2*x},n=90,eps = 1,df1=5, df2=20, df3=60, ub = 5,nnew = 200){ 139 | set.seed(1234) 140 | 141 | r = data.frame(x = seq(0,ub,length.out = n)) 142 | r$truth = fun(r$x) 143 | r$epsi = rnorm(n,mean = 0, sd = eps) 144 | r$y = r$truth + r$epsi 145 | # browser() 146 | mods = list() 147 | mods$lm = lm(y ~ x,data = r) 148 | mods$low = smooth.spline(r$x,r$y,df = df1) 149 | mods$hi = smooth.spline(r$x,r$y, df = df2) 150 | mods$hi2 = smooth.spline(r$x,r$y, df = df3) 151 | # mods$ns5 = gam::gam(formula = as.formula(paste0("y ~ s(x,",df1,")")),data = r) 152 | # mods$ns5 = mgcv::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df1,")")),data = r) 153 | # mods$ns20 = gam::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df2,")")),data = r) 154 | # mods$ns20 = mgcv::gam(formula = as.formula(paste0("y ~ ns(x,df = ",df2,")")),data = r) 155 | 156 | names(mods)[2:4] <- paste0("s",c(df1,df2,df3)) 157 | 158 | 159 | # mses 160 | mses = list( 161 | train = colMeans(sapply(mods,residuals)^2) 162 | ) 163 | 164 | # predictions 165 | preds = data.frame(x = seq(0,ub, length.out = nnew)) 166 | preds = cbind(preds, lm = predict(mods$lm,newdata = preds)) 167 | preds = cbind(preds,sapply(mods[2:4],function(x) predict(x,preds$x)$y)) 168 | preds$truth = fun(preds$x) #+ rnorm(nnew,mean = 0, sd = eps) 169 | mnames = names(preds)[-1] 170 | preds$testdata = preds$truth + rnorm(nnew,mean = 0, sd = eps) 171 | 172 | # test mses 173 | mses$test <- colMeans((preds[,names(mods)] - preds[,"testdata"])^2) 174 | 175 | mp = reshape2::melt(preds[,-ncol(preds)], id.vars = "x") 176 | names(mp)[2] <- "model" 177 | 178 | # make plots 179 | p1 = ggplot() + theme_bw() 180 | # points 181 | p1 = p1 + geom_point(data = r,aes(x = x, y = y),shape = 1,size = 2) 182 | p1 = p1 + geom_line(data=mp, aes(x = x, y = value, color = model), size = 1) 183 | # 184 | # color scale 185 | cnames = c("orange", "blue" , "green","purple","black") 186 | names(cnames) <- mnames 187 | p1 = p1 + scale_color_manual(values = cnames) 188 | 189 | # flexilibty plot 190 | d2 = data.frame(flexibility = c(2,df1,df2,df3),model = c("lm",paste0(df1," df"),paste0(df2," df"),paste0(df3," df")), train = mses$train, test = mses$test) 191 | d2 = reshape2::melt(d2, id.vars = c("flexibility","model")) 192 | names(d2)[3] <- "type" 193 | p2 = ggplot(data = d2, aes(x = flexibility, y = value,linetype = type)) + geom_path(color = "black") + scale_y_continuous(name = "MSE") 194 | cnames = c("orange", "blue" , "green","purple") 195 | names(cnames) <- c("lm",paste0(df1," df"),paste0(df2," df"),paste0(df3," df")) 196 | p2 = p2 + geom_point(data = d2, aes(color = model), size = 3, shape = 15) + scale_color_manual(values = cnames) + theme_bw() 197 | # add minimal test MSE 198 | p2 = p2 + geom_hline(yintercept = eps^2, linetype = "dashed", color = "grey") 199 | cowplot::plot_grid(p1,p2) 200 | # list(p1,p2) 201 | } 202 | 203 | # running 204 | # figure 2.9 205 | # print(smes1()) 206 | # figure 2.10 207 | # print(smes1(fun = function(x){x^1.2})) 208 | # figure 2.11 209 | # print(smes1(fun = function(x){4*x*sin(x) - 0.5*x^2})) 210 | 211 | # 212 | # z <- simdata() 213 | # 214 | # gp1 <- function(z) { 215 | # p1 = ggplot(data = z,aes(x = x, y = y)) + theme_bw() 216 | # # points 217 | # p1 = p1 + geom_point(shape = 1,size = 2) 218 | # # lm 219 | # p1 = p1 + geom_smooth(method = "lm", se = FALSE, aes(color = "lm")) 220 | # # smooth df=5 221 | # p1 = p1 + geom_smooth(method = "mgcv::gam", se = FALSE, formula = y ~ ns(x, df = 5), aes(color = "spline 5 df")) 222 | # # smooth df=5 223 | # p1 = p1 + geom_smooth(method = "mgcv::gam", se = FALSE, formula = y ~ ns(x, df = 12), aes(color = "spline 12 df")) 224 | # # p1 225 | # # truth 226 | # p1 = p1 + stat_function(data = data.frame(x = c(0,100)),aes(x=x,y = NULL,color = "truth"),fun = tfun, size = 1) 227 | # 228 | # # color scale 229 | # p1 + scale_color_manual(values = c("lm" = "orange", "spline 5 df" = "blue" , "spline 12 df" = "green", "truth" = "black" )) 230 | # } 231 | # 232 | # 233 | -------------------------------------------------------------------------------- /lectures/template/libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right ~ * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lectures/template/pca.R: -------------------------------------------------------------------------------- 1 | 2 | data(Carseats,package = "ISLR") 3 | library(ggplot2) 4 | library(dplyr) 5 | 6 | t100 = Carseats %>% 7 | filter(Advertising > 0) %>% 8 | mutate(Population = Population / 10) %>% 9 | top_n(100,Population) 10 | ggplot(t100, aes(x = Population, y = Advertising)) + geom_point() 11 | 12 | 13 | # too difficult 14 | data(Hitters,package = "ISLR") 15 | summary(lm(Salary~., Hitters)) 16 | x=model.matrix(Salary~.,Hitters)[,-1] 17 | y=Hitters$Salary 18 | train=sample(1:nrow(x), nrow(x)/2) 19 | test=(-train) 20 | y.test=y[test] 21 | 22 | library(pls) 23 | pcr.fit=pcr(Salary~., data=Hitters ,scale=TRUE,validation ="CV") 24 | summary(pcr.fit) 25 | validationplot(pcr.fit,val.type="MSEP") 26 | 27 | pcr.fit=pcr(Salary~., data=Hitters,subset=train,scale=TRUE, 28 | validation ="CV") 29 | validationplot(pcr.fit,val.type="MSEP") 30 | 31 | # pca lab 10.4 32 | states = row.names(USArrests) 33 | apply(USArrests , 2, mean) 34 | apply(USArrests , 2, var) 35 | skimr::skim(USArrests) 36 | 37 | # must standardize 38 | pr.out=prcomp(USArrests, scale=TRUE) 39 | names(pr.out) 40 | pr.out$center 41 | pr.out$scale 42 | # loading vectors 43 | pr.out$rotation 44 | # PC score matrix 45 | dim(pr.out$x) 46 | biplot(pr.out, scale=0) 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /lectures/template/template.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "ScPoEconometrics: Advanced" 3 | subtitle: "TEMPLATE" 4 | author: "Florian Oswald" 5 | date: "SciencesPo Paris
    `r Sys.Date()`" 6 | output: 7 | xaringan::moon_reader: 8 | lib_dir: libs 9 | css: [default, "../../css/scpo.css", "../../css/scpo-fonts.css"] 10 | nature: 11 | beforeInit: ["../../js/ru_xaringan.js"] 12 | highlightStyle: github 13 | highlightLines: true 14 | countIncrementalSlides: false 15 | ratio: "16:9" 16 | includes: 17 | in_header: ["../../libs/partials/header.html"] 18 | --- 19 | 20 | layout: true 21 | 22 | 23 | 24 | --- 25 | 26 | ```{r setup, include=FALSE,warning=FALSE,message=FALSE} 27 | options(htmltools.dir.version = FALSE) 28 | knitr::opts_chunk$set( 29 | message = FALSE, 30 | warning = FALSE, 31 | dev = "svg", 32 | cache = TRUE, 33 | fig.align = "center" 34 | #fig.width = 11, 35 | #fig.height = 5 36 | ) 37 | 38 | # define vars 39 | om = par("mar") 40 | lowtop = c(om[1],om[2],0.1,om[4]) 41 | library(magrittr) 42 | 43 | ``` 44 | 45 | # Where Did We Stop Last Week? 46 | 47 | .pull-left[ 48 | * Last week we learned about *sampling distributions* 49 | 50 | * We took repeated samples from a population (Fusilli or plastic balls) and computed an **estimate** of the sample proportion $\hat{p}$ over and over again 51 | 52 | * We took 1000 (!) samples and looked how the sampling distribution evolved as we increased sample sizes from $n=25$ to $n=100$. 53 | 54 | * Our estimates became *more precise* as $n$ increased. 55 | 56 | ] 57 | 58 | -- 59 | 60 | .pull-right[ 61 | * We introduced notation: 62 | * population size $N$, 63 | * *point estimate* (like $\hat{p}$), 64 | * standard error *of* an estimate 65 | 66 | * We said *random sampling produces **unbiased** estimates*. 67 | 68 | * Our sample statistics provided **good guesses** about the true population parameters of interest. 69 | ] 70 | 71 | 72 | --- 73 | 74 | 75 | --- 76 | layout: false 77 | class: separator, middle 78 | 79 | # SEPARATOR 80 | 81 | 82 | 83 | --- 84 | layout: true 85 | 86 | 87 | 88 | --- 89 | 90 | # next slide 91 | 92 | 93 | --- 94 | 95 | 96 | class: title-slide-final, middle 97 | background-image: url(../../img/logo/ScPo-econ.png) 98 | background-size: 250px 99 | background-position: 9% 19% 100 | 101 | # END 102 | 103 | 104 | 105 | 106 | | | | 107 | | :--------------------------------------------------------------------------------------------------------- | :-------------------------------- | 108 | | .ScPored[] | florian.oswald@sciencespo.fr | 109 | | .ScPored[] | Slides | 110 | | .ScPored[] | Book | 111 | | .ScPored[] | @ScPoEcon | 112 | | .ScPored[] | @ScPoEcon | 113 | 114 | -------------------------------------------------------------------------------- /lectures/template/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ScPoEconometrics Advanced 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 111 | 112 | 113 | 114 | 202 | 203 | 222 | 223 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /libs/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | -------------------------------------------------------------------------------- /libs/remark-css-0.0.1/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right ~ * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /libs/remark-css/default.css: -------------------------------------------------------------------------------- 1 | a, a > code { 2 | color: rgb(249, 38, 114); 3 | text-decoration: none; 4 | } 5 | .footnote { 6 | position: absolute; 7 | bottom: 3em; 8 | padding-right: 4em; 9 | font-size: 90%; 10 | } 11 | .remark-code-line-highlighted { background-color: #ffff88; } 12 | 13 | .inverse { 14 | background-color: #272822; 15 | color: #d6d6d6; 16 | text-shadow: 0 0 20px #333; 17 | } 18 | .inverse h1, .inverse h2, .inverse h3 { 19 | color: #f3f3f3; 20 | } 21 | /* Two-column layout */ 22 | .left-column { 23 | color: #777; 24 | width: 20%; 25 | height: 92%; 26 | float: left; 27 | } 28 | .left-column h2:last-of-type, .left-column h3:last-child { 29 | color: #000; 30 | } 31 | .right-column { 32 | width: 75%; 33 | float: right; 34 | padding-top: 1em; 35 | } 36 | .pull-left { 37 | float: left; 38 | width: 47%; 39 | } 40 | .pull-right { 41 | float: right; 42 | width: 47%; 43 | } 44 | .pull-right ~ * { 45 | clear: both; 46 | } 47 | img, video, iframe { 48 | max-width: 100%; 49 | } 50 | blockquote { 51 | border-left: solid 5px lightgray; 52 | padding-left: 1em; 53 | } 54 | .remark-slide table { 55 | margin: auto; 56 | border-top: 1px solid #666; 57 | border-bottom: 1px solid #666; 58 | } 59 | .remark-slide table thead th { border-bottom: 1px solid #ddd; } 60 | th, td { padding: 5px; } 61 | .remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee } 62 | 63 | @page { margin: 0; } 64 | @media print { 65 | .remark-slide-scaler { 66 | width: 100% !important; 67 | height: 100% !important; 68 | transform: scale(1) !important; 69 | top: 0 !important; 70 | left: 0 !important; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /rds/balls_percentile_cis.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/balls_percentile_cis.rds -------------------------------------------------------------------------------- /rds/iris_inc.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/iris_inc.rds -------------------------------------------------------------------------------- /rds/iris_shapefile_2015.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/iris_shapefile_2015.dbf -------------------------------------------------------------------------------- /rds/iris_shapefile_2015.prj: -------------------------------------------------------------------------------- 1 | PROJCS["Lambert_Conformal_Conic",GEOGCS["GCS_GRS 1980(IUGG, 1980)",DATUM["D_unknown",SPHEROID["GRS80",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["Meter",1]] -------------------------------------------------------------------------------- /rds/iris_shapefile_2015.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/iris_shapefile_2015.rds -------------------------------------------------------------------------------- /rds/iris_shapefile_2015.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/iris_shapefile_2015.shp -------------------------------------------------------------------------------- /rds/iris_shapefile_2015.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/iris_shapefile_2015.shx -------------------------------------------------------------------------------- /rds/pasta_percentile_cis.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/pasta_percentile_cis.rds -------------------------------------------------------------------------------- /rds/shuffled_data.rds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScPoEcon/Advanced-Metrics-slides/bd60aa1d166529b4b52867910fbd281292f132c3/rds/shuffled_data.rds --------------------------------------------------------------------------------