Chapter 2 (2.5-2.7) Flashcards
What does the “$” character allow you to do?
Create a new character.
True or false: when you create a new object, the name should be written in lowercase letters.
True
What does an average causal effect estimate?
The average change in Y caused by a change in X.
What’s the best way of ensuring that the treatment group and the control group are comparable?
Running a randomized experiment.
True or false: if the outcome variable is binary, the difference-in-means estimator is measured in percentage points.
True
What are percentage points?
A unit of measurement for the arithmetic difference between two percentages.
What’s the formula for the difference-in-means estimator?
Difference-in-means estimator = average outcome for the treatment group - average outcome for the control group
What three arguments does the “ifelse()” function require?
- logical test (using “==”)
- a return value if the logical test is true
- a return value if the logical test is false