Note to friends I’ve asked to look at this book…

Thanks for looking at this. You can leave feedback however you like, including via ‘hypothes.is’ as suggested just below. Let me know if you want acccess to the github account. I’m still working on adding in material from my previous slides, integrating content and formats, filling gaps, and updating things. To do this right will take a lot more work, and I may need to seek funding – let me know if you have any ideas about potential grants/funders. I’m also interested in potentially joining forces with other authors.

## 0.1 Preface

I do not consider myself to be a Great Writer

[At least one of my un-named research co-authors will heartily agree with this statement

but I hope that my advice will nonetheless offer a good foundation.

I intend this work, as a ‘web book’, to be a living resource, continuously improving, building content, and incorporating feedback and collaboration. I will try to make this as interactive and responsive as possible.

Leaving feedback, asking questions, seeking other’s feedback/notes/questions:

All feedback is appreciated, and I will try to respond to your questions. An easy way to take notes and leave feedback: sign up for ‘hypothes.is’ and you can put your ‘public notes’ directly on this web book. Don’t worry, these comments are saved even if the web book is updated.

This book is in Open Review. We want your feedback to make the book better for you and other students. You may annotate some text by selecting it with the cursor and then click the on the pop-up menu. You can also see the annotations of others: click the in the upper right hand corner of the page

If you have benefitted from this work (and you are not one of my students), please consider giving me some sort of ‘’kudos’’ on Twitter or wherever. One way to materially express gratitude: make a donation in my honor to an effective and international charity, such as those listed at givewell.org. If you make this donation and share it on a social media site with the hashtag #DRWritingEcon, that would be greatly appreciated.

### Licence

Essentially:

• You can use this freely and create other versions as long as you give proper attribution, and you make your work publicly available
• You cannot sell this or use it, or any part of it, for commercial purposes

## 0.2 Examples of the sort of fancy interactive stuff I hope to incorporate in this web book

Thanks to Yihui and many others, this book should permit lots of flexible tools. Trying some of these below (with code shown, but it could also be hidden). Thanks Yihui for the Bookdown package.

### 0.2.1 Questions with folded answers, folded expanded discussions

Yes: I just did.

I can also put expansive detail into the fold, to avoid clutter. If you want to know more about spittlebugs, feel free (to open the fold below).

These families are best known for the nymphal stage, which produces a cover of foamed-up plant sap visually resembling saliva; the nymphs are therefore commonly known as spittlebugs and their foam as cuckoo spit, frog spit, or snake spit. This characteristic spittle production is associated with the unusual trait of xylem feeding. Whereas most insects that feed on sap feed on the nutrient-rich fluid from the phloem, Cercopidae utilize the much more dilute sap flowing upward from the roots via the xylem. The large amount of excess water that must be excreted and the evolution of special breathing tubes allow the young spittlebug nymphs to grown in the relatively protective environment of the spittle.

Indirect source: wikipedia: Froghopper, accessed 21 Feb 2020

### A Shiny app

knitr::include_app("https://yihui.shinyapps.io/miniUI/",
height = "400px")

Our notes on writing and hosting Shiny apps are : Here

However, for our purposes it seems like it may be easier to use a package like learnr rather than program Shiny code directly.

### 0.2.2 Learnr or Rtutor (shiny) content

We are working with the learnr package to build exercise and interactive content. Also looking into Rtutor. This needs to be hosted at a shiny-enabled platform such as shinyapps.io. I tried the default example here.

Let’s try it:

knitr::include_app("https://daaronr.shinyapps.io/try_tutorial/#section-topic-2",
height = "500px")

This seems to work, but it goes to the first page instead of topic 2, as indicated in the url. Unless this bug is fixed, we may need to publish/host a separate Shiny for each code exercise. It may be better to just post one big multi-page learnr-shiny, and link the pages … e.g., ‘jump to Topic 2 here’ without bothering with embedding.

### My web pages

innovationsinfundraising.org

knitr::include_url("https://davidreinstein.wordpress.com/")

### Scary math

$\Theta = \begin{pmatrix}\alpha & \beta\\ \gamma & \delta \end{pmatrix}$

### R code and data

These are “code chunks”

##  [1] -0.74  0.29  0.97 -0.95  0.86 -0.87 -1.05 -0.92 -1.27 -0.17

And I can refer to the results of the r code in the text itself, e.g., by writing

  one plus one equals   r x    

I get … one plus one equals 2.

### Heteroskedasticity and Homoskedasticity

• The error term of our regression model is homoskedastic if the variance of the conditional distribution of $u_i$ given $X_i$, $Var(u_i|X_i=x)$, is constant for all observations in our sample: $\text{Var}(u_i|X_i=x) = \sigma^2 \ \forall \ i=1,\dots,n.$

## 0.3 Types of notes within text

“Aside” notes look like this.

Warnings look like this.

## 0.4 Why am I writing this book?

To the best of my knowledge, as of today, 29 Jul 2019, there is no detailed useful guide to writing and doing Economics research targeted at undergraduates (and UK-style MSc students).

Some good resources are available but these:

1. Are mainly targeted at a higher level, and emphasize more advanced, nuanced points, or focus on a particular part of the project

2. are not all publicly-available (open-access)

3. are not interactive nor ‘web-based’.

The third point is crucial: in my opinion the standard ‘textbook’ is dead. Particularly for a topic like thi s, we need a living resource, which can:

• enable organised feedback and discussion forums.

• be continually improved in light of feedback,

• be updated to address new issues and standards in Economics,

• … and new research technology,

• and incorporate interactive tools.

## 0.5 Using this book

Some things I write here may seem obvious. But try to think “why is he emphasizing these points?” I have collected these suggestions through years of experience.

There is evidence.

Every year many students:

make similar errors

waste time on the wrong things

and fail to take simple steps that would greatly help them

Markers find the same shortcomings year after year. If you pay attention, you can be smarter than that!