Git Product home page Git Product logo

applied-metrics's Introduction

ARE213: Applied Econometrics - Section Notes

This is a repository for ARE213 section notes, taught by Michael Anderson at UC Berkeley. The project is equipped to deal with R and Clojure code. Clojure is a functional programming language that is well-suited for multi-threaded processing. However, for this class, we will deal mainly with the R code, unless someone is particularly interested in learning this exciting new language. To find the text and code for this project, you'll have to navigate to the src/r directory. Each section has its own subdirectory that contains at least three core files:

  1. An org-mode document .org that compiles to the .pdf, .tex, and .R files. In fact, the org-mode document is the code; and you can dynamically update all downstream documents from within Emacs' org-mode. You do not have to interact with the org-mode document directly if you are not using Emacs, but rather just with the R code or PDF write-up. If you'd like to get set up with Emacs (highly recommended) then please see the next section of this README.

  2. A PDF of the section notes, which effectively documents the code. If you are only interested in following along, rather than running the code yourself, just browse to the .pdf file for the section (e.g. sec-01.pdf) and click "view raw". The PDF will begin downloading immediately. https://github.com/danhammer/applied-metrics/tree/develop/src/r/section-01

  3. An R script that compiles all of the code within the PDF. Note that there is no documentation within the code. Instead, the code is documented from the PDF description.

The sections are organized as follows:

section-01 Summary statistics in R

section-02 SUTVA and nonparametric regression

section-06 Propensity Score Matching

section-07 Random and Fixed Effects

section-08 Difference-n-differencess Estimation

section-10 Instrumental Variables

section-11 Regression Discontinuity

section-12 Time series warping

Help me write this!

This project can and should be treated like any other open source, collaborative coding project. If you are interested in helping me make this project better, fork the repo, edit the screwy files, and send a pull request. I will review and merge the changes -- until someone else takes over!

Org mode notes

If you are running Emacs, then you have access to org-mode, an open source solution for interactive coding and reproducible research. The code, documentation, and results are all bundled into the same file. The #+RESULTS output is automatically generated from the immediately preceding code block.

A few things to note. When you try to compile the .org files to a PDF document, you may have to compile it twice or reload the buffer using C-u M-x org-reload. To tangle the code within the org-mode document to an .R script, you can use the key binding C-c C-v t.

You can highlight code by using the minted package in LaTeX. For this, from the command line, make sure that you invoke pdflatex with the -shell-escape flag. For example,

cd ~/Dropbox/github/danhamer/applied-metrics/src/r/section-02
pdflatex -shell-escape sec-02

Ensure that you have the proper minted.sty file by downloading the zipfile, installing it, and then ensuring that LaTeX knows where everything is:

unzip minted.zip
cd minted/
latex minted.ins
sudo texhash

Finally, you will have to add the following to your .emacs.d/init.el file, and make sure it doesn't conflict with anything else in there:

(require 'org-latex)
(setq org-export-latex-listings t)
(setq org-export-latex-listings 'minted)
(add-to-list 'org-export-latex-packages-alist '("" "minted"))
(add-to-list 'org-export-latex-packages-alist '("" "color"))
(add-to-list 'org-export-latex-minted-langs '(R "r"))

applied-metrics's People

Contributors

danhammer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.