{ "cells": [ { "cell_type": "markdown", "id": "36c10b64", "metadata": {}, "source": [ "# Stata, Jupyter, and Reproducible Research\n", "\n", "From [Wikipedia](https://en.wikipedia.org/wiki/Reproducibility#Reproducible_research), reproducible research is defined as:\n", "\n", ">The term reproducible research refers to the idea that the ultimate product of\n", "academic research is the paper **along with** the full computational\n", "environment used to produce the results in the paper such as the code, data,\n", "etc. that can be used to reproduce the results and create new work based on the\n", "research.\n", "\n", "The reproducible research movement (especially for the statistical sciences)\n", "takes this a step further by advocating for dynamic documents. The idea is\n", "that a researcher should provide a file (the dynamic document) that can execute\n", "the statistical analysis, generate figures, and contains accompanying text\n", "narrative. This file can be executed to produce the **academic paper**. The\n", "researcher shares this file with other researchers rather than the only the\n", "paper. It is my view that within 20 years nearly every scientific journal in\n", "applied statistics will require this approach.\n", "\n", "This document shows how to use [jupyter](https://jupyter.org/)\n", "`notebook` or `lab` and markdown syntax for reproducible research and\n", "dynamic documents for work in stata. The idea behind `jupyter` is\n", "that you share your research by sharing your `ipynb` notebook file.\n", "This file performs the full suite of statistical analysis and can\n", "produce the pdf manuscript describing your analysis. You will use\n", "this workflow for all class problem set assignments.\n", "\n", "For every problem set, you will turn in the jupyter notebook `ipynb`\n", "(similar to a do file) file containing all commands, descriptive text,\n", "and embedded handwritten responses that produces your problem set." ] }, { "cell_type": "markdown", "id": "c93297da-a06b-439b-a696-d0673fbfb177", "metadata": {}, "source": [ "## Getting Started\n", "\n", "1. Follow the instructions in the Word document supplied by IT (`Using an Assigned Workspaces Desktop.docx`) for how to get going with virtual desktops via Amazon Workspaces. This document should be sent to you via email, but I have also added it under the [Introduction Section](https://classroom.google.com/u/0/w/NTI2NDQxNzU5NDc3/t/all) of the course website. \n", "2. In the virtual desktop, make Microsoft Edge or Firefox your default web browser\n", "3. Next, we need to do a few \"housekeeping\" items to make things work smoothly in our Anaconda Python environment.\n", " - Open an \"Anaconda Prompt\" from \"Start\" -> \"Computer Science\" -> \"Anaconda\"\n", " - At this command prompt type in the following and press enter for each step:\n", " - Create an anaconda environment for this class: `conda create -n econ407 -c conda-forge jupyter ipython jupyterlab nodejs`\n", " - Activate the course environment: `conda activate econ407` \n", " - Install pystata-kernel:\n", " - `pip install pystata-kernel`\n", " - `python -m pystata-kernel.install`\n", " - Activate Stata syntax highlighting in jupyter: =jupyter labextension install jupyterlab-stata-highlight=\n", " - Using `NotePad++` edit `D:\\UserProfile\\YOURUSERNAME\\.pystata-kernel.conf` so it looks like this (=YOURUSERNAME= is your campus login name):\n", " ```\n", " [pystata-kernel]\n", " stata_dir = \\\\Apps2.campus.wm.edu\\apps\\Stata\\17\\\n", " edition = se\n", " graph_format = png\n", " echo = False\n", " splash = False\n", " ```\n", "4. Your Stata session using jupyter should be ready to use. To launch it, back at the \"Anaconda Prompt\"\n", " - issue `H:\\` to move into your H drive for saving your work\n", " - issue `jupyter lab` to start jupyter lab, you should see this:\n", " ![](https://econ.pages.code.wm.edu/407/syllabus/_images/stata-jupyter-pystata.png)\n", " Note:\n", " - Make sure you see the \"Stata\" items as the screenshot shows above\n", " - If you click on the folder icon on the left, the files listed in the left hand panel should be from your H Drive \n", " - See Point 7!!!!\n", "5. Click on \"Notebook\" -> \"Stata\" to create a new Stata Notebook.\n", "6. You can issue Stata commands as I demonstrate in class. E.g.:\n", " - `sysuse auto`\n", " - `sum`\n", " - `hist price`\n", "7. Never close the Anaconda Prompt window. You can minimize it, but closing it will require you to repeat these steps from 3 above:\n", " - Open the \"Anaconda Prompt\", and issue the following commands:\n", " - Activate the class python session: `conda activate econ407`\n", " - Ensure you are working in your H: drive: `H:` \n", " - Open jupyter lab: `jupyter lab`" ] }, { "cell_type": "markdown", "id": "1b312b1e", "metadata": {}, "source": [ "## Some Features of Markdown in Jupyter\n", "\n", "Jupyter allows for most features of\n", "[Markdown](https://daringfireball.net/projects/markdown/syntax), which\n", "is a liteweight and readable **text-based** language that allows files\n", "to be easily converted to nice looking pdf, html, or even word\n", "documents. Some features you will likely want to use:\n", "\n", "* Equations and Math Notation using latex math\n", "* Headers\n", "* Emphasizing text (bold and italics)\n", "* Numeric and bulletted lists\n", "* Turning stata output on and off\n", "* Adding page breaks for `pdf` output using `\\pagebreak` anywhere in a markdown code cell\n", "\n", "## A simple example analysis using Markdown syntax\n", "\n", "Below we'll be modeling the following regression equation for cars\n", "back in the day:\n", "\n", "$$\n", "price_i = \\beta_0 + \\beta_1 mpg_i + \\beta_2 foreign_i + \\epsilon_i\n", "$$\n", "\n", "\\pagebreak\n", "### Load Data and Summarize\n", "\n", "If you are using campus computers, initiate your `Stata` session in\n", "`jupyter` using this python code cell:" ] }, { "cell_type": "markdown", "id": "521f7a9b", "metadata": {}, "source": [ "At this point you are free to execute stata commands interactively in\n", "your notebook. If you encounter any problems, open an issue at the\n", "[issue-tracker](https://code.wm.edu/econ/407/issue-tracker).\n", "\n", "Summarizing the data shows the variables we can consider in our\n", "analysis using a `Stata` code cell:" ] }, { "cell_type": "code", "execution_count": 1, "id": "8222ebd7", "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", ". sysuse auto\n", "(1978 automobile data)\n", "\n", ". sum\n", "\n", " Variable | Obs Mean Std. dev. Min Max\n", "-------------+---------------------------------------------------------\n", " make | 0\n", " price | 74 6165.257 2949.496 3291 15906\n", " mpg | 74 21.2973 5.785503 12 41\n", " rep78 | 69 3.405797 .9899323 1 5\n", " headroom | 74 2.993243 .8459948 1.5 5\n", "-------------+---------------------------------------------------------\n", " trunk | 74 13.75676 4.277404 5 23\n", " weight | 74 3019.459 777.1936 1760 4840\n", " length | 74 187.9324 22.26634 142 233\n", " turn | 74 39.64865 4.399354 31 51\n", "displacement | 74 197.2973 91.83722 79 425\n", "-------------+---------------------------------------------------------\n", " gear_ratio | 74 3.014865 .4562871 2.19 3.89\n", " foreign | 74 .2972973 .4601885 0 1\n", "\n", ". \n" ] } ], "source": [ "sysuse auto\n", "sum" ] }, { "cell_type": "markdown", "id": "498279ce", "metadata": {}, "source": [ "We might also want to look at histograms of our dependent variable, `price`:" ] }, { "cell_type": "code", "execution_count": 2, "id": "e948b3e6", "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(bin=8, start=3291, width=1576.875)\n" ] }, { "data": { "image/svg+xml": [ "\n", "\tStata Graph - Graph\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t0\n", "\t\n", "\t1.0e-04\n", "\t\n", "\t2.0e-04\n", "\t\n", "\t3.0e-04\n", "\t\n", "\tDensity\n", "\t\n", "\t0\n", "\t\n", "\t5,000\n", "\t\n", "\t10,000\n", "\t\n", "\t15,000\n", "\t\n", "\tPrice\n", "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "hist price" ] }, { "cell_type": "markdown", "id": "4422867e", "metadata": {}, "source": [ "\\pagebreak\n", "\n", "## Regression Model\n", "\n", "Here are the regression results:" ] }, { "cell_type": "code", "execution_count": 3, "id": "181763eb", "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " Source | SS df MS Number of obs = 74\n", "-------------+---------------------------------- F(2, 71) = 14.07\n", " Model | 180261702 2 90130850.8 Prob > F = 0.0000\n", " Residual | 454803695 71 6405685.84 R-squared = 0.2838\n", "-------------+---------------------------------- Adj R-squared = 0.2637\n", " Total | 635065396 73 8699525.97 Root MSE = 2530.9\n", "\n", "------------------------------------------------------------------------------\n", " price | Coefficient Std. err. t P>|t| [95% conf. interval]\n", "-------------+----------------------------------------------------------------\n", " mpg | -294.1955 55.69172 -5.28 0.000 -405.2417 -183.1494\n", " foreign | 1767.292 700.158 2.52 0.014 371.2169 3163.368\n", " _cons | 11905.42 1158.634 10.28 0.000 9595.164 14215.67\n", "------------------------------------------------------------------------------\n" ] } ], "source": [ "reg price mpg foreign" ] }, { "cell_type": "markdown", "id": "9256494f", "metadata": {}, "source": [ "## Discussion of Results\n", "\n", "We can now proceed to describe our results and add narrative to the\n", "document: Looks like back in the day, foreign cars sell for more!\n", "\n", "## Jupyter and Mata\n", "\n", "Mata is the matrix algebra environment in stata. It operates exactly as a Stata code block by wrapping code with `mata` and `end`:\n", "\n", "Define $\\mathbf{A}_{2 \\times 2}$ as\n", "\n", "$$\n", "\\mathbf{A}=\\begin{bmatrix} 1 & 2 \\\\\n", " 3 & 4 \\end{bmatrix}\n", "$$" ] }, { "cell_type": "code", "execution_count": 12, "id": "4c32c391", "metadata": { "collapsed": false, "jupyter": { "outputs_hidden": false } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", ". mata\n", "------------------------------------------------- mata (type end to exit) -----\n", ": A = (1,2\\3,4)\n", "\n", ": A\n", " 1 2\n", " +---------+\n", " 1 | 1 2 |\n", " 2 | 3 4 |\n", " +---------+\n", "\n", ": end\n", "-------------------------------------------------------------------------------\n", "\n", ". \n" ] } ], "source": [ "mata\n", "A = (1,2\\3,4)\n", "A\n", "end" ] }, { "cell_type": "markdown", "id": "dfc8d164", "metadata": {}, "source": [ "## Producing pdf's from your notebook\n", "\n", "It is possible to export your notebook in a variety of formats\n", "including pdf. To do this click on the download link in the top\n", "corner of this page and choose `pdf`. To create a `pdf` from your\n", "notebook, click on `File` -> `Export Notebook as ...` and choose\n", "`pdf`. This may require additional configuration steps and are not\n", "required for this course.\n", "\n", "## A reproducible version of this notebook\n", "\n", "Due to some technical issues related to Stata not being open source\n", "and available when producing this website, you need to use [this ipynb\n", "notebook](https://econ.pages.wm.edu/econ/407/syllabus/_static/reproducible_research.ipynb)[^fn1] if you want to run this document on\n", "a campus lab computer to fully replicate these results.\n", " \n", "[^1]: Rather than the one you can download using the download link above." ] } ], "metadata": { "kernelspec": { "display_name": "Stata", "language": "stata", "name": "pystata" }, "language_info": { "codemirror_mode": "stata", "file_extension": ".do", "mimetype": "text/x-stata", "name": "stata" } }, "nbformat": 4, "nbformat_minor": 5 }