117 Matching Annotations
  1. Last 7 days
    1. I want it to run

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-35): The section stops at a wish: a specification table (test_models) and four hand-written model calls, with no code that runs the models from the table.

      Suggestion: One way to run the models from the table (code not run here; there is no R in this environment):

      ```r fit_spec <- function(df, filter, y, x, model, family) { d <- get(df) if (filter != "") d <- dplyr::filter(d, !!rlang::parse_expr(filter)) f <- reformulate(trimws(strsplit(x, ",")[[1]]), response = y) if (model == "glm") glm(f, data = d, family = family) else lm(f, data = d) }

      results <- test_models %>% mutate( fit = pmap(list(df, filter, y, x, model, family), fit_spec), coefs = map(fit, broom::tidy), summ = map(fit, broom::glance) )

      one row per coefficient

      results %>% select(dataset = df, filter, y, coefs) %>% unnest(coefs)

      one row per model

      results %>% select(dataset = df, filter, y, summ) %>% unnest(summ) ```

      Each row of the table becomes one call to fit_spec(). get() fetches the data frame by name, the filter string is parsed as in the 'lists of filters' section, and reformulate() builds the formula from the comma-separated regressors. The fitted models sit in a list-column, and tidy() and glance() turn them into the two standard result tables. The spec column df is renamed before unnesting because glance() returns a column of the same name. One caution about the example itself: the disp < 100 subset of mtcars has 5 cars, so the second specification estimates four coefficients from five observations.

    2. If you are new to tidyverse-style syntax, possibly the oddest component is the pipe

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-28): Several tooling references in this chapter predate changes in R and the tidyverse (native pipe, R4DS second edition, renamed or deprecated functions, Quarto). The quoted author's name is also misspelled.

      Suggestion: Updates to consider, in order of appearance:

      • line 35 (dynamic documents): Quarto (2022) is the successor to R Markdown and bookdown for new projects. Existing bookdown books keep working.
      • line 130: the quoted bookdown project is by A. Solomon Kurz ("Kurtz" in the text).
      • line 132 (the pipe): R 4.1 (2021) added a native pipe, |>, and R for Data Science (2nd edition, 2023) uses it throughout. %>% still works. Differences that affect this chapter: |> has no tee-pipe counterpart to %T>%, and its placeholder is _, which must be passed to a named argument (R ≥ 4.2), so lm(mpg ~ wt, data = _) replaces data = ..
      • lines 181, 201: as.tibble() → as_tibble() (deprecated since tibble 2.0).
      • line 297 onward: the second edition of R4DS dropped the modelling chapters, including 'Many models' and 'List-columns', which this section quotes. The first-edition links (r4ds.had.co.nz) still work. Nested data is now covered in the 'Hierarchical data' chapter (unnest_wider(), unnest_longer()), and for modelling workflows the authors point to Tidy Modeling with R (Kuhn and Silge).
      • lines 646–656: the .null argument of the map_*() extractor shortcuts was renamed .default; write map_dbl(x, "b", .default = NA_real_) and change the sentence above the chunk to match.
      • lines 557 and 567: see E-32 (invoke_map()) and E-33 (summarise() → reframe()).
    3. Organizing a project

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-26): Five headings have no content: 'Data: What/why/where/how' (line 31), 'Organizing a project' (33), 'Indenting and spacing' (150), 'Using functions, variable lists, etc., for clean, concise, readable code' (152) and 'Mapping over lists to produce results' (154, body commented out). The chapter cites Gentzkow and Shapiro at the top without using it.

      Suggestion: A minimal project layout. The chapter cites Gentzkow and Shapiro's Code and Data for the Social Sciences (2014). Its rules translate into a short checklist.

      • One folder per project, under version control, with a fixed structure: data/raw (never edited by hand), data/derived (always rebuilt by code), code, output, docs.
      • One script that rebuilds everything in order, from raw data to final tables (this repo's main.R is written for that role). A result that cannot be regenerated by running it should be treated as lost.
      • Paths relative to the project root, via here::here(), so the code runs on any machine.
      • Package versions recorded with renv, so the project can be rerun later.
      • Each fact stored once: derived variables are built in one place and data sets are merged on explicit keys.
      • Repeated steps turned into functions (the 'lists of filters' section below is an instance). A block pasted three times should become a function.
      • To-dos and discussion kept in an issue tracker; code comments reserved for what the code cannot say itself.

      For 'Indenting and spacing', a pointer is enough: follow the tidyverse style guide and let styler::style_file() and lintr enforce it.

    1. ROC Graphs and Curves The best-performing model at this performance point is Classifier 1.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-23): The notes stop at profit curves. ROC curves, AUC, cumulative response and lift curves (Ch. 8) have no notes, although the opening section singles out 'lift' as a key term and leaves it as a fragment (line 10, "Terms like 'lift'"). The Ch. 8 material also has no chapter heading and renders under Ch. 7.

      Suggestion: ROC, AUC, cumulative response and lift. A scoring model ranks cases, and each threshold on the score gives one confusion matrix. The ROC curve plots the true positive rate $TP/(TP+FN)$ against the false positive rate $FP/(FP+TN)$ over all thresholds. A random ranking lies on the diagonal. AUC, the area under the curve, equals the probability that a randomly drawn positive gets a higher score than a randomly drawn negative (the Mann–Whitney statistic); the Gini coefficient used in credit scoring is $2\,AUC-1$. Both rates are computed within an actual class, so ROC and AUC do not change with the class mix. They depend only on the ordering of scores, so they say nothing about calibration.

      The cumulative response (gains) curve plots the share of all positives captured against the share of the population targeted, going down the ranked list. Lift at a cut-off is the first share divided by the second: if the top 10% of the list contains 30% of responders, lift is 3. Equivalently, lift is the response rate among those targeted divided by the base rate. With a 2% base rate, lift 3 means a 6% response rate in the targeted group. These curves depend on the base rate (maximum lift is 1/base rate), so they must be computed on data with the population class mix.

    2. how does better information and forecasting boost payoffs?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-21): The author's two questions (how better information raises payoffs; commit or wait to learn) are listed with no answer. The expected value framework in this section gives a direct answer to the first.

      Suggestion: How much can better information add? Compare the model with the best decision made without one. Take the mailing example (\$99 from a responder, −\$1 from a non-responder) with a 5% response rate. Mailing everyone earns $0.05\cdot99-0.95\cdot1=4.00$ per consumer; mailing no one earns 0. A perfect classifier mails only responders and earns $0.05\cdot99=4.95$. The most any model can add is therefore 0.95 per consumer, the cost of the wasted mailings. A model with a 60% true positive rate and a 10% false positive rate earns 2.875, less than mailing everyone, so at that threshold it destroys value.

      In general, with response rate $\pi$, the ceiling on a model's contribution is $99\pi-\max(0,\,100\pi-1)$. It rises to 0.99 at $\pi=1\%$, where mailing everyone and mailing no one both earn zero, and falls on either side. Information is worth most when the uninformed decision is a close call, and worth nothing when no signal could change the action. Decision theory calls the ceiling the expected value of perfect information.

      'Commit or wait to learn' adds a cost of delay and the option to act after seeing more data; that is the explore/exploit trade-off raised in the Signet Bank margin note.

    3. Equation 7-2. Expected profit equation with priors p(p) and p(n) factored.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-20): The equation is a placeholder ('[Formula here]', line 990). Without it the point of factoring out the priors is lost. The file is pulled in from daaronr/data_acad_materials (see index.Rmd), so the text fix belongs upstream.

      Suggestion: Expected profit with class priors factored out. Write $p(\mathbf{p})$ and $p(\mathbf{n})$ for the shares of actual positives and negatives, $Y$ and $N$ for the model's predictions, and $b(\cdot,\cdot)$ for the value of each cell (costs enter as negative benefits):

      $$E[\text{profit}]=p(\mathbf{p})\,\big[\,p(Y\mid\mathbf{p})\,b(Y,\mathbf{p})+p(N\mid\mathbf{p})\,b(N,\mathbf{p})\,\big]+p(\mathbf{n})\,\big[\,p(N\mid\mathbf{n})\,b(N,\mathbf{n})+p(Y\mid\mathbf{n})\,b(Y,\mathbf{n})\,\big].$$

      The terms in brackets use only the true positive rate $p(Y\mid\mathbf{p})$ and the false positive rate $p(Y\mid\mathbf{n})$, which do not depend on the class mix. A model evaluated on a balanced sample can therefore be re-priced for the real population by inserting the real $p(\mathbf{p})$. This resolves the balanced-versus-representative confusion in the churn example earlier in the chapter.

      Example with the mailing values ($b(Y,\mathbf{p})=99$, $b(Y,\mathbf{n})=-1$, zero otherwise), a 5% response rate, and a model with a 60% true positive rate and a 10% false positive rate: $0.05\,(0.6\cdot99)+0.95\,(0.1\cdot(-1))=2.97-0.095=2.875$ per consumer.

    4. for any consumer whose feature vector description \(x\) is given as input DR: so it’s all lift

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-19): The targeting rule in this section rests on the quoted assumption that an untargeted consumer never buys, which makes the response probability equal to the causal effect of the offer. The note 'so it's all lift' points at this without spelling it out, and the later note that benefits may be correlated with observables (line 978) is left as a fragment.

      Suggestion: Response probability versus the effect of the offer. The rule 'target when $p_R(x)\cdot 99-[1-p_R(x)]\cdot 1>0$', that is $p_R(x)>1\%$, rests on the assumption quoted here: a consumer who gets no offer does not buy. Under it every sale to a targeted consumer is caused by the offer, and the predicted response rate equals the treatment effect.

      When some consumers would buy anyway, what targeting earns is the incremental margin. With margin $m$ and contact cost $c$, target when $[\,p(\text{buy}\mid x,\text{offer})-p(\text{buy}\mid x,\text{no offer})\,]\,m>c$. A consumer with an 8% purchase probability either way is worth nothing to target; one who moves from 0.5% to 2% is worth $0.015\,m$. A ranking by predicted response puts the first consumer ahead of the second.

      Estimating that difference by customer type is called uplift modelling in marketing and heterogeneous treatment effect estimation in econometrics (Athey and Imbens 2016, PNAS; Wager and Athey 2018, JASA). It needs data in which the offer was randomised, or another credible identification strategy. On terms: 'lift' in this book is a ratio of response rates (targeted group over base rate), a predictive measure, while 'uplift' is the causal difference. The book takes this up in Ch. 11.

      The later note about benefits correlated with observables is a related point: $E[p\cdot v]=E[p]\,E[v]+Cov(p,v)$, so an average value $v$ misprices targets whenever likely responders are systematically high- or low-value.

    5. However, when she applies her model to my balanced data set, she also sees an accuracy of 80% DR: a good practice pro

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-18): The author marks this as a good practice problem, but the numbers in the quoted narrative cannot hold together: a classifier with 80% accuracy on a 50:50 sample cannot have 37% accuracy on a population with 10% positives (or with any other class mix).

      Suggestion: The numbers in this example do not fit together. Accuracy is a weighted average of the true positive rate (TPR) and the true negative rate (TNR), with the class shares as weights: $accuracy=\pi\,TPR+(1-\pi)\,TNR$, where $\pi$ is the share of positives. A classifier with a fixed threshold has the same TPR and TNR on any sample.

      On the balanced data, $0.5\,TPR+0.5\,TNR=0.80$, so $TPR+TNR=1.6$ and each rate lies between 0.6 and 1. On the population, with $\pi=0.10$, accuracy is $0.1\,TPR+0.9\,TNR$, which ranges from 0.64 (TPR = 1, TNR = 0.6) to 0.96 (TPR = 0.6, TNR = 1). An accuracy of 37% lies outside that range, and for any class mix the minimum is 60%.

      The two extremes show the point the book's Figure 7-1 makes: two models with the same number of errors on balanced data, one making only false positives and the other only false negatives, score 64% and 96% on the 10%-churn population. For a practice problem, replace 37% with 64%, or ask students to show that 37% is impossible. The lesson holds either way: accuracy depends on the class mix of the test sample, so two accuracy figures can be compared only on the same population.

    6. how different from L2 with normalization?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-17): The author asks how cosine distance differs from Euclidean (L2) distance with normalisation. The answer is a one-line identity, and it depends on which normalisation is meant.

      Suggestion: Cosine distance versus Euclidean distance on normalised vectors. They rank neighbours identically. Cosine distance is $1-\dfrac{a\cdot b}{\lVert a\rVert\,\lVert b\rVert}$. Rescale each vector to unit length, $\tilde a=a/\lVert a\rVert$ and $\tilde b=b/\lVert b\rVert$. Then

      $$\lVert\tilde a-\tilde b\rVert^2=\lVert\tilde a\rVert^2+\lVert\tilde b\rVert^2-2\,\tilde a\cdot\tilde b=2\,(1-\cos\theta),$$

      which is twice the cosine distance. For the book's example, $A=(7,3,2)$ and $B=(2,3,0)$: $A\cdot B=23$, $\lVert A\rVert\lVert B\rVert=\sqrt{62}\sqrt{13}=28.4$, cosine distance $=1-23/28.4=0.19$, and the squared Euclidean distance between the unit-length versions is 0.38.

      The normalisation here is by row: each document's vector is scaled to length 1, which removes document length. That differs from the column standardisation discussed for k-NN, where each feature is rescaled across cases. Cosine distance without any column weighting still lets frequent words dominate, which is one reason text applications weight counts by TF-IDF first.

    7. curse of dimensionality—and this poses problems for nearest neighbor methods

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-15): The curse of dimensionality is named in a quote fragment and never explained.

      Suggestion: Curse of dimensionality. Nearest-neighbour methods assume that the closest training cases are close enough to resemble the case at hand. In many dimensions they are far away. Suppose features are spread uniformly over a unit cube. To capture 10% of the data around a point, a neighbourhood needs side length $0.1^{1/d}$: 0.10 with one feature, 0.32 with two, 0.79 with ten. With ten features the '10% nearest' neighbours span about 80% of the range of every feature, so the average is barely local.

      Two consequences. First, the sample size needed to keep neighbourhoods small grows exponentially with the number of features; the best achievable convergence rate for nonparametric regression of a twice-differentiable function is $n^{-2/(4+d)}$ (Stone 1982, Annals of Statistics), against $n^{-1/2}$ for a parametric model. Second, irrelevant features add noise to every distance, and with many of them the nearest and the farthest points become almost equally far away.

      The remedies listed in these notes (feature selection, domain knowledge, tuned distance functions) all reduce the effective dimension. The same problem is why exact matching on many covariates fails in causal work and why matching is usually done on a propensity score or a small set of covariates.

    8. NN for ‘regression’. Kernel models would be an extension of this

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-14): The author's note links nearest-neighbour prediction to kernel methods without saying how, and the notes do not mention that economists already use this estimator under the name of matching.

      Suggestion: k-NN regression, kernel regression and matching. Averaging the outcomes of the $k$ nearest neighbours is a nonparametric estimate of $E[y\mid x]$: a local average whose window adapts to how dense the data are around $x$. Kernel (Nadaraya–Watson) regression is the same idea with a fixed window: every observation gets a weight that declines with its distance from $x$, governed by a bandwidth $h$, and the prediction is the weighted mean. The book's 'weighted voting' is a hybrid of the two.

      $k$ and $h$ play the same role. Small $k$ (or $h$) gives low bias and high variance; $k=n$ returns the sample mean for everyone. Roughly $n/k$ acts as the number of effective parameters, so $k$ is chosen by cross-validation like any other complexity setting.

      Economists use the same estimator under another name. Nearest-neighbour matching imputes each treated unit's missing untreated outcome as the average outcome of its $k$ closest controls, which is k-NN regression fitted on the control group and evaluated at the treated units' covariates. Abadie and Imbens (2006, Econometrica) show that with several continuous covariates the matching discrepancy leaves a bias that does not vanish at the $\sqrt{n}$ rate. That is the curse of dimensionality that also limits k-NN prediction.

    9. Data doesn’t need to be normalized for methods such as decision trees as information gain is calculated for each individual variable

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-13): The explanation of why scaling affects distance is garbled ('affected by the distance between variables'), and the reason given for trees is wrong: trees do use relationships between variables, through successive splits. They are unaffected by scaling because a split depends only on the ordering of a feature's values. The author's later note (line 760) asks for a discussion of standardising, which this box supplies. The file is pulled in from daaronr/data_acad_materials (see index.Rmd), so the text fix belongs upstream.

      Suggestion: Scaling and distance. Euclidean distance adds squared differences across features, so each feature's contribution depends on its units. Take two customers who differ by 5 years of age and \$1,000 of income. With income in dollars the squared distance is $5^2+1000^2$ and age is irrelevant; with income in thousands it is $5^2+1^2$ and age dominates. The choice of units is an implicit choice of feature weights, and the resulting number has no interpretation until that choice is made deliberately.

      Common choices: z-scores (subtract the mean, divide by the standard deviation), which put distances in standard-deviation units; range normalisation to $[0,1]$, which is sensitive to outliers; Mahalanobis distance, which also adjusts for correlation between features. Any of these can be followed by explicit weights when domain knowledge says some features should count for more.

      Trees need no scaling, for a different reason from the one given. A split asks whether $x_j$ is above a threshold, which depends only on the ordering of $x_j$, so any monotone rescaling of a feature leaves the tree unchanged. Trees do use relationships between variables: each split is evaluated within the subsample defined by the splits above it, which is how they capture interactions.

    10. This means that the model will tend to perform poorly on newer data.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-12): OF's summary says that more flexibility 'means' poor performance on new data. That follows only where the variance added exceeds the bias removed. 'Highly non-linear models tend to have higher variation' should refer to flexible models and to variance. Later work also shows that the U-shaped fitting graph quoted at line 721 does not hold for all model classes.

      Suggestion: Suggested rewording: "For squared error, expected prediction error at a point decomposes as $E[(y-\hat f(x))^2]=\text{bias}^2+\text{variance}+\sigma^2$. Making a model more flexible, for example by adding tree nodes, lowers bias and raises variance. Test error falls while the bias reduction dominates and rises once the variance increase dominates; the best complexity is where the two balance. For a given sample size, more flexible models have higher variance, and more data lowers variance at any complexity."

      Update for the same passage: the U-shaped test-error curve (the book's fitting graph) describes models that are regularised or have fewer parameters than observations. Belkin, Hsu, Ma and Mandal (2019, PNAS) document 'double descent': as capacity grows past the point where the model fits the training data exactly, test error can fall again, sometimes below the classical minimum. Hastie, Montanari, Rosset and Tibshirani (2022, Annals of Statistics) derive this for minimum-norm least squares. The practical advice in these notes stands: choose complexity by validation performance. The inference from 'fits the training data perfectly' to 'overfit' does not hold in general. This also bears on the author's margin note at line 156 about overfitting versus model complexity.

    11. : I don’t entirely get how the nesting works

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-11): The author's note says the nesting in nested holdout / nested cross-validation and in sequential forward selection is unclear; the quotes give the pieces without the procedure.

      Suggestion: How the nesting works. There are two separate questions, and each needs data the other has not touched: (1) which model variant is best (which features, what tree size, what $\lambda$), and (2) how well the chosen model will do on new data.

      Nested holdout. Split off a test set and lock it away. Split the rest into a subtraining set and a validation set. Fit every candidate on the subtraining set and score it on the validation set. For sequential forward selection: fit each one-feature model and keep the best feature; fit each two-feature model that contains it and keep the best pair; continue until validation performance stops improving. Refit the chosen specification on subtraining plus validation data, and evaluate that one model once on the test set.

      Nested cross-validation replaces each split with folds. The outer loop holds out fold $j$ for testing. Within the remaining data, an inner cross-validation picks the variant, which is then refitted and scored on fold $j$. Averaging over the outer folds estimates the performance of the whole procedure, selection included.

      The nesting is needed because the winner's validation score is biased upward: it is the maximum of many noisy scores (Cawley and Talbot 2010, Journal of Machine Learning Research). With grouped or time-ordered data, split by group or by time at both levels; otherwise information leaks across folds.

    12. then the hypothesis test concludes that the difference is likely not due to chance DR: somewhat impre

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-10): The author flags the book's wording as imprecise without saying how. Two problems: a p-value below 5% is a statement about the data under the null hypothesis, and in a tree the test is applied to a split chosen as the best of many candidates, so its nominal p-value overstates the evidence.

      Suggestion: What the test at a leaf does and does not say. A p-value is the probability of seeing a split at least this good if the attribute were unrelated to the target in this node. A value below 5% means such data would be unusual under 'no relationship'. It does not give the probability that the split is due to chance, which would also depend on how plausible a real relationship was beforehand.

      In tree induction there is a second problem. The algorithm tests the best split found after searching over every attribute and every cut-point. The maximum of many noisy statistics is large even when nothing is going on, so the nominal p-value of the winning split overstates the evidence. With 20 independent irrelevant attributes, the chance that at least one passes a 5% test is $1-0.95^{20}=64\%$. This is the multiple-comparisons point in the book's sidebar, applied inside the tree.

      Conditional inference trees (Hothorn, Hornik and Zeileis 2006, Journal of Computational and Graphical Statistics; partykit::ctree in R) deal with this by using permutation tests with a multiplicity adjustment to choose the split variable and to stop. The more common alternative skips testing: grow a large tree and prune it back using cross-validated error.

    13. It does not explain why overfitting often causes models to become worse

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-09): The author notes that the book does not explain why overfitting makes models worse and offers a guess (less attention paid to meaningful information). The mechanism is estimation variance, and OLS gives an exact formula for it.

      Suggestion: Why overfitting makes predictions worse. The mechanism is estimation variance. Every parameter fitted from a finite sample carries sampling error, and a model with more parameters, or a tree with more leaves, turns more of the sample's noise into parameter values. New data do not share that noise, so the noise-fitted parts of the model produce errors.

      OLS gives an exact statement. With $n$ observations, $k$ regressors, error variance $\sigma^2$ and a correctly specified model, the expected in-sample mean squared error is $\sigma^2(1-k/n)$, while the expected error in predicting fresh outcomes at the same $x$ values is $\sigma^2(1+k/n)$. With $n=100$ and $k=20$ the training error understates $\sigma^2$ by 20% and the prediction error exceeds it by 20%. Adding a regressor whose true coefficient is zero always lowers training error and raises expected prediction error by $\sigma^2/n$. The gap, $2\sigma^2k/n$, is the penalty that Mallows' $C_p$ and AIC add back.

      In general, expected squared prediction error is bias² + variance + irreducible noise. Extra flexibility lowers bias and raises variance, and overfitting is the range where the variance added exceeds the bias removed. The guess in the note is close in one respect: with correlated features, including irrelevant ones also makes the coefficients on the relevant ones noisier.

    14. The stack of models can be represented by one big parameterized numeric function. The DR: So why consider it in many lay

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-07): The author's question (why think in layers if the network is one big function) is left open.

      Suggestion: Why layers, if it is all one function? The layers describe how the function is built, and the construction is the source of its flexibility. A single logistic regression is linear in its inputs: the decision boundary is a hyperplane, and any interaction or curvature has to be added by hand as extra features. In a network, each hidden unit applies a nonlinear transformation to a weighted sum of the inputs, and the next layer runs a regression on those transformed values. The hidden units are features that the fitting procedure constructs for itself. An economist can read a one-hidden-layer network as a regression on basis functions whose shapes are estimated together with the coefficients.

      The nonlinearity between layers is essential. If every unit were linear, a stack of layers would collapse algebraically into one linear model. With a nonlinear activation, one hidden layer with enough units can approximate any continuous function on a bounded domain (Hornik, Stinchcombe and White 1989, Neural Networks). Depth adds economy: functions built by composition can need far fewer parameters in a deep network than in a wide shallow one. The layered form also makes fitting feasible, because the derivative of the loss with respect to every weight follows from the chain rule applied layer by layer (back-propagation).

    15. not sure I get what the margin means here

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-06): The author's note says the margin is unclear. The quoted description of hinge loss is also looser than the standard definition, under which the loss is already positive for correctly classified points that lie inside the margin. The earlier note 'Which should we pick? underdetermined' (line 520) has a direct counterpart in logistic regression that is not mentioned.

      Suggestion: Margin and hinge loss. Code the classes as $y\in{-1,+1}$ and let $f(x)=w\cdot x+b$ be the linear score, with the decision boundary at $f(x)=0$. The product $y\,f(x)$ is positive when a point is classified correctly and grows with its distance from the boundary. The SVM scales $w$ so that the closest correctly classified points sit at $y\,f(x)=1$. The band $-1<f(x)<1$ is the margin. Its width is $2/\lVert w\rVert$, so maximising the margin means minimising $\lVert w\rVert$.

      Hinge loss is $\max(0,\,1-y\,f(x))$. It is zero for points on the correct side and outside the band, and rises linearly once a point crosses its own edge of the band. A point at $y\,f(x)=0.4$ is correctly classified and still pays 0.6; a point at $y\,f(x)=-2$ is misclassified and pays 3. The quoted sentence ('only becomes positive when an example is on the wrong side of the boundary and beyond the margin') is looser than this definition.

      On 'which should we pick' when many lines separate the classes perfectly: the SVM picks the one with the widest margin. Unpenalised logistic regression has no finite maximum likelihood estimate in that case (perfect separation; the coefficients grow without bound), which is why software warns or drops variables. A ridge penalty restores a finite solution.

    16. how much information has this attribute provided? That depends on how much purer the children are than the parent

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-04): The information gain formula appears only as an image (../picsfigs/infogain.png), and that path does not resolve in this repo, so the built page shows no formula. There is no worked example, and no link to statistics an economist already knows.

      Suggestion: Information gain, worked. For a set with class shares $p_1,\dots,p_k$, $entropy=-\sum_i p_i\log_2 p_i$: 0 for a pure set, 1 for a 50/50 two-class set. For a split of a parent set into children $c_1,\dots,c_m$,

      $$IG=entropy(parent)-\sum_j p(c_j)\,entropy(c_j),$$

      where $p(c_j)$ is the share of the parent's instances that fall in child $c_j$.

      Example: 100 borrowers, 40 of whom defaulted, so $entropy=-(0.4\log_2 0.4+0.6\log_2 0.6)=0.971$. Splitting on 'balance above 50K' gives one child with 30 borrowers (24 defaults, entropy 0.722) and one with 70 (16 defaults, entropy 0.776). The weighted child entropy is 0.759 (rounded), so $IG=0.971-0.759=0.212$ bits.

      Two links to familiar statistics. Information gain is the mutual information between the split and the class, and $2N\ln(2)\cdot IG$ is the likelihood-ratio ($G$) statistic for independence in the split-by-class table; here $2\cdot100\cdot0.693\cdot0.2115=29.3$ on one degree of freedom. CART uses Gini impurity, $1-\sum_i p_i^2$, in the same way and usually picks similar splits. Information gain favours attributes with many distinct values, which is why C4.5 divides it by the entropy of the split itself (gain ratio).

    17. To me this seems very close to the classification of class probability problem.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-03): Three margin notes (lines 236, 247, 262) ask how similarity matching, clustering and co-occurrence grouping differ from classification and from each other. The supervised/unsupervised section a page later answers this but is never connected back.

      Suggestion: How these tasks differ. The dividing line is whether a target variable defines what counts as similar.

      • Classification is supervised. Two customers land in the same class because their features predict the same label; features that do not predict the label are ignored.
      • Similarity matching has no label. The analyst chooses the features and the distance function, and the output is a ranking of neighbours for a given case. It becomes a predictive tool once the neighbours' labels are averaged (k-nearest neighbours, Ch. 6).
      • Clustering also has no label. It applies a similarity measure to the whole population at once and returns groups, with no reference case.
      • Co-occurrence grouping measures similarity between items (columns) from the transactions that contain them, where clustering compares customers (rows) by their attributes. Its outputs are rules such as 'baskets with A also contain B', scored by support, confidence and lift.

      The book's own summary, paraphrased: classification, regression and causal modelling are generally supervised; clustering, co-occurrence grouping and profiling are generally unsupervised; similarity matching, link prediction and data reduction can be either.

    18. This section notes that regression analysis is used for prediction rather than inference.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-02): DR and OF disagree in the margin about the book's claim that regression extracts patterns that generalise to other data, and the note leaves it unresolved. Each is right about a different use of the fitted model.

      Suggestion: What regression delivers without 'many further assumptions'. The book uses 'regression' for any supervised method with a numeric target, judged by prediction error on new cases. For that purpose few assumptions are needed. OLS estimates the best linear predictor of $y$ given $x$, the $\beta$ that minimises $E[(y-x'\beta)^2]$, whether or not $x$ is exogenous. If new cases come from the same joint distribution of $(x,y)$ as the training data, the predictions carry over, and a holdout sample measures how well.

      The further assumptions are needed for other uses. Reading a coefficient as the effect of changing $x$ requires exogeneity (no omitted confounders, no reverse causality). Standard errors and tests require assumptions about the error structure. Prediction itself fails when the joint distribution shifts, for example when the firm changes the policy that generated the data; this is the Lucas critique in a business setting.

      OF's reading matches what the book means. DR's objection applies as soon as the fitted model is used to say what would happen under an intervention. Mullainathan and Spiess (2017, Journal of Economic Perspectives) frame the split as $\hat{y}$ problems versus $\hat{\beta}$ problems; Shmueli (2010, Statistical Science) covers the same ground.

    19. Algorithm-wise, this is a ‘multi-armed bandit’ problem. Popular discussion of this:

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (E-01): The margin note says more efficient experimentation 'will be adaptive'. Efficiency depends on the objective: bandit allocation minimises profit forgone during the test, while Signet's stated aim was to gather data for predictive models of profitability across customer types and terms. Adaptive assignment also invalidates standard estimates and standard errors.

      Suggestion: Adaptive assignment is efficient for some goals and costly for others. A multi-armed bandit shifts customers toward the offers that have done best so far. That minimises profit forgone during the test (regret) and suits the case where the goal is to settle quickly on one best offer. Signet's goal in this passage was different: to learn how profitability varies with customer characteristics and contract terms, so that each segment could be priced later. Estimating that whole response surface needs observations on offers that look bad on average, and a bandit stops collecting them. The adaptive design that fits is a contextual bandit, or an allocation rule built for the estimation target (Kasy and Sautmann 2021, Econometrica, treat the case of choosing a policy after the experiment).

      Adaptive data also complicate inference. Assignment probabilities depend on earlier outcomes, so arm-level sample means are biased and the usual standard errors are invalid; Hadad, Hirshberg, Zhan, Wager and Athey (2021, PNAS) give corrected estimators. Fixed-share randomisation, as Signet used, gives unbiased estimates for every arm with standard methods.

    1. generate many copies of orig data set, imputing missing value for each

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-39): The multiple-imputation recipe stops at '2 more steps here', and the assumption that makes either imputation or the Bayesian treatment valid (missing at random) is not mentioned.

      Suggestion: Claude explains: the two missing steps, and the assumption underneath. (3) Run the analysis on each of the $m$ completed datasets, giving estimates $\hat Q_1,\dots,\hat Q_m$ with variances $U_1,\dots,U_m$. (4) Combine with Rubin's rules: the point estimate is the average $\bar Q$, and the total variance is $$T = \bar U + \left(1 + \tfrac{1}{m}\right)B,$$ where $\bar U$ is the average within-imputation variance and $B$ the variance of the $\hat Q_i$ across imputations. $B$ is the extra uncertainty from not knowing the missing values.

      Example: five imputations give 0.50, 0.55, 0.45, 0.60, 0.40, each with SE 0.10. Then $\bar Q = 0.50$, $\bar U = 0.01$, $B = 0.00625$, $T = 0.0175$ and the SE is 0.132, against 0.10 if one imputed dataset were treated as real.

      The fully Bayesian route does this in one pass. Missing values are unknowns sampled alongside the parameters, which is why a model for the incomplete variable ($X \mid \alpha$) is needed.

      Both rest on the data being missing at random: missingness may depend on observed variables but, given those, not on the missing value itself. If dropout depends on the unobserved outcome, the missingness process has to be modelled as well, and results then rest on assumptions the data cannot test.

    2. Jeffreys priors (??)

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-37): Jeffreys priors are listed with two question marks and no content. (The name is Jeffreys, after Harold Jeffreys, so the possessive is misplaced.)

      Suggestion: Claude explains: Jeffreys priors. Named after Harold Jeffreys. The prior density is proportional to the square root of the Fisher information, $p(\theta) \propto \sqrt{I(\theta)}$ (of its determinant, with several parameters).

      The motivation is invariance. A flat prior on a probability $p$ is not flat on the log-odds, so 'ignorance' depends on how the parameter is written. The Jeffreys prior gives the same answers under any parameterisation: derive it for $p$ and transform, or derive it directly for the log-odds, and the result is identical.

      Examples: for a binomial proportion, $I(p) = n/[p(1-p)]$, which gives a Beta(½, ½) prior. After 3 successes in 10 trials the posterior is Beta(3.5, 7.5) with mean 0.32; a flat prior gives Beta(4, 8) with mean 0.33. For a normal mean with known variance the Jeffreys prior is flat. For a standard deviation it is $p(\sigma) \propto 1/\sigma$, flat on $\log\sigma$. For a Poisson rate it is proportional to $\lambda^{-1/2}$.

      It serves as a default or 'objective' prior in one-parameter problems. It is often improper (it does not integrate to one), which rules out Bayes factors, and in multi-parameter models it can behave poorly. Applied work now mostly uses weakly informative priors.

    3. Most social scientists use non-informative or vague priors; i.e., large variance

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-36): The note reports the use of vague priors such as $N(0,1000)$ without the two standard warnings: the second argument means different things in BUGS/JAGS (precision) and Stan/brms (standard deviation), and a 'vague' prior on a coefficient can be strongly informative about the outcome. Advice has moved to weakly informative priors checked by prior predictive simulation, as the meta-analysis chapter of this book already recommends.

      Suggestion: Claude explains: 'vague' priors are informative on other scales. Two practical points.

      Parameterisation. $N(0, 1000)$ means different things in different software. BUGS and JAGS use precision: dnorm(0, 0.001) has variance 1000. Stan and brms use the standard deviation: normal(0, 1000) has variance one million. Copying numbers between them is a common error.

      Implied predictions. A wide prior on a coefficient can be a strong prior on the outcome. In a logit model with a standardised regressor and zero intercept, $\beta \sim N(0, 10^2)$ puts 62% of its mass on $|\beta| > 5$, which implies that moving $x$ from one SD below its mean to one SD above takes the outcome probability from under 1% to over 99%, or the reverse. Few social-science effects look like that, so the 'vague' prior asserts something implausible. Flat-looking priors on variance parameters cause similar trouble when there are few groups (Gelman 2006).

      Current advice is weakly informative priors on a sensible scale (Gelman et al. 2008 propose a Cauchy with scale 2.5 for logit coefficients on standardised inputs), checked by prior predictive simulation: draw parameters from the prior, simulate data, and see whether the simulated outcomes are believable.

    4. against the llhd at the posterior parameter mean. Always select model with lowest DIC

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-34): The description of DIC is hard to follow (the 'comparison' it describes yields the complexity penalty, not DIC itself), and DIC has since been superseded as the default by WAIC and PSIS-LOO. 'Always select the model with lowest DIC' ignores the uncertainty in the difference.

      Suggestion: Claude explains: DIC, and what replaced it. Define the deviance $D(\theta) = -2\log p(y \mid \theta)$. Let $\bar D$ be its average over posterior draws and $D(\bar\theta)$ its value at the posterior mean of the parameters. The gap $p_D = \bar D - D(\bar\theta)$ acts as an effective number of parameters, and $$DIC = \bar D + p_D = D(\bar\theta) + 2p_D .$$ So the comparison described in the text produces the complexity penalty; DIC is fit plus that penalty, a Bayesian analogue of AIC. Example: $\bar D = 210$ and $D(\bar\theta) = 204$ give $p_D = 6$ and $DIC = 216$.

      DIC is no longer the default recommendation. It relies on a point estimate, $p_D$ can be negative, it changes under reparameterisation, and it behaves poorly for hierarchical and mixture models (Spiegelhalter et al. 2014). Current practice estimates out-of-sample predictive accuracy with WAIC or approximate leave-one-out cross-validation (PSIS-LOO; Vehtari, Gelman and Gabry 2017), available as loo(fit) and loo_compare() in brms. These report a standard error for the difference between models, which tempers 'always pick the lowest': a difference smaller than about two standard errors is no clear preference.

    5. Systematic differences between replicate and actual data indicate model limitations

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-33): The section asks '?? what are reasonable values here??' for Bayesian p-values and leaves the posterior predictive display unfinished ('$p(y_{replicated}|y_{observed}= ...$'). The comparison is written with a draw superscript on the observed data. 'No r-squared' is out of date.

      Suggestion: Claude explains: posterior predictive p-values. Replicated data come from the posterior predictive distribution, $p(y^{rep} \mid y) = \int p(y^{rep} \mid \theta)\,p(\theta \mid y)\,d\theta$: draw $\theta^{(s)}$ from the posterior, then simulate a dataset from the model at $\theta^{(s)}$. Choose a test quantity $D$ (the maximum, the share of zeros, the skewness) and compare $D(y^{rep(s)})$ across draws with the single observed value $D(y)$. The observed data carry no draw index.

      The posterior predictive p-value is the share of replicates with $D(y^{rep}) \ge D(y)$. Values near 0.5 mean the model reproduces that feature. Values below about 0.05 or above 0.95 put the observed feature in the tail of what the model generates. Example: the data contain 30% zeros and 4000 replicated datasets contain between 5% and 18% zeros. The p-value is 0, and the model needs a component for zeros.

      Two cautions. These p-values are not uniform under a correct model; they concentrate around 0.5 because the data are used twice, so 0.05 is stronger evidence of misfit than it sounds (Gelman, Meng and Stern 1996). And the choice of $D$ matters: a feature the model fits directly, like the mean in a regression, will always look fine.

      On 'no r-squared': a Bayesian $R^2$ now exists (Gelman, Goodrich, Gabry and Vehtari 2019; brms::bayes_R2()).

    6. Every path starting from the center is a possible (sequence of) draws

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-30): The section sets up the 'garden of forking data' and then stops at '[CUT A BUNCH HERE]' before the counting argument reaches its conclusion, so the reader never sees how counting paths becomes a posterior. The referenced figure is also missing. (Just above, 'permutations rule' should be the multiplication rule: draws are with replacement, $4^3 = 64$.)

      Suggestion: Claude explains: where the garden leads (the part cut here). Suppose three draws with replacement give blue, white, blue. For each possible bag, count the paths through the garden that produce exactly this sequence. A bag with $b$ blue marbles out of 4 has $b$ ways to produce the first blue, $4-b$ ways to produce the white, and $b$ ways to produce the last blue:

      | Blue marbles in bag | Ways, $b(4-b)b$ | Plausibility | |---|---|---| | 0 | 0 | 0 | | 1 | 3 | 0.15 | | 2 | 8 | 0.40 | | 3 | 9 | 0.45 | | 4 | 0 | 0 |

      Plausibility is the count divided by the total, 20. This is Bayes' rule with a flat prior: the count is proportional to the likelihood $p^2(1-p)$ with $p = b/4$.

      Updating works by multiplication. Draw one more blue: multiply each count by $b$, the number of ways that bag can produce a blue, giving 0, 3, 16, 27, 0 and plausibilities 0, 0.07, 0.35, 0.59, 0. Yesterday's posterior counts act as today's prior. Other prior information, say that bags with one blue marble are three times as common as the rest, enters the same way, by multiplying the counts.

    7. When/what can we say about the ‘absence of an effect’

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-29): Two questions are posed and left unanswered: what can be said about the absence of an effect, and how to handle diagnostic tests such as the common-trend assumption. Both have standard answers that fit in a short box.

      Suggestion: Claude explains: saying something positive about a null. A non-significant test is compatible with no effect and, when the interval is wide, with large effects in either direction. A posterior lets you state how much probability lies in a range you would regard as negligible.

      Fix a smallest effect of interest $\delta$ before seeing the data, then compute $P(|\beta| < \delta \mid y)$ from the posterior draws. Example: the posterior for a treatment effect is $N(0.02, 0.05^2)$ and effects below 0.10 SD are judged unimportant. Then $P(-0.10 < \beta < 0.10 \mid y) = 0.94$, strong support for 'no meaningful effect'. Had the posterior SD been 0.20, the same probability would be 0.38 and the fair summary would be 'uninformative'.

      This is the 'region of practical equivalence' approach (Kruschke 2018). The frequentist counterpart is equivalence testing with two one-sided tests (Lakens 2017), which asks whether the 90% confidence interval lies inside $(-\delta, \delta)$. In both, the conclusion depends on $\delta$, which should be justified and reported.

      For diagnostic tests such as pre-trends, the same logic applies: Roth (2022, AER: Insights) shows that passing a low-powered pre-test is weak evidence, and Rambachan and Roth (2023, Review of Economic Studies) replace pass/fail with a stated bound on the violation of parallel trends and report the effects consistent with it (R package HonestDiD).

    1. Diagnosis and responses: P-curves, funnel plots, adjustments

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-27): The publication-bias section consists of one bullet, an unattributed quotation that reads like a pasted message, and an empty sub-heading, although robust_diagnos.Rmd links here for the topic. The tools named in the heading are not explained, and the field has moved on since these notes (selection models, comparisons with large replications).

      Suggestion: Claude explains: the logic of the standard tools. Without selection, small and large studies estimate the same thing, so estimates should scatter symmetrically around the pooled effect, more widely for small studies. A funnel plot (estimate against standard error) shows this. If small studies are published mainly when significant, the corner with small studies and small effects is empty, and estimates rise with the standard error.

      Egger's test regresses the estimate on its standard error, weighting by precision; a non-zero slope signals asymmetry. PET uses the same regression and reads the intercept as the effect in a hypothetical study with $SE = 0$; PEESE uses $SE^2$ as the regressor and is preferred when PET rejects zero (Stanley and Doucouliagos 2014). Example: if estimates cluster around 0.2 for studies with $SE = 0.05$ and around 0.5 for studies with $SE = 0.2$, the fitted line has slope 2 and intercept 0.1.

      p-curve looks only at significant results. A true effect produces many very small p-values, a null effect a flat distribution, and a pile-up just under 0.05 suggests specification searching (Simonsohn, Nelson and Simmons 2014).

      Asymmetry has other causes, including real heterogeneity correlated with study size and, for SMDs and odds ratios, a mechanical correlation between the estimate and its SE. All these tools have low power below about ten studies.

      Further pointers (for a hypothes.is comment). (1) Selection models estimate the publication probability as a function of the z-statistic and correct for it: Hedges (1992), Vevea and Hedges (1995), and Andrews and Kasy (2019, AER); implemented in metafor::selmodel() and, with Bayesian model averaging, in RoBMA (Maier, Bartoš and Wagenmakers 2023). (2) Carter, Schönbrodt, Gervais and Hilgard (2019) find that no correction method dominates and all degrade under heterogeneity. Kvarven, Strømland and Johannesson (2020, Nature Human Behaviour) compare meta-analyses with preregistered multi-lab replications of the same effects: meta-analytic effects were almost three times as large, and corrections closed only part of the gap. (3) On the multiple-testing bullet: yes. If a study can report the best of several outcomes or specifications, selection operates within studies too, where funnel-based methods cannot see it (Brodeur, Cook and Heyes 2020, AER). (4) Which DellaVigna paper is meant? DellaVigna and Linos (2022, Econometrica), comparing nudge-unit trials with published nudge studies, fits the description. The first name is Stefano, and the quotation has no attribution.

    2. so the effects of the interventions we find in this meta-analysis are very likely to be meaningful

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-26): The quoted conclusion moves from 'the mean effect is almost surely above 0.30' to 'the effects of the interventions are very likely to be meaningful'. The first is a statement about $\mu$; the second, read as a statement about an intervention in a given setting, needs the predictive distribution, which includes $\tau$ and gives a much less comfortable number.

      Suggestion: Claude explains: mean effect versus the effect in a new setting. The ECDF calculation concerns $\mu$, the average of the distribution of true effects. Someone deciding whether to run the intervention in a new setting needs the distribution of the effect there, $\theta_{new} \sim N(\mu, \tau^2)$, which is much wider.

      Rough numbers: with $\mu \approx 0.57$ and $\tau \approx 0.3$ (about what this model returns), $P(\theta_{new} < 0.30) \approx \Phi((0.30-0.57)/0.30) \approx 0.18$. The mean effect is almost surely above 0.30, yet nearly one setting in five would have a true effect below it.

      The posterior draws give this directly, including the uncertainty in $\mu$ and $\tau$:

      r theta_new <- rnorm(nrow(post.samples), post.samples$smd, post.samples$tau) mean(theta_new < 0.30) quantile(theta_new, c(.025, .975)) # 95% prediction interval

      Both probabilities are conditional on the model and on the included studies being an unselected sample of the evidence. Publication bias would pull $\mu$ down and is reflected in neither.

    3. Above we see the estimated ‘sd of the mean

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-25): 'sd(Intercept)' is described as the 'sd of the mean effect'; it is $\tau$, the between-study SD of true effects. Three margin notes nearby ask what 'Est.Error' is, why the density peaks differ from the printed values, and by what 'criteria' the study estimates are averaged toward the mean (said to be 'mentioned later', but never explained).

      Suggestion: Claude explains: reading the brms output. Under Group-Level Effects, sd(Intercept) is $\tau$, the standard deviation of true effects across studies. It measures heterogeneity and is unrelated to the precision of the mean effect. Under Population-Level Effects, Intercept is $\mu$. For each row, Estimate is the posterior mean, Est.Error the posterior standard deviation (the counterpart of a standard error, answering the margin question) and the CI columns are the 2.5th and 97.5th posterior percentiles. Density peaks differ from the printed values because the table reports means and a peak is a mode; the posterior of $\tau$ is right-skewed, so its mode is below its mean.

      ranef() returns each study's deviation after shrinkage. Given $\mu$ and $\tau$, the posterior mean of study $k$'s true effect is $$\tilde\theta_k = B_k\mu + (1-B_k)\hat\theta_k,\qquad B_k = \frac{\sigma_k^2}{\sigma_k^2+\tau^2}.$$ Noisy studies are pulled strongly toward $\mu$, precise ones barely. Example with $\mu = 0.57$ and $\tau = 0.30$: a study reporting 1.00 with $\sigma_k = 0.30$ has $B_k = 0.5$ and $\tilde\theta_k = 0.785$, a deviation of 0.215 against a raw gap of 0.43. With $\sigma_k = 0.10$, $\tilde\theta_k = 0.957$. The forest plot below shows these shrunken values, which is why its rows differ from the published estimates.

    4. Some priors never allow the data to overload them, so we should be careful using them

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-22): The margin note asks for a formal definition of the prior's influence shrinking with data. The standard result (Bernstein–von Mises) can be stated briefly, together with the point that in meta-analysis 'data' means the number of studies.

      Suggestion: Claude explains: the formal statement (Bernstein–von Mises). Under regularity conditions, if the prior density is continuous and positive at the true parameter value, the posterior converges in total variation distance to a normal distribution centred at the maximum likelihood estimate with variance $I(\theta)^{-1}/n$, the inverse Fisher information. Two analysts whose priors both satisfy the condition end up with posteriors that converge to each other. Total variation is the largest difference in probability the two distributions assign to any event, which answers the question of how 'smaller and smaller' is measured.

      A conjugate example shows the rate. With prior $\theta \sim N(m_0, s_0^2)$ and a sample mean $\bar y$ from $n$ observations of variance $\sigma^2$, the posterior mean puts weight $(1/s_0^2)/(1/s_0^2 + n/\sigma^2)$ on $m_0$, which falls like $1/n$.

      Priors that the data cannot overwhelm are those assigning zero probability to a region containing the truth, for example a uniform prior on $[0,1]$ for a parameter that is really 2. Bayes' rule multiplies by the prior, so zero stays zero.

      In meta-analysis the relevant sample size for $\mu$ and $\tau$ is the number of studies, however many participants each has. With ten studies the prior on $\tau$ still has influence, which is why sensitivity analysis over that prior is routine.

    5. Recommended distribution for this case (for variances in general)

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-21): Three imprecisions about the half-Cauchy prior: it is placed on the standard deviation $\tau$ (as the complete model and 'class = sd' show), not on the variance; it is a truncated Cauchy, not a censored one (censoring would put a point mass at zero); and the scale $s$ does not control 'how heavy-tailed' the distribution is. The margin exchange (line 491) about what $s$ means is left unresolved.

      Suggestion: Text fixes: 'Recommended distribution for the between-study standard deviation $\tau$ (and for scale parameters in general; Gelman 2006): the half-Cauchy prior, a Cauchy truncated to non-negative values', with the sub-heading 'For $\tau$'. Line 467: '$s$, the scale parameter (how spread out)'. Line 486: the half-Cauchy mean is infinite (it is the full Cauchy's mean that is undefined). 'One might consider $s=0.3$' appears twice (lines 484, 488).

      Claude explains: what the scale $s$ means. For a half-Cauchy with location zero, $s$ is the median: half the prior mass lies below $s$, which is what phcauchy(0.3, sigma = 0.3) returning 0.5 shows. Other quantiles scale in proportion, $q_p = s\tan(\pi p/2)$. The parameter sets the spread; the shape of the tail is the same for every $s$.

      With $s = 0.5$ the prior median of $\tau$ is 0.5, the 90th percentile is 3.2 and the 95th is 6.4; about 30% of the prior mass has $\tau > 1$. On the SMD scale, $\tau = 1$ means true effects differ across studies with a standard deviation of a full unit of $d$, so this prior is generous to very large heterogeneity. With many studies that hardly affects the result. With five to ten it can widen the posterior for $\tau$ and the interval for $\mu$ noticeably.

      Lighter-tailed alternatives are a half-normal or half-Student-$t$ with similar scale (Williams, Rast and Bürkner 2018; Röver et al. 2021). In brms, prior(cauchy(0, 0.5), class = sd) is truncated at zero automatically because sd parameters are constrained to be positive.

    6. a Bayesian term which links to our probability for an event to being our best guess estimate

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-20): In this contributor fold the term meant is 'coherent', not 'consistent', and coherence is described as if it required a zero prior mean when the sign of the effect is uncertain. The following fold states that bias 'doesn't really exist for subjectivists', which is one position among several.

      Suggestion: Comment for the author(s): the term is 'coherent' (de Finetti). A set of probability judgements is coherent if it obeys the probability axioms, equivalently if no combination of bets placed at those probabilities guarantees a loss. 'Consistent' has a different meaning in statistics (an estimator, or a posterior, converging on the truth as data accumulate). Coherence does not single out zero as the prior mean: a prior centred at 0.3 with wide spread, giving positive probability to negative effects, is fully coherent. Whether it is reasonable depends on prior evidence about this class of interventions. A zero-centred prior is a sceptical, regularising choice that shrinks estimates toward no effect, and can be defended on those grounds. On the next fold: Bayesian estimators have well-defined frequentist properties (a posterior mean is typically biased toward the prior mean and has lower variance), and many Bayesians check them; see Little (2006, The American Statistician) on 'calibrated Bayes'.

    7. DerSimonian-Laird is also seen to be prone to producing false positives (for the mean effect I think?)

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-18): Two separate choices are run together: the estimator of $\tau^2$ (DL, SJ, REML...) and the method for the confidence interval of the mean (Wald versus Hartung–Knapp). The parenthetical question and the unexplained 'residual concerns' about HKSJ can be answered directly.

      Suggestion: Claude explains: two separate choices. One is the estimator of $\tau^2$ (DerSimonian–Laird, REML, Paule–Mandel, Sidik–Jonkman). The other is how the confidence interval for the mean effect $\mu$ is built (Wald, or Hartung–Knapp, also written HKSJ). In the code below, method.tau = "SJ" sets the first and hakn = TRUE the second.

      The false positives do concern the mean effect. The classic interval is $\hat\mu \pm 1.96\,SE$ with $\hat\tau^2$ treated as known. With few studies $\hat\tau^2$ is noisy, the SE is too small on average, and the test of $\mu = 0$ rejects too often, especially with few studies or studies of unequal size (IntHout, Ioannidis and Borm 2014).

      Hartung–Knapp rescales the variance by $q = \sum_k w_k(\hat\theta_k - \hat\mu)^2/(K-1)$ and uses a $t_{K-1}$ quantile. The 'residual concern' is that when the estimates happen to agree closely, $q < 1$ and the interval becomes narrower than the classic one; a common modification uses $\max(1, q)$ (Röver, Knapp and Friede 2015).

      Current advice for $\tau^2$ is REML or Paule–Mandel (Veroniki et al. 2016). Sidik–Jonkman tends to overestimate $\tau^2$ when heterogeneity is low.

    8. point is correct, although it is certainly empirically the case below

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-17): The note doubts Harrer's statement that random effects 'pays more attention to small studies'. The statement is true by construction. The WLS estimator dismissed at line 125 as 'far less useful' is a response to exactly this property and is not explained there.

      Suggestion: Claude explains: the claim is correct by construction. Fixed-effect weights are $1/\sigma_k^2$; random-effects weights are $1/(\sigma_k^2+\tau^2)$. Adding the same $\tau^2$ to every variance flattens the weights, and as $\tau^2$ grows they approach equal weighting.

      Example: standard errors 0.05, 0.10, 0.20 give fixed-effect weights of 76%, 19%, 5%. With $\tau^2 = 0.021$ the random-effects weights are 46%, 35%, 18%, and the pooled estimate moves from 0.157 to 0.243 (estimates 0.10, 0.30, 0.50, as in the worked example above).

      The flattening is right if the model is right: a large study pins down its own effect but is still one draw from the distribution of effects. The objection (Poole and Greenland 1999) is that small studies are the most exposed to selective publication, so weight shifts toward inflated estimates.

      The WLS estimator mentioned earlier (Stanley and Doucouliagos 2015) responds to this. It keeps the fixed-effect weights and point estimate (0.157) and multiplies the fixed-effect variance by $Q/(J-1)$, giving $SE = 0.044\sqrt{6.29/2} = 0.077$. Heterogeneity widens the interval without moving weight to small studies. It provides no $\tau$, prediction interval or study-level shrinkage, which the hierarchical model does. Reporting fixed-effect and random-effects results side by side is a cheap check: a large gap signals small-study effects.

    9. and how do we estimate some of the components of these, like

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-15): The question of how $\tau$ is estimated is posed and left open; the margin note below it asks whether heterogeneity can be detected when confidence intervals are wide; and $I^2$ is defined (line 188) without the caveat that it is a relative measure that depends on study precision.

      Suggestion: Claude explains: estimating $\tau$, and reading $I^2$. Start from the heterogeneity statistic $Q = \sum_j p_j(\hat\beta_j - \hat\beta_{PW})^2$ with $p_j = 1/\hat\sigma_j^2$. If all studies share one effect, $Q$ is roughly $\chi^2_{J-1}$, with mean $J-1$. The DerSimonian–Laird estimator attributes the excess to between-study variance: $$\hat\tau^2 = \max\left(0,\ \frac{Q-(J-1)}{\sum_j p_j - \sum_j p_j^2/\sum_j p_j}\right),\qquad I^2 = \max\left(0,\ \frac{Q-(J-1)}{Q}\right).$$ REML and Paule–Mandel are now preferred to DerSimonian–Laird (Veroniki et al. 2016); the Bayesian model puts a prior on $\tau$ and reports its posterior.

      On the margin question: with few or imprecise studies there is little power to detect heterogeneity. $\hat\tau^2$ often lands at exactly zero, and that is weak evidence of homogeneity.

      $I^2$ is a relative measure. It depends on study precision as well as on how much effects differ. With $\tau = 0.1$, studies with $SE = 0.2$ give $I^2 = 0.01/(0.01+0.04) = 20\%$ and studies with $SE = 0.05$ give $80\%$, for the same spread of true effects. To describe how much effects vary, report $\hat\tau$ in the effect's units and a prediction interval for a new study, about $\hat\mu \pm 2\sqrt{\hat\tau^2 + SE(\hat\mu)^2}$ when $J$ is not small (Borenstein et al. 2017).

    10. Is this the estimated variance or the variance of the estimate

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-14): The displays mix the conditional posterior of $\mu$ given $\tau$ with the plug-in estimator that inserts $\hat\tau$. They also have notation errors: the numerator lacks the subscript on $\hat\beta_j$, the variance formula uses index $i$, '\hat{tau}' is missing a backslash and '\big(' is unmatched, and the label changes from $V_\mu$ to $Var(\hat\mu)$. Earlier (line 145) 'a large $\mu$ may suggest looking into sample splits' should read 'a large $\tau$'. The margin question deserves a direct answer.

      Suggestion: Corrected displays (conditional on $\tau$): $$\hat{\mu}=\frac{\sum_{j}\hat{\beta}j/(\hat{\sigma}^2_j+\tau^2)}{\sum{j}1/(\hat{\sigma}^2_j+\tau^2)},\qquad V_\mu = \frac{1}{\sum_j 1/(\hat{\sigma}_j^2+\tau^2)}.$$ Line 145: 'And a large $\tau$ (relative to $\mu$) may suggest looking for sample splits or moderators that explain the heterogeneity.'

      Claude explains. $V_\mu$ is the variance of the estimate of the mean effect: the posterior variance of $\mu$ for a given $\tau$, which equals the sampling variance of $\hat\mu$ when $\tau$ is known. It is distinct from $\tau^2$, the variance of true effects across studies. As the number of studies grows, $V_\mu$ goes to zero while $\tau^2$ stays where it is.

      The formulas hold for a given $\tau$. The frequentist random-effects estimator plugs in a point estimate $\hat\tau$ and treats it as known, which understates uncertainty when there are few studies (the reason for the Hartung–Knapp adjustment). The Bayesian analysis averages the conditional posterior $N(\hat\mu(\tau), V_\mu(\tau))$ over the posterior of $\tau$, so uncertainty about heterogeneity flows into the interval for $\mu$.

    11. (they give a numerical example here with 3 estimates)

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-13): The source's numerical example is mentioned but not reproduced, and the adjacent TODO asks for R code doing the calculation. A small worked example also makes the later fixed- versus random-effects discussion concrete.

      Suggestion: Claude explains: a worked example with three estimates. Estimates 0.10, 0.30, 0.50 with standard errors 0.05, 0.10, 0.20. Precisions are 400, 100, 25 (sum 525).

      • Equal-weight mean: 0.30.
      • Precision-weighted (fixed-effect) mean: $(400\times0.10 + 100\times0.30 + 25\times0.50)/525 = 0.157$, with $SE = 1/\sqrt{525} = 0.044$. The most precise study carries 76% of the weight.
      • Heterogeneity: $Q = \sum_j p_j(\hat\beta_j - 0.157)^2 = 6.29$ on 2 degrees of freedom, so $I^2 = (Q-2)/Q = 68\%$ and the DerSimonian–Laird estimate is $\hat\tau^2 = (Q-2)/200 = 0.021$, where $200 = \sum p_j - \sum p_j^2/\sum p_j$.
      • Random-effects mean, with weights $1/(\hat\sigma_j^2 + \hat\tau^2)$: 0.243 with $SE = 0.105$. The weight on the most precise study falls to 46%.

      r b <- c(0.10, 0.30, 0.50); se <- c(0.05, 0.10, 0.20) p <- 1 / se^2 c(fe = sum(p * b) / sum(p), se = sqrt(1 / sum(p))) metafor::rma(yi = b, sei = se, method = "FE") # same numbers metafor::rma(yi = b, sei = se, method = "DL") # random effects

    12. I think that’s loosely worded, it must be nonlinear

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-11): The margin note doubts the source's statement that precision weighting implies weights proportional to sample size. The source is right in the standard case: the standard error is nonlinear in N, but the weight is the inverse of its square, which is linear in N.

      Suggestion: Claude explains: precision is linear in sample size. For a difference in means with outcome variance $\sigma^2$ and two arms of $N/2$, $SE^2 = 4\sigma^2/N$, so the precision is $1/SE^2 = N/(4\sigma^2)$. Double the sample and the weight doubles. The standard error is the nonlinear quantity (it falls with $\sqrt{N}$); the weight uses its square.

      Example: studies with $N = 100$ and $N = 400$ and the same $\sigma$ have standard errors in the ratio 2:1 and weights in the ratio 1:4.

      Proportionality to $N$ breaks when studies differ in other things that affect precision: the outcome variance or measurement scale, unequal arm sizes, clustered assignment (effective sample size $N/[1+(m-1)\rho]$ with clusters of size $m$), and covariate adjustment. Two studies with the same $N$ then get different weights. Inverse-variance weighting accounts for all of these automatically, which is the reason for weighting by precision in place of raw $N$.

    13. this not to be confused with the random effects panel-data models discussed in standard Econometrics texts

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-10): The two are the same model family. Telling economists they are unrelated hides a useful mapping and the one real trap, which is that 'fixed effect(s)' means different things in the two literatures.

      Suggestion: Claude explains: same model, different vocabulary. The random-effects meta-analysis model is the econometrician's random-intercept model with one observation per group: $$\hat{\theta}_k = \mu + u_k + e_k,\quad u_k \sim N(0,\tau^2),\quad e_k \sim N(0,\sigma_k^2).$$ Here $u_k$ plays the role of the panel 'random effect' and $e_k$ is the idiosyncratic error. Two features are specific to meta-analysis: each study contributes a single observation, and the error variances $\sigma_k^2$ are treated as known from the reported standard errors. That is what allows $\tau^2$ to be separated from sampling noise with one observation per unit.

      The labels differ in a way that trips people up. In meta-analysis 'fixed effect' means $\tau^2 = 0$, one common effect. In panel econometrics 'fixed effects' means a separate intercept for every unit with no distributional assumption.

      The panel worry carries over to meta-regression. Panel random effects requires the unit effect to be uncorrelated with the regressors. Meta-regression of effect sizes on study characteristics requires $u_k$ to be uncorrelated with those characteristics, and with a few dozen studies as the data points there is rarely a way to check.

    1. Specify some informative but still somewhat diffuse prior distribution over these parameters

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-08): The model section ends with 'Update and iterate towards our best posteriors?'. The setup mentions that some individuals can be linked across years but never uses it; that linkage is the one feature of the data that can identify population size.

      Suggestion: Claude explains: linked respondents give a handle on population size (capture–recapture). Treat two survey years as two 'captures'. If $n_1$ people respond in year 1, $n_2$ in year 2 and $m$ in both, the Lincoln–Petersen estimate of the population is $$\hat{N} = \frac{n_1 n_2}{m}.$$ With $n_1 = 200$, $n_2 = 250$ and $m = 50$: a quarter of year-1 respondents came back, so year 2 is estimated to have reached a quarter of the population, giving $\hat{N} = 1000$ and response rates of 20% and 25%.

      Assumptions: a closed population between waves, complete linkage, and responding in year 2 independent of responding in year 1. The last fails when some people are persistently keener to respond; $m$ is then too large and $\hat{N}$ too small, so the estimate tends to understate the population the referrers reach. Log-linear and Bayesian capture–recapture models with three or more waves relax independence and allow heterogeneous response propensities.

      A full model could be $n_{rkt} \sim \text{Binomial}(\Pi_{rk}, \alpha_{rkt})$, with $\alpha_{rkt}$ built from referrer, demographic and year effects, priors on each, and the linked response histories entering the likelihood.

    2. We might dig more deeply to see if there are potential approaches to dealing with this

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-04): The text leaves 'the bias cannot be measured' as an open question. There is an organised literature on inference from non-probability samples, and a simple identity (Meng 2018) that turns the unmeasurable bias into a sensitivity parameter.

      Suggestion: Claude explains: what can be done about bias in a non-probability sample. Three families of methods exist (Elliott and Valliant 2017, Statistical Science). (1) Quasi-randomisation: estimate each respondent's probability of being in the sample by comparison with a reference probability survey of the same population, then weight by its inverse. (2) Outcome modelling: model the outcome given covariates and predict for the population (MRP is one version). (3) Sensitivity analysis and bounds, when neither a reference sample nor population totals exist, which is the situation here.

      Meng (2018, Annals of Applied Statistics) gives an identity for (3). The error of a sample mean is $$\bar{y}n - \bar{Y}_N = \rho{R,Y}\,\sqrt{(1-f)/f}\;\sigma_Y ,$$ where $f = n/N$ is the share of the population in the sample and $\rho_{R,Y}$ is the correlation between responding and the outcome. With $f = 0.01$ and $\rho = 0.05$ the error is half a standard deviation of $Y$. A larger $n$ helps only through $f$. One can report how large $\rho$ would have to be to overturn a conclusion.

      Pew's comparisons of opt-in panels find that the choice of adjustment variables matters more than the weighting method (Mercer, Lau and Kennedy 2018).

    3. Is our approach similar enough to this to be able to adopt these approaches

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-03): The margin note asks whether the adjustments that make opt-in election polls work can be borrowed. The method (MRP) is not named, and the ingredient it depends on, a census of the target population, is the one the 'Jazz' case lacks.

      Suggestion: Claude explains: why election polls can use opt-in samples, and what is missing here. The standard method is multilevel regression and post-stratification (MRP). Step 1: fit a multilevel model of the outcome on demographics and geography in the opt-in sample. Step 2: predict the outcome for every demographic cell and average the predictions using the cells' population counts from the census. Wang, Rothschild, Goel and Gelman (2015, International Journal of Forecasting) produced accurate 2012 US election forecasts this way from a sample of Xbox users that was 93% male.

      Two ingredients do the work: (i) a census table giving the true size of every cell, and (ii) the assumption that, within a cell, people who opt in answer like those who do not. Elections also supply a known outcome against which the method can be checked.

      The 'Jazz' case lacks (i). There is no census of the movement, so there is nothing to post-stratify to. MRP could still stabilise small-cell estimates and hold composition fixed when comparing years, but it cannot deliver representativeness without an outside benchmark for who is in the population.

    4. There are some intricate and interesting calculations involving network analysis

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-02): The method's central step is left as 'intricate calculations', so a reader cannot see why a chain-referral sample can be corrected or what it assumes. The notes also stop before the validation evidence (line 149: 'I didn't read the latter carefully'), and later evaluations of RDS are considerably less favourable. 'The authors propose' (line 104) attributes the RDS design to the 2004 paper; the design is Heckathorn (1997).

      Suggestion: Claude explains: how the RDS estimator works. Take two groups, A and B. Let $D_A$ and $D_B$ be the average number of contacts in the target population that members report (their degree), and $C_{AB}$ the share of A-members' recruits who are in B ($C_{BA}$ the reverse). If ties are reciprocal, the number of A-to-B ties equals the number of B-to-A ties, $N_A D_A C_{AB} = N_B D_B C_{BA}$, so the population share of A is $$P_A = \frac{D_B C_{BA}}{D_A C_{AB} + D_B C_{BA}}.$$ Example: each group recruits across the divide 30% of the time, A-members have 20 contacts and B-members 10. The recruitment chain settles at 50% A in the sample, while $P_A = 3/(6+3) = 1/3$. Well-connected people are easier to reach, and dividing by degree undoes that.

      The result needs respondents to recruit at random among their contacts, reciprocal ties, a connected network, accurately reported degrees, and chains long enough to forget the seeds. Later evaluations are sobering: simulations on real networks and field tests find variances several times larger than assumed, and biased estimates when recruitment is non-random (Goel and Salganik 2010, PNAS; Gile and Handcock 2010, Sociological Methodology; McCreesh et al. 2012, Epidemiology). On attribution: the RDS design is due to Heckathorn (1997, Social Problems); the 2004 paper contributes this estimator.

    5. we can sample/re-weight so that the heterogeneous parameter of interest can be said to represent the average value for the true population of interest

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (D-01): The fold runs together two different operations: sampling strata at chosen rates (design weights, known exactly) and re-weighting a realised sample to known population shares (post-stratification, which needs an assumption about non-respondents). Neither is defined, and the condition under which re-weighting removes bias is not stated.

      Suggestion: Claude explains: two kinds of weights. A design weight undoes unequal selection probabilities chosen by the sampler. If unit $i$ was selected with probability $\pi_i$, it gets weight $1/\pi_i$ (Horvitz–Thompson). A group sampled at twice the rate counts half as much per person. These weights are known exactly.

      A post-stratification weight corrects the realised sample using known population shares: for cell $h$, $w_h = (N_h/N)/(n_h/n)$. Example: women are 50% of the population and 70% of respondents, so women get $0.5/0.7 = 0.71$ and men $0.5/0.3 = 1.67$. If mean support is 0.60 among women and 0.40 among men, the raw mean is 0.54 and the weighted mean is 0.50.

      Post-stratification removes bias only if, within each cell, respondents resemble non-respondents on the outcome. It also needs trustworthy population shares, which a hidden population lacks. When only margins are known (age shares and gender shares, with no joint table), raking adjusts the weights iteratively until every margin matches.

      Weights cost precision. Kish's approximation is $deff \approx 1 + CV^2(w)$; the weights above give $deff = 1.19$, so 1,000 respondents carry the information of about 840.

    1. can obtain nominal coverage with more covariates than K-Nearest Neighbour matching or kernel methods

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-37): The notes ask 'What does this mean?' about nominal coverage, and the heterogeneity sections describe the literature as of the 2016 working paper. Several of the cited papers have since been published and the main tools have changed.

      Suggestion: 'Nominal coverage', and what has changed since the 2016 chapter. A 95% interval has nominal coverage if it contains the true conditional effect $\tau(x)$ in 95% of samples. Kernel and nearest-neighbour estimators average over a neighbourhood of $x$. With many covariates that neighbourhood has to be wide to contain any data, so the estimate is smoothed over units unlike $x$, and intervals centred on a biased estimate cover less than 95%. Causal forests choose neighbourhoods adaptively, narrow in the covariates that move the effect and wide in the others, so the bias stays small relative to the standard error for more covariates.

      Later work to cite alongside these notes:

      • Wager and Athey is published (2018, JASA). Generalised random forests (Athey, Tibshirani and Wager 2019) are implemented in the R package grf.
      • Chernozhukov, Demirer, Duflo and Fernández-Val ('Generic machine learning inference on heterogeneous treatment effects in randomized experiments') give up on inference for $\tau(x)$ itself and test features of it: the best linear predictor of effects, and average effects in the most and least affected groups.
      • Meta-learners (Künzel, Sekhon, Bickel and Yu 2019) and the R-learner (Nie and Wager 2021) turn any prediction method into an effect estimator.
      • List, Shaikh and Xu is published (2019, Experimental Economics).
    2. this will be an indirect method of stratifying

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-36): The summary leaves out the condition that makes re-randomisation legitimate (a rule fixed in advance), and 'p-values could/should be adjusted' can now be made precise. Related results on very small strata have also appeared since the 2016 chapter.

      Suggestion: Two qualifications. First, re-randomisation supports valid inference only when the acceptance rule is fixed in advance, for example 'redraw until the Mahalanobis distance between the arms' covariate means is below a stated threshold' (Morgan and Rubin 2012). Redrawing whenever the allocation 'looks bad' leaves the set of possible assignments undefined, so neither a randomisation test nor a standard error has a clear justification. Bruhn and McKenzie (2009) found this practice common among development economists and rarely reported.

      Second, on the adjustment: with a pre-specified rule, ordinary standard errors are conservative, and exact p-values come from a randomisation test that redraws only from acceptable assignments. Li, Ding and Rubin (2018, PNAS) give the large-sample distribution, and Li and Ding (2020, JRSS-B) show that regression adjustment for the balance covariates recovers the precision gain with standard robust errors. Athey and Imbens themselves prefer stratification.

      A related update for the advice at line 103 that strata should not be too small 'as variances cannot be estimated within pairs': variance estimators for matched pairs and very small strata now exist (Bai, Romano and Shaikh 2022, JASA; de Chaisemartin and Ramirez-Cuellar 2024, AEJ Applied).

    3. I am curious how these terms are derived and compared

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-34): The notes ask how $V_C-V_S\ge0$ is derived, and ask twice (lines 67 and 522) whether one may simply report the smaller of the two estimated variances. Both have short answers.

      Suggestion: Where the gain from stratification comes from, and which variance to report. Let stratum $g$ have population share $q_g$ and let a share $p$ be treated in every stratum. Split each potential outcome's variance into within- and between-stratum parts: $\sigma_t^2=E_g[\sigma^2_t(g)]+\mathrm{Var}_g(\mu_t(g))$, and likewise for controls. Complete randomisation gives $V_C=\sigma_t^2/(pN)+\sigma_c^2/((1-p)N)$. Stratified randomisation keeps only the within parts. So $$V_C-V_S=\frac{1}{N}\left[\frac{\mathrm{Var}_g(\mu_t(g))}{p}+\frac{\mathrm{Var}_g(\mu_c(g))}{1-p}\right]\ge0.$$ The gain is the between-stratum variance of mean outcomes: the noise that, under complete randomisation, comes from one arm drawing more units from high-outcome strata. It is zero when strata do not predict outcomes.

      Which estimate to report. The stratified estimator $\hat{V}_S$ matches the design and is the one to use. $\hat{V}_C$ is a valid fallback because it is conservative in expectation, which helps when strata are too small to estimate within-stratum variances. Reporting whichever of the two is smaller in the sample is a different procedure. The minimum of two noisy estimates is biased downward, so tests over-reject. Choose the estimator before seeing the data.

    4. in cases without homoskedasticity. I think this is pure speculation.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-33): The Athey and Imbens claim that equal arm sizes are close to optimal under heteroskedasticity is a short calculation, and it holds for any plausible ratio of standard deviations.

      Suggestion: Is an equal split close to optimal with unequal variances? A calculation. The variance-minimising allocation is $N_t/N_c=\sigma_t/\sigma_c$ (Neyman allocation), which gives variance $(\sigma_t+\sigma_c)^2/N$. An equal split gives $2(\sigma_t^2+\sigma_c^2)/N$. The ratio of the two is $$\frac{2(\sigma_t^2+\sigma_c^2)}{(\sigma_t+\sigma_c)^2}.$$ If one arm's standard deviation is 1.5 times the other's, the equal split has 4% more variance, which is 2% wider intervals. At twice, 11% more variance. At three times, 25%. So the claim holds for any plausible degree of heteroskedasticity. Since $\sigma_t$ is rarely known before the experiment, the equal split is also the safe default. Unequal costs per arm are the stronger reason to depart from it; see the allocation discussion in the power chapter.

    5. DR: I think this simply means that the unit ranked

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-32): 'The two are equal' under perfect rank correlation is slightly too strong as a statement about quantiles. The reading in the parenthesis (no crossing over) is right; what follows from it is identification of each unit's effect, which is a different object from the quantiles of the effect distribution unless effects rise with rank.

      Suggestion: A precision point. Under perfect rank correlation the unit at quantile $s$ of the untreated distribution is also at quantile $s$ of the treated distribution, so $\tau_s$ is that unit's own effect, and the whole distribution of individual effects is identified: it is the collection of $\tau_s$ values. That is weaker than saying $\tau_s$ equals the $s$-th quantile of the effects. The two coincide only if $\tau_s$ increases with $s$. If the treatment compresses the distribution, so that low-ranked units gain most, the largest individual effects sit at low $s$ and the $s$-th quantile of the effect distribution is $\tau_{1-s}$. Is 'the two are equal' the chapter's wording or a paraphrase? If it is the chapter's, a short qualifier here would help.

    6. In practice researchers ignore the third term, which leads to an upward bias for the

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-31): The bias described belongs to the variance estimator; the point estimate is unbiased under both views. The notes also ask what $S_{tc}^2$ is (line 241), ask for intuition (249) and for a practical strategy (255), and object several times that the sample ATE 'is really not what we care about' (lines 88, 137, 220). One decomposition answers all of these, and Abadie, Athey, Imbens and Wooldridge (2020) is the later reference.

      Suggestion: Reword line 247: "In practice researchers drop the third term. The resulting variance estimator is biased upward for the variance of $\hat\tau$ around the sample average effect, and unbiased for its variance around the population average effect."

      Box:

      The third variance term, and why the two views of uncertainty agree in practice. $S^2_{tc}$ is the variance across units of the individual effect $Y_i(1)-Y_i(0)$. It equals $S_t^2+S_c^2-2\,\mathrm{Cov}(Y(1),Y(0))$ and is zero only when the effect is the same for everyone. It cannot be estimated, because no unit is seen in both states.

      Split the error of $\hat\tau$ for the population effect in two: $$\hat\tau-\tau_{pop}=(\hat\tau-\tau_{sample})+(\tau_{sample}-\tau_{pop}).$$ The first piece is randomisation error, with variance $S_c^2/N_c+S_t^2/N_t-S^2_{tc}/N$. The second is sampling error, the average of $N$ unit effects around its population mean, with variance $S^2_{tc}/N$. They are uncorrelated, so the total is $S_c^2/N_c+S_t^2/N_t$. The dropped term is exactly the extra uncertainty from having sampled these units.

      So the usual estimator $s_c^2/N_c+s_t^2/N_t$ (equivalently HC2 robust errors) is right for the population effect and conservative for the effect in this sample. A researcher who cares about a wider population loses nothing by using it. Abadie, Athey, Imbens and Wooldridge (2020) extend this to regression; Aronow, Green and Lee (2014) give sharp bounds on the unidentified term.

    7. on estimating treatment effects based on rank statistics

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-30): The author writes 'I don't get this at all'. The idea (Hodges-Lehmann estimation by inverting a rank test) takes a few lines and one small example.

      Suggestion: Estimating an effect from a rank test (Hodges-Lehmann). A randomisation test gives a p-value for 'no effect'. The same machinery gives an estimate and a confidence interval once you assume a constant additive effect, $Y_i(1)=Y_i(0)+\tau$.

      Take a candidate value $\tau_0$ and subtract it from every treated outcome. If $\tau_0$ is the true effect, the adjusted outcomes are untreated outcomes for everyone, so the rank-sum statistic computed on them has its known null distribution.

      • The point estimate is the $\tau_0$ at which the adjusted data look most like the null, meaning the statistic equals its null expectation. For the rank-sum statistic this is the median of all $N_t\times N_c$ pairwise differences between a treated and a control outcome.
      • The 95% confidence interval is the set of $\tau_0$ values the test does not reject at 5%.

      Example: treated outcomes 5, 9, 12 and control outcomes 2, 4, 7 give nine pairwise differences (-2, 1, 2, 3, 5, 5, 7, 8, 10) with median 5, against a difference in means of 4.33.

      The estimate inherits the rank test's resistance to outliers. In R, wilcox.test(y1, y0, conf.int = TRUE) reports both. The price is the constant-effect assumption: with heterogeneous effects the estimand is the typical pairwise shift, which need not equal the average effect.

    8. What is the statistic called and is there preprogrammed code?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-29): The author asks for the name of the procedure, whether it is Fisher's exact test, and where to find code. The same text can fill the empty 'Randomization inference?' section at the top of the chapter and clarify the aside about 'limitations of the Fisher test' at line 184.

      Suggestion: Randomisation inference: names and code. The procedure is the Fisher randomisation test, also called a permutation test. Under the sharp null every unit's outcome is the same in either arm, so the observed outcomes are fixed and only the assignment is random. Recompute the statistic under every admissible assignment (or a few thousand random draws). The p-value is the share at least as extreme as the observed one.

      The familiar tests are special cases. With a binary outcome and the difference in proportions it is Fisher's exact test. With ranks it is the exact Wilcoxon rank-sum test. With the difference in means on a continuous outcome it is the Fisher-Pitman permutation test.

      Two rules: redraw assignments the way the experiment did (within blocks, by cluster, with the same arm sizes), and choose the statistic in advance. A studentised statistic keeps the test valid in large samples for the weaker null of a zero average effect.

      Code: in R, ri2::conduct_ri() takes a randomizr declaration of the design; coin::oneway_test() and coin::wilcox_test() with distribution = approximate() handle simple designs. In Stata, ritest.

      The choice makes most difference with few clusters, small samples, skewed outcomes or high-leverage covariates. Young (2019, QJE) re-analysed 53 experimental papers and found 13 to 22 percent fewer significant individual effects under randomisation tests.

    9. I am not sure I understand this notation, particularly the

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-28): The author asks what the notation means. The source also has p\: where a colon is meant, and the surrounding text runs together two separate points: the definition of the assignment mechanism and the dimensionality problem without SUTVA.

      Suggestion: Reading the assignment-mechanism notation. The expression should read $p:{0,1}^N\times\mathbb{Y}^{2N}\times\mathbb{X}^N\to[0,1]$ (the source has p\:, which drops the colon). It defines the assignment mechanism as a function $p(W\mid Y(0),Y(1),X)$.

      • ${0,1}^N$ is the set of all possible assignment vectors $W=(W_1,\dots,W_N)$, with one 0 or 1 per unit. For $N=3$ it contains $2^3=8$ vectors such as $(1,0,1)$.
      • $\mathbb{Y}^{2N}$ holds the $2N$ potential outcomes, $Y_i(0)$ and $Y_i(1)$ for each unit.
      • $\mathbb{X}^N$ holds the covariates.
      • The output is the probability that this assignment vector is the one drawn. Summed over all vectors it equals one.

      A completely randomised experiment with $N_t$ treated units puts probability $1/\binom{N}{N_t}$ on each vector with exactly $N_t$ ones, and zero on the rest. A randomised experiment in Athey and Imbens' sense is one where $p$ is known and does not depend on the potential outcomes.

      The dimensionality remark is a separate point. Writing two potential outcomes per unit already assumes no interference between units (SUTVA). Without that assumption, unit $i$'s outcome could depend on the whole vector $W$, which gives $2^N$ potential outcomes per unit.

    10. Could there not ever be a loss from doing interactions dividing up the sample too fine in doing this interactive estimation?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-27): The notes ask the same cluster of questions several times without an answer: whether interactions can cost precision (lines 60 and 430), why regression adjustment is biased in finite samples (392), whether the 1-R² result is for the additive or the interacted model (412), why skewed covariates make it worse (419), and when to demean covariates (53, 73). The key reference, Lin (2013), is not cited.

      Suggestion: Regression adjustment in experiments: bias, interactions, and when it pays. Why it is biased in finite samples. The adjusted estimator is the difference in means minus $\hat\beta'(\bar{X}_t-\bar{X}_c)$. Both $\hat\beta$ and the chance imbalance $\bar{X}_t-\bar{X}_c$ come from the same assignment draw and are correlated, so their product does not average to zero. The bias is of order $1/N$ and applies to both the additive and the interacted model. With skewed covariates a few high-leverage units drive both terms, which is why the bias can be noticeable there. Indicator covariates that partition the sample are the exception: the estimator is then an average of within-cell differences in means.

      Additive or interacted. Lin (2013) shows that interacting treatment with demeaned covariates is asymptotically at least as precise as both the unadjusted and the additive estimator. The additive model can lose precision when arms are unequal and effects vary with $X$. Demeaning makes the coefficient on $W$ the average effect; without it, that coefficient is the effect at $X=0$.

      The tradeoff. The cost is degrees of freedom. $K$ covariates with no predictive value raise the variance by roughly $K/N$ ($2K/N$ when interacted), and adjustment pays when the $R^2$ gained exceeds that. With $N=100$ and 10 covariates the break-even $R^2$ is about 0.1 (0.2 interacted). Keep $K$ small relative to the smaller arm.

    11. Adjustments for exogenous (but non-random) treatment assignment

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-26): Heading with no content. The most common case in field experiments is assignment probabilities that differ across sessions, days or sites, where a pooled comparison is biased and the standard fixed-effects fix does not estimate the ATE. The introduction's commented-out outline already points to this ('your go-to regression specification is biased').

      Suggestion: When assignment probabilities differ across groups. Many field designs randomise within sessions, days, sites or waves, with a different share treated in each. Assignment is then random only conditional on the group, and a pooled difference in means is biased whenever groups differ in baseline outcomes. Example: if 80% are treated on high-donation days and 20% on low-donation days, the pooled comparison credits the treatment with the day effect.

      Three valid estimators, with slightly different targets:

      • Group fixed effects. Unbiased for a weighted average of group-specific effects with weights proportional to $N_g\,p_g(1-p_g)$, where $p_g$ is the treated share. Groups with shares near one half count most. If effects differ across groups, this is not the average treatment effect (Gibbons, Suárez Serrato and Urbancic 2019).
      • Fully interacted regression: treatment interacted with demeaned group indicators (Lin 2013). The coefficient on treatment is the size-weighted average of group effects, which is the ATE.
      • Inverse probability weighting by $1/p_g$ for treated and $1/(1-p_g)$ for control units. Same target as the interacted regression.

      The same logic covers alternation or assignment by arrival order. Treat it as random only if arrival order is plausibly unrelated to outcomes, check balance on pre-treatment covariates, and block on time in the analysis.

    12. Parametric and nonparametric tests of simple hypotheses

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-24): The section and its 'Parametric tests' and 'Non-parametric tests' subsections are empty apart from the Fligner-Policello note. A reader gets no guidance on which test answers which question.

      Suggestion: Choosing a two-sample test: start from the estimand. Each test answers a different question, so pick the question first.

      • Welch t-test (or OLS with robust standard errors): difference in means. Valid in moderate samples without normality; slow to converge when outcomes are very skewed. The mean is the right target when totals drive the decision, as with funds raised.
      • Mann-Whitney-Wilcoxon rank-sum: tests equality of the two distributions, with power against $P(Y_T>Y_C)\ne1/2$. It says nothing direct about means; a treatment can raise the mean and lower the typical rank. Its efficiency relative to the t-test is 0.955 under normality, never below 0.864, and far higher with heavy tails.
      • Brunner-Munzel or Fligner-Policello: test $P(Y_T>Y_C)=1/2$ allowing unequal variances.
      • Randomisation (permutation) test: exact under the sharp null of no effect for any unit, with any statistic. A studentised difference in means makes it valid in large samples for the weaker null of equal means as well (Chung and Romano 2013).
      • Binary outcomes: test of proportions; Fisher's exact test in small samples.

      For outcomes with many zeros and a long right tail, report the difference in means with a robust or randomisation-based p-value as the primary result, and a rank-based test as a check on whether a few large values drive it. Fix the choice in the pre-analysis plan.

    13. Which error structure? Random effects?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-23): Heading with no content. It can also absorb the answer to the '[DR: ??]' at line 344 about why the robust variance estimator 'has no natural degrees-of-freedom adjustment'.

      Suggestion: Which standard errors for an experiment? Three rules cover most cases.

      1. Cluster at the level of assignment. If individuals were randomised and each contributes one observation, heteroskedasticity-robust errors suffice. If sessions, classrooms or villages were randomised, or each person contributes repeated observations, cluster at that level (Abadie, Athey, Imbens and Wooldridge 2023). Fréchette (2012) discusses lab sessions, a borderline case.
      2. Prefer HC2. For a difference in means, the HC2 robust variance equals Neyman's $s_t^2/N_t+s_c^2/N_c$ exactly. HC0, the original Eicker-Huber-White formula, divides each arm's squared residuals by $N_g$ where Neyman divides by $N_g-1$. That is the missing 'degrees-of-freedom adjustment' in the Athey and Imbens quotation later in this chapter, and it understates the variance most when an arm is small. Stata's robust is HC1; estimatr::lm_robust() defaults to HC2 (Samii and Aronow 2012).
      3. With few clusters (fewer than roughly 30 to 50), cluster-robust errors are too small. Use the wild cluster bootstrap (Cameron, Gelbach and Miller 2008) or randomisation inference.

      Random effects are an efficiency device here. Under random assignment the treatment indicator is uncorrelated with unit effects, so the usual objection to random effects does not apply to the treatment coefficient, and modelling unit effects can tighten estimates in repeated-measures designs. Report cluster-robust errors alongside, since the assumed variance structure may be wrong.

    1. after collecting the sample, our estimates of the CI will always have a range equal to the estimated sd

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-21): Three open questions in this section: whether the relative-width target holds in every sample, how to get a stated probability of achieving an absolute width ('Hmm, it’s getting complicated', and the request for 'a simple analytical formula' in the fold), and whether treating a Likert item as normal is a problem.

      Suggestion: Sample size for a confidence interval of a given width. Relative target (B). If the interval is $\bar{y}\pm1.96\,s/\sqrt{n}$, its width is $3.92\,s/\sqrt{n}$, which is always exactly $3.92/\sqrt{n}$ estimated standard deviations. So $n=15.37/B^2$ delivers a width of $B$ estimated SDs in every sample, by construction. (With a $t$ critical value the interval is slightly wider for small $n$.)

      Absolute target (A). Here the width depends on the realised $s$, which is random. Planning with the true $\sigma$ gives the target width on average and misses it about half the time. To achieve width $w$ with 80% probability, use the fact that $(n-1)s^2/\sigma^2\sim\chi^2_{n-1}$ under normality and require $$n\ge\Big(\frac{3.92\,\sigma}{w}\Big)^2\,\frac{\chi^2_{0.80,\,n-1}}{n-1}.$$ Example: $\sigma=1.2$ and $w=0.5$ need $n=89$ on average and about $n=100$ for 80% assurance. Maxwell, Kelley and Rausch (2008) review this 'accuracy in parameter estimation' approach.

      Likert specifics. Normality of the responses is not needed; the sample mean of a five-point item is close to normal once $n$ passes 30 or so. And the SD is bounded: on a 1-5 scale it cannot exceed 2 (half the answers at each end), so $n=62$ guarantees a 95% interval no wider than one scale point whatever the distribution.

    2. Ideally there is an analytical formula for this; worth looking up.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-20): The notes ask for an analytic formula for the null distribution of the top title's share, leave the power of the proposed test uncomputed, and wonder whether 'power in the right direction' is a known idea (line 718). All three can be answered briefly; the sample sizes below come from simulating the test as described.

      Suggestion: The 'most first-place votes' test: formula and sample size. Under the null of random rankings, the first-place counts are multinomial with $N$ trials and probability $1/20$ per title, and the statistic is the largest count. Its exact distribution has no simple closed form. Two routes are easy.

      • Bonferroni bound: $P(\max_k X_k\ge c)\le20\,P(\mathrm{Bin}(N,1/20)\ge c)$. The bound is tight in the tail, so rejecting when the top title's binomial p-value is below $0.05/20$ is close to exact.
      • Simulation: draw multinomial counts many times and take the 95th percentile of the maximum.

      Simulated power, counting only rejections in which the truly favoured title comes out on top:

      | Alternative | First-place shares | $N$ for about 80% power | |---|---|---| | favoured title 1.5 times the others | 7.3% vs 4.9% | about 1,450 | | favoured title 2 times the others | 9.5% vs 4.8% | about 420 |

      At $N=400$ the 1.5-times alternative is detected about 20% of the time.

      On the 'wrinkle': requiring that the right title is selected is the 'probability of correct selection' of the ranking-and-selection literature. In testing language, rejections that favour the wrong title are type III (or type S) errors. Here nearly all rejections pick the right title, so the two definitions of power differ by one or two percentage points.

    3. better to test each title 1x than to test some titles 2x or more

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-18): Under a simple normal model the claim does not hold in general: when individual responses are noisy relative to true differences between titles, concentrating the sample on fewer titles gives a better expected choice. The same model supports the other half of the argument, that testing two titles is a poor design. The debate in these folds has a standard formalisation (ranking and selection) that puts numbers on both positions. Confidence is medium because the numbers depend on the normal model and on a between-subject design with one title per respondent.

      Suggestion: How many titles to test: a worked model. Suppose title values are draws $\theta_k\sim N(0,\tau^2)$, each respondent rates one title with noise variance $\sigma^2$, and we pick the title with the highest sample mean. With $K$ titles and $N/K$ respondents each, the expected value of the chosen title is $$E[\theta_{chosen}]=\frac{m_K\,\tau}{\sqrt{1+(\sigma^2/\tau^2)(K/N)}},$$ where $m_K$ is the expected maximum of $K$ standard normals ($m_2=0.56$, $m_5=1.16$, $m_{10}=1.54$, $m_{20}=1.87$, $m_{100}=2.51$). Adding titles raises $m_K$ and spreads the sample thinner, which enlarges the denominator.

      Take $\sigma/\tau=10$. Expected value of the chosen title, in units of $\tau$:

      | $N$ | 2 titles | 5 | 10 | 20 | |---|---|---|---|---| | 200 | 0.40 | 0.62 | 0.63 | 0.56 | | 1,000 | 0.52 | 0.95 | 1.09 | 1.08 | | 4,000 | 0.55 | 1.10 | 1.38 | 1.53 |

      Two titles is the worst of these designs at every budget. Testing all 20 wins once the sample is large relative to the noise. One rating per title is not optimal in general: with 100 titles and 100 respondents, rating 50 titles twice beats rating each once whenever $\sigma^2$ exceeds about $0.65\,\tau^2$.

      This is the 'ranking and selection' problem (Bechhofer 1954). 'Best-arm identification' is its adaptive version.

    4. We will also consider an unbalanced design, both in this and in other categories, which may achieve greater power

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-15): The text says an unbalanced design may raise power per unit of cost and the code comment at line 450 asks whether the optimal tradeoff is invariant to the budget ('am I right?'). Both have closed-form answers, and with costless controls the answer is a corner solution that the planned grid search would only rediscover.

      Suggestion: Optimal allocation when arms differ in cost. Minimise $\sigma_T^2/n_T+\sigma_C^2/n_C$ subject to a budget $c_Tn_T+c_Cn_C=B$. The solution is $$\frac{n_T}{n_C}=\frac{\sigma_T}{\sigma_C}\sqrt{\frac{c_C}{c_T}}.$$ The ratio depends on relative variances and relative costs only. So the answer to the question in the code comment below is yes: with per-unit costs, the optimal shares are the same for any budget.

      If controls cost nothing, as assumed here, there is no interior optimum. The budget fixes the number treated ($n_T=B/c_T$; with £6000 and £60 per treated unit, $n_T=100$) and every additional control helps. The gain is bounded: the variance falls from $2\sigma^2/100$ with 100 controls to $\sigma^2/100$ with unlimited controls, so the standard error can fall by at most 29%. Most of that arrives early. 300 controls (a treated share of 0.25) give an 18% reduction; 900 controls (a share of 0.1) give 25%.

      The grid over tshare should therefore show power rising steadily as the treated share falls. The practical limit is how many untreated observations are available and any fixed cost of observing them.

    5. Power calculations without real data

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-14): The section is a single link. The chapter never states the standard analytic formula, and clustering, covariate adjustment and non-compliance, the three things that most change required sample sizes in practice, appear nowhere in it.

      Suggestion: The analytic formula, and what moves it. For a two-arm comparison of means with total sample $N$, a share $P$ treated and outcome standard deviation $\sigma$, the minimum detectable effect at 80% power in a 5% two-sided test is $$MDE=2.8\,\sigma\sqrt{\frac{1}{P(1-P)N}}.$$ The 2.8 is $z_{0.975}+z_{0.80}=1.96+0.84$. With equal arms this gives $n\approx16/d^2$ per arm for a standardised effect $d$: 393 per arm for $d=0.2$, 63 for $d=0.5$.

      Three multipliers on the MDE cover most designs.

      • Covariates or blocking that explain a share $R^2$ of the outcome: multiply by $\sqrt{1-R^2}$. A baseline measure correlated 0.7 with the outcome halves the required sample.
      • Cluster randomisation with $m$ units per cluster and intra-cluster correlation $\rho$: multiply by $\sqrt{1+(m-1)\rho}$. With $m=20$ and $\rho=0.05$ the factor is 1.40, so the sample has to roughly double.
      • Imperfect compliance. If assignment raises take-up by a share $c$, the effect on those who take up is the intention-to-treat effect divided by $c$, and the sample needed to detect it scales with $1/c^2$.

      Simulation gives the same answers and extends to skewed outcomes, rank tests and multi-arm designs: simulate the data-generating process, run the planned test, record the share of p-values below $\alpha$. DeclareDesign (Blair, Cooper, Coppock and Humphreys 2019) is built for this.

    6. this could lead a large rate of type-1 error in our body of scientific knowledge

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-13): The type-I error rate is fixed at alpha by the test and does not change with power. What low power raises is the share of significant results that are false positives (the false discovery rate, one minus the positive predictive value). The paragraph and the Ferraro note below it also describe exaggerated effect sizes without giving magnitudes.

      Suggestion: Reword the sentence: "In combination with publication bias, this could lead to a large share of false positives among the significant results that make up our body of scientific knowledge (cases where the true effect was null and the authors had a very 'lucky' draw)."

      Box:

      Low power, false discoveries and exaggeration: the numbers. If a fraction $\pi$ of tested hypotheses are true effects, the share of significant results that are true (the positive predictive value) is $$PPV=\frac{(1-\beta)\,\pi}{(1-\beta)\,\pi+\alpha(1-\pi)}.$$ With $\pi=0.2$ and $\alpha=0.05$: power of 80% gives $PPV=0.80$, power of 50% gives 0.71, power of 20% gives 0.50. P-hacking, which raises the effective $\alpha$, lowers these further.

      Conditioning on significance also inflates estimates (the 'Type M' error of Gelman and Carlin 2014). For a true effect equal to one standard error (power 17%), significant estimates average 2.5 times the true effect and about 1% have the wrong sign. At 50% power the exaggeration factor is 1.4. At 80% power it is 1.13.

      On the margin note: a correction for this inflation exists when the selection rule is known or can be estimated (Andrews and Kasy 2019). The corrected intervals for marginally significant results are wide, so a significant estimate from a 20%-power study remains weak evidence about magnitude.

    7. a mathematical equivalency between the confidence interval and the standard

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-12): Three open questions sit close together: whether a precision target and a power target are equivalent ('often? always?'), what power for an equivalence test would be ('I need to learn more about this'), and whether power makes null results more credible (line 73, 'this needs to be stated more carefully'). One box answers all three.

      Suggestion: Precision targets, power targets and equivalence tests. With a known standard error $SE$, the three criteria are rescalings of one another.

      • A 95% confidence interval has half-width $1.96\,SE$.
      • The effect detectable with 80% power in a 5% two-sided test is $(1.96+0.84)\,SE=2.8\,SE$. So 'power to detect $\delta$' is the same requirement as 'expected half-width of $\delta/1.43=0.7\,\delta$'.
      • An equivalence test (two one-sided tests at 5%) concludes the effect lies within $\pm\Delta$ when the 90% interval falls inside those bounds. If the true effect is zero, 80% power needs $SE\le\Delta/2.93$, slightly stricter than detecting $\Delta$.

      The equivalence is exact only when $SE$ is known. With an estimated $SE$ the interval width is random, and 'probability that the width is below $w$' is a separate criterion (see the Likert example at the end of this chapter).

      On null results: an ex-ante power calculation tells you whether a null will be informative, because it fixes how narrow the interval will be. After the data are in, report the interval or the equivalence test. 'Observed power' computed from the estimated effect is a one-to-one function of the p-value and adds nothing (Hoenig and Heisey 2001). For replications, Simonsohn's (2015) 'small telescopes' test asks whether the replication rejects effects the original study had 33% power to detect.

    8. Todo: an aside here about power calculations in a Bayesian context.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-11): The author's own to-do. The chapter later argues for precision-based and decision-based design criteria, which are the Bayesian counterparts of power, without naming them.

      Suggestion: Design calculations in a Bayesian setting. 'Power' conditions on one fixed true effect, which a Bayesian analysis does not have. Three design criteria do the same job.

      1. Assurance (O'Hagan, Stevens and Campbell 2005): average the classical power curve over a prior for the effect size. If the prior puts real weight on small effects, assurance is well below the power computed at a single optimistic effect.
      2. Precision or decision goals (Kruschke 2015, ch. 13): choose $n$ so that, with a stated probability, the posterior interval is narrower than a target width, or lies entirely outside (or inside) a region of practical equivalence.
      3. Expected value of sample information: choose $n$ to maximise the expected gain from the better decision the data allow, minus the cost of collecting them. This is the natural criterion for the 'lift' problem later in this chapter.

      All three are computed by simulation: draw a parameter from the prior, simulate a data set of size $n$, fit the model, record whether the goal was met, and repeat. The frequentist calculation is the special case where the prior is a point mass at the assumed effect.

    1. efficient assignment of treatments

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-08): The section named in the chapter title contains only a link back to the power chapter. Allocation, blocking and re-randomisation are not explained anywhere in the book outside the Athey and Imbens reading notes.

      Suggestion: What makes an assignment efficient? The variance of a difference in means is $\sigma_T^2/n_T+\sigma_C^2/n_C$. Design can lower it in three ways.

      Allocation. With equal variances and equal costs a 50/50 split minimises it. If variances or per-unit costs differ, the optimum is $n_T/n_C=(\sigma_T/\sigma_C)\sqrt{c_C/c_T}$. The optimum is flat: a 60/40 split costs about 4% in variance.

      Blocking (stratification). Randomising within groups of similar units removes the between-group part of outcome variance. If block indicators explain a share $R^2$ of the outcome, the variance falls by roughly that share. Matched pairs are the limiting case. Analyse as you randomised: include block indicators or use a blocked estimator, otherwise the standard error ignores the gain (Bruhn and McKenzie 2009).

      Re-randomisation. Redrawing until a pre-specified balance criterion is met works like approximate blocking on continuous covariates (Morgan and Rubin 2012). Inference then has to use the same acceptance rule.

      On whether to randomise at all: Kasy (2016) argues that a deterministic, optimised assignment beats randomisation for a Bayesian decision-maker; Banerjee, Chassang, Montero and Snowberg (2020) show randomisation is preferred when the audience may be sceptical; Bai (2022) shows that matching pairs on an index of predicted outcomes is optimal among stratified designs.

    2. The NHST frequentist framework can not adjust ex-post to consider the

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-07): The section is a pasted spreadsheet row plus an excerpt from a response to referees. It never says how large the inflation from peeking is or what the standard fixes are, and the remark that Bayesian approaches address the problem needs a caveat.

      Suggestion: How much does peeking cost, and what fixes it? Test at the nominal 5% level after each of $K$ equally spaced looks and stop at the first $p<0.05$. With no true effect, the chance of a false positive is 8.3% for $K=2$, 10.7% for 3, 14.2% for 5, 19.3% for 10 and 24.8% for 20 (Armitage, McPherson and Rowe 1969).

      Three standard remedies:

      • Group-sequential boundaries. Fix the number of looks in advance and test each at a stricter level. Pocock's constant boundary uses nominal $p<0.0294$ for 2 looks and $p<0.0158$ for 5. O'Brien-Fleming boundaries are very strict early and close to 0.05 at the final look. Alpha-spending functions (Lan and DeMets 1983) allow unplanned timing.
      • Always-valid inference. Mixture sequential probability ratio tests and e-values give p-values and confidence sequences that hold at every stopping time (Johari, Koomen, Pekelis and Walsh 2017), at some cost in power for a given sample.
      • Adjusting after the fact. $p_{augmented}$ (Sagarin, Ambler and Lee 2014) bounds the error rate when data were added after a first look.

      A Bayesian posterior does not depend on the stopping rule. A rule such as 'stop when the 95% credible interval excludes zero' still has the same inflated false-positive rate under a flat prior, and estimates from studies stopped early are biased away from zero.

    3. The hazards of specification-searching

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-05): Heading with no content. The preceding discussion assumes the reader already accepts that specification search is a serious problem; the size of the problem is easy to show.

      Suggestion: Why specification search inflates false positives. A researcher who can choose among outcomes, control sets, subsamples and exclusion rules runs many tests and reports one. If $k$ candidate specifications were independent, the chance that at least one gives $p<0.05$ when there is no effect is $1-0.95^k$: 23% for $k=5$, 40% for $k=10$, 64% for $k=20$. Real specifications are correlated, so each adds less, but the menu is usually large. Simmons, Nelson and Simonsohn (2011) showed by simulation that combining four common choices (two outcome measures, optional extra data collection, an optional covariate, dropping a condition) raised the false-positive rate to 61%.

      The search need not be deliberate. Gelman and Loken's 'garden of forking paths' is the case where the analyst makes one reasonable choice after seeing the data, and would have made a different reasonable choice had the data looked different.

      Remedies, roughly in order of strength:

      • a pre-analysis plan that fixes the primary outcome and specification;
      • reporting every defensible specification, as a specification curve (Simonsohn, Simmons and Nelson 2020) or multiverse analysis (Steegen et al. 2016);
      • holding out part of the sample for confirmation;
      • multiple-testing corrections when several outcomes are of real interest (see the MHT section).
    4. I think it could solve some of the p-hacking problems but not much else.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-04): The exchange (from around 2020) debates whether pre-registration helps beyond p-hacking and what it costs. There is now direct evidence on both sides that the section could cite.

      Suggestion: Evidence since this exchange bears on both positions. Brodeur, Cook, Hartley and Heyes (2024, JPE Microeconomics) examine about 16,000 test statistics from RCTs in economics: pre-registration by itself shows no reduction in p-hacking or publication bias, while studies with a full pre-analysis plan show less of both. Ofosu and Posner (2023, Perspectives on Politics) audit pre-analysis plans in economics and political science and find many too vague to bind, with deviations often unreported. On the costs BB raises, Olken (2015) and Coffman and Niederle (2015), both in the Journal of Economic Perspectives, set out the case that plans constrain useful exploratory work and add little where replication is cheap. Registered reports (acceptance in principle before data collection, e.g. the Journal of Development Economics track) address the file-drawer point that pre-registration alone leaves open, which is BB's last concern in this fold.

    1. Causal channels and identification

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-02): Three headings in this chapter have no content yet: 'Causal channels and identification' (one bullet), 'Types of experiments, demand effects and more artifacts of artificial setups', and 'Generalizability' (which holds only the 'all the other papers do it' note).

      Suggestion: Suggested fillers for the three empty headings, two or three sentences each plus references.

      • Causal channels and identification. The design question is which arms separate the candidate mechanisms: one arm per channel, or a 2x2 that switches each channel on and off. Ludwig, Kling and Mullainathan (2011, 'Mechanism experiments and policy evaluations', JEP) argue for experiments that test one link of a causal chain. Imai, Tingley and Yamamoto (2013, JRSS-A) give designs that identify mediation by manipulating the mediator directly. Link to the mediation chapter.
      • Types of experiments and demand effects. Harrison and List's (2004) taxonomy (conventional lab, artefactual field, framed field, natural field) organises the artificiality concerns. On demand effects, Zizzo (2010) sets out the problem. De Quidt, Haushofer and Roth (2018, AER) bound it by adding arms that tell subjects what the experimenter hopes to see, and find modest effects in standard tasks. Mummolo and Peterson (2019, APSR) reach a similar conclusion for survey experiments.
      • Generalizability. List (2020, 'Non est disputandum de generalizability?') proposes reporting on selection, attrition, naturalness and scaling. Vivalt (2020, JEEA) measures how poorly impact-evaluation results transfer across settings. This connects to the Athey and Imbens point quoted in the experimetrics chapter, that external validity is mostly a question of treatment effect heterogeneity.
    2. Within vs between-subject designs

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (C-01): The section is a heading with no content. The tradeoff has a simple quantitative core (the correlation between a subject's outcomes under the two conditions) that a reader designing an experiment needs.

      Suggestion: Within- versus between-subject designs: the tradeoff in numbers. In a between-subject design each person sees one condition. In a within-subject design each person sees both and serves as their own control.

      Precision. Let the outcome have variance $\sigma^2$ and let $\rho$ be the correlation between a person's outcomes under the two conditions. The variance of the estimated effect is $2\sigma^2/n$ with $n$ people per arm, and $2\sigma^2(1-\rho)/n$ with $n$ people each observed twice. For an effect of half a standard deviation and 80% power, a between design needs about 64 per arm (128 people). With $\rho=0.5$ a within design needs about 34 people.

      Validity. The within design buys that precision with assumptions: no carry-over from the first condition to the second, no order or fatigue effects, and no change in behaviour once seeing both conditions reveals what the study is about. Counterbalancing the order lets you estimate order effects; carry-over remains.

      Estimand. The two designs can answer different questions. Judgements made side by side differ from judgements made in isolation (Hsee 1996), so choose the design that matches how the decision is taken outside the lab.

      A common compromise: randomise the order, treat the first block as a clean between-subject comparison, and use later blocks for added precision and to test for order effects. See Charness, Gneezy and Kuhn (2012).

    1. CI for the former will contain the latter with even greater probability.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-33): Correct as stated; the reason and the Imbens–Manski construction are not given, and the next line has "TA" for "TE".

      Suggestion: Claude explains: two kinds of confidence interval for bounds

      A 95% interval for the identified set $[\theta_L,\theta_U]$ has to cover both endpoints at once: $[\hat\theta_L-1.96\,se_L,\ \hat\theta_U+1.96\,se_U]$.

      The true effect is a single point inside the set. When the set is wide relative to sampling error, the point can be close to at most one endpoint, so only one tail is at risk and a one-sided critical value is enough. Imbens and Manski (2004) use $[\hat\theta_L-c\,se_L,\ \hat\theta_U+c\,se_U]$ with $c$ solving $$\Phi\Big(c+\frac{\hat\theta_U-\hat\theta_L}{\max(se_L,se_U)}\Big)-\Phi(-c)=0.95 .$$ $c$ is 1.645 when the estimated bounds are far apart and rises to 1.96 as they coincide.

      Example: bounds $[-0.02,\,0.09]$ with standard errors of 0.02 give $c\approx1.645$ and an interval of $[-0.053,\,0.123]$, against $[-0.059,\,0.129]$ for the identified set.

      In Stata's leebounds (Tauchmann 2014) this is the cieffect option. Stoye (2009) discusses cases where the Imbens–Manski interval needs modification.

    2. I suspect this assumption could be weakened and you would still get some similar bounds

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-31): The conjecture is correct and the results exist. Two nearby asides have answers too: whether a known upper bound on the outcome helps (line 63), and whether trimming "throws out data" (line 206).

      Suggestion: It can be weakened. Without monotonicity the always-observed share is no longer pinned down: with observation rates $q_1$ and $q_0$ it lies between $\max(0,\,q_1+q_0-1)$ and $\min(q_1,q_0)$. Zhang and Rubin (2003, JEBS) and Imai (2008, Statistics & Probability Letters) derive the resulting bounds on the always-observed effect, which trim both arms. They are wider, and very wide when $q_1+q_0$ is near or below 1.

      A sensitivity version of the idea in this note: posit that a share $\pi$ of subjects is induced out by treatment, compute the bounds for each $\pi$ in a plausible range, and report how large $\pi$ must be before the conclusion changes. Semenova's "Generalized Lee Bounds" (2020 working paper) is a middle route: monotonicity holds conditional on covariates, with its direction allowed to differ across covariate values.

      On the two side questions. A known upper limit on the outcome does not tighten Lee bounds: the trimmed means already lie inside the observed range and the bounds are sharp under his assumptions. It does make Horowitz–Manski bounds for the whole population feasible. And trimming is not an inefficient use of data: the width of the bounds is what the assumptions leave unidentified. Narrower bounds need covariates or further assumptions.

    3. this share is certainly no larger than the increased probability of observation in the treatment group

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-30): Two slips in the trimming explanation. Under monotonicity the marginal share among observed treated units equals $p=(q_1-q_0)/q_1$ exactly; "no larger than" has the inequality backwards (without monotonicity the share induced in is at least $p$). And the paragraph on why this improves on Horowitz–Manski says the upper bound assumes the marginal units "came from the highest distribution"; for the upper bound they are assumed to be the lowest $p$ share, as the preceding paragraphs say. A numerical example would replace several paragraphs of verbal description.

      Suggestion: Claude explains: Lee bounds in numbers (hypothetical)

      Control: 50% employed, mean log wage among the employed 2.00. Treatment: 60% employed.

      • Under monotonicity everyone employed in control would also be employed if treated. Among the treated employed, 50/60 are "always-employed" and 10/60 are employed only because of treatment: $p=(0.60-0.50)/0.60=1/6$, exactly.
      • Which treated workers form the marginal sixth is unknown. The extreme cases are that they are the lowest-paid sixth or the highest-paid sixth.
      • Upper bound: drop the lowest sixth of treated wages and take the mean of the rest (say 2.15). Subtract 2.00: $+0.15$.
      • Lower bound: drop the highest sixth (mean of the rest, say 1.93): $-0.07$.

      The wage effect for the always-employed lies in $[-0.07,\,0.15]$.

      Why this is narrower than Horowitz–Manski bounds: those fill in every missing wage (50% of controls, 40% of the treated) with the minimum or maximum of the support. Lee's bounds adjust only for the 10-point excess and use the observed wage distribution. The price is the monotonicity assumption and a narrower target: the effect for people employed under either assignment.

    4. sample selection bias can be seen as specification error in the conditional expectation

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-29): The paragraph that follows describes the Heckman selection equation in words and is garbled by dictation ("his status is equal to the true effect of the treatment an adjustment for..."). No equation is given.

      Suggestion: Claude explains: the selection model in one equation

      Latent wage $Y^*=\beta D+X\pi+U$. A person is employed if $\gamma D+X\delta+V>0$, and the wage is observed only then. So $$E[Y\mid D,X,\text{employed}]=\beta D+X\pi+E\big[U\mid V>-(\gamma D+X\delta)\big].$$ The last term is the selection bias. It is nonzero when $U$ and $V$ are correlated, and it varies with $D$ whenever treatment affects employment ($\gamma\neq0$). It therefore contaminates $\hat\beta$ under random assignment too.

      If $(U,V)$ are jointly normal the term equals $\rho\sigma_U\,\lambda(\gamma D+X\delta)$, where $\lambda(c)=\phi(c)/\Phi(c)$ is the inverse Mills ratio. Heckman's two-step estimates a probit for employment and adds $\hat\lambda$ as a regressor. With positive selection ($\rho>0$) and $\gamma>0$, treatment draws in people with lower $U$, and the naive comparison of observed wages understates $\beta$.

      Without a variable that shifts employment and is excluded from the wage equation, $\beta$ is separated from the $\lambda$ term only by the nonlinearity of $\lambda$, that is, by the normality assumption. That fragility is Lee's motivation for bounds.

    5. check whether any papers cite Lee using an IV approach, extending the technique and the estimation of variance

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-27): Open to-do with known answers. Related: the later idea of narrowing bounds with a ridge-predicted index has a published treatment, and the covariate weights are misdescribed (line 251 says "in the control group"; it is the covariate distribution among always-observed units, i.e. control units with observed outcomes when treatment raises selection).

      Suggestion: Papers that do this:

      • Chen and Flores (2015, JBES), "Bounds on treatment effects in the presence of sample selection and noncompliance": Lee-type trimming combined with the LATE framework, applied to Job Corps. The target is the wage effect for compliers who would be employed whether or not they enrol.
      • Blanco, Flores and Flores-Lagunes (2013, Journal of Human Resources): tighter Job Corps bounds under stochastic-dominance assumptions, and bounds on quantile effects.
      • Semenova, "Generalized Lee Bounds" (working paper, 2020): many covariates chosen by machine learning, with the direction of the selection effect allowed to differ across covariate values. This is the formal version of the "ridge-predicted wage index" idea in the notes on Section 5.2. If the index is built by hand, fit it on baseline covariates with cross-fitting; an index fit on the same outcomes it is used to stratify can make the bounds look narrower than they are.
      • For separating margins when one lottery shifts several unordered choices (the NL question): Kirkeboen, Leuven and Mogstad (2016, QJE).
    6. what meaningful restriction does this impose?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-26): Open author question. The answer (the latent-index form is equivalent to monotonicity) is the assumption the rest of the notes rely on.

      Suggestion: Claude explains: what the latent-variable selection equation assumes

      It imposes monotonicity. Write selection as $S=1[\gamma D+V>0]$, with one unobservable $V$ and a common coefficient $\gamma$. If $\gamma>0$, treatment raises the index for everyone. Anyone observed when untreated is also observed when treated; some people are induced into the sample and nobody is pushed out.

      Vytlacil (2002) shows the equivalence runs both ways: an additively separable latent-index selection model holds if and only if the independence and monotonicity assumptions of Imbens and Angrist (1994) hold.

      What it rules out is two-way flows. Example: training makes some people employable who otherwise would not work, while leading others to stay in education or raise their reservation wage, so that they are not employed at the survey date.

      Lee's bounds lean on this. Monotonicity implies that every observed control-group member is an "always-observed" type, so only the treatment group needs trimming. The restriction concerns the direction of the effect on selection. It places no restriction on how $V$ relates to wages, which is why the method handles selection on unobservables.

    1. economically justified counterfactual relocation choices and estimate the causal effect of neighborhood relocation conditioned on these partition sets

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-22): The notes ask "[what does this mean?]", and SARP is used without definition. The count of seven admissible types in the suggested text is from memory of Pinto's paper and should be verified against it.

      Suggestion: Claude explains: response types in Pinto's MTO analysis

      A family's response type is the list of what it would choose under each of the three assignments, $S_\omega=[T_\omega(z_1),T_\omega(z_2),T_\omega(z_3)]$. With three choices there are $3^3=27$ conceivable types. They are unobserved, since each family is seen under one assignment, and they partition the sample the way compliers, always-takers and never-takers do in the binary case.

      Pinto uses revealed preference (SARP, the strong axiom) to rule out types no utility-maximising family would display, given what each voucher subsidises. Example: the experimental voucher subsidises only low-poverty moves, so a family that moves to a low-poverty area with no voucher will not switch to a high-poverty area when offered it. This reduces the 27 types to seven.

      Each comparison of voucher arms then mixes a known subset of the remaining types, and neighbourhood effects (low-poverty versus no move, say) are identified, or bounded, for specific types. "Conditioned on these partition sets" means that effects are defined and estimated within response types, like a LATE for compliers. They do not average to a population effect without further assumptions. Heckman and Pinto (2018) generalise the idea as "unordered monotonicity".

    2. F is presumably the distribution over the observables; where did the unobservables go? They are in the expectations, I guess.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-21): Open author question about the mediation formulas; the guess is right and the reason it is allowed is the content of the assumption.

      Suggestion: Claude explains: where the unobservables went

      The guess is right. $F_{\theta^p|D=d,X}$ is the distribution of the measured inputs in arm $d$, which the data reveal. The unmeasured inputs are averaged out inside $E(Y\mid\theta^p=t,D=d,X)$.

      Sequential ignorability is what allows that conditional mean to be read causally. Given $D$ and $X$, people with different values of $\theta^p$ are assumed to have the same distribution of unmeasured inputs, so $E(Y\mid\theta^p=t,D=d,X)=E(Y_{d,t}\mid X)$: the mean outcome if measured inputs were set to $t$. The formula takes this response function for arm $d$ and averages it over the two mediator distributions.

      If the assumption fails (say, students who choose a specialisation also gained more unmeasured human capital), the conditional mean mixes the effect of $\theta^p$ with the effect of the unmeasured inputs that travel with it, and the estimated indirect effect absorbs part of the direct one.

      This is Pearl's (2001) mediation formula. Imai, Keele and Yamamoto (2010) give the identification result and a sensitivity analysis indexed by the correlation between the mediator and outcome errors (R package mediation).

    3. Antonakis, coming from the Psychology and Leadership disciplines, considers the mediation question in a much simpler set of models.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-17): The paper is not cited, and the "Antonakis approaches" section at the end of the chapter contains only "Insert notes here".

      Suggestion: Claude explains: the Antonakis et al. argument

      Antonakis, Bendahan, Jacquart and Lalive (2010, "On making causal claims: A review and recommendations", The Leadership Quarterly) treat mediation as an endogeneity problem in the linear model $M=aT+e_M$, $Y=bM+c'T+e_Y$.

      1. Even with $T$ randomised, $M$ is an endogenous regressor in the $Y$ equation whenever $e_M$ and $e_Y$ are correlated. The Baron–Kenny steps, the Sobel test and a bootstrapped $ab$ are then inconsistent.
      2. Their remedy is to estimate the $M\to Y$ path by 2SLS with $T$ as the instrument for $M$, and to compare OLS with 2SLS using a Hausman test.
      3. This identifies $b$ only under an exclusion restriction: $T$ affects $Y$ solely through $M$ (full mediation, $c'=0$). One instrument cannot deliver both $b$ and a direct effect $c'$; that needs a second source of exogenous variation that shifts $M$.

      So the approach trades "no confounding of $M$" for "no direct effect of $T$". It is the single-instrument limitation noted above for the NL lottery, stated in psychology's notation.

    4. may arise through a process involving selection on unobserved variables

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-16): The literature review stops at 2015. Several later papers address exactly the stated problem (an instrument for $T$ only, an endogenous mediator, unordered choices).

      Suggestion: Later work worth adding here:

      • Frölich and Huber (2017, JRSS-B): direct and indirect effects identified with separate instruments for treatment and mediator.
      • Dippel, Ferrara and Heblich (2020, Stata Journal, command ivmediate): a single instrument for $T$ can suffice under the added assumption, roughly, that the unobserved confounders of $T$ affect $Y$ only through $M$. Worth checking whether that is defensible for the NL lottery.
      • Imai, Tingley and Yamamoto (2013, JRSS-A): experimental designs that manipulate or encourage the mediator.
      • Acharya, Blackwell and Sen (2016, APSR): controlled direct effects, which need weaker assumptions than the natural direct/indirect decomposition.
      • Bullock, Green and Ha (2010, JPSP): the general case that experiments alone rarely identify mechanisms.
      • For unordered multi-valued choices with a lottery instrument: Kirkeboen, Leuven and Mogstad (2016, QJE), who show IV with several fields of study is interpretable only with information on next-best alternatives, and Heckman and Pinto (2018, Econometrica, "Unordered Monotonicity"), which generalises Pinto's MTO approach summarised below.
    1. this seems similar to my idea of regularising on a subset

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-11): The cited 2016 working paper is now the standard double/debiased ML reference, and the notes do not say why two prediction problems are needed. Penalising only the controls in a single outcome regression does not give valid inference on the treatment coefficient. The Athey–Imbens item just below has also been superseded.

      Suggestion: Claude explains: double/debiased machine learning in brief

      The paper is now Chernozhukov, Chetverikov, Demirer, Duflo, Hansen, Newey and Robins (2018, Econometrics Journal). For $Y=\theta D+g(X)+\varepsilon$ and $D=m(X)+v$:

      1. Predict $Y$ from $X$, and $D$ from $X$, with any ML method.
      2. Regress the outcome residual on the treatment residual. The slope is $\hat\theta$.
      3. Cross-fit: form each observation's residuals from models trained on the other folds.

      If the "subset" idea is to penalise the controls while leaving $D$ unpenalised in one outcome regression, $\hat\theta$ is biased: a control that is dropped or shrunk and is correlated with $D$ leaves omitted-variable bias that does not vanish at the $\sqrt n$ rate. Residualising both equations makes the estimate depend on the product of the two prediction errors, so each prediction can converge slowly (faster than $n^{-1/4}$) and $\hat\theta$ is still $\sqrt n$-consistent with ordinary standard errors. Cross-fitting removes the bias from fitting and residualising on the same data. Post-double-selection (Belloni, Chernozhukov and Hansen 2014) is the lasso special case. Software: DoubleML (R, Python); ddml, pdslasso (Stata).

      For heterogeneous effects, Athey and Imbens (2016) has been extended to causal forests (Wager and Athey 2018) and generalized random forests (Athey, Tibshirani and Wager 2019; R package grf).

    2. is this equally a problem for non-sparsity-based procedures like ridge?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-10): Open author question in the notes on Mullainathan and Spiess (2017).

      Suggestion: Claude explains: does ridge share the lasso's coefficient problems?

      Partly. Ridge keeps every variable, so the instability in which variables get selected does not arise. The coefficient problem remains. Ridge coefficients are biased toward zero, and among correlated predictors the weight is spread across them: if rooms and square footage are highly correlated, ridge gives them similar coefficients whatever the true split between them. A ridge coefficient on one variable therefore absorbs part of the effect of its correlates. That is the "cousin of omitted variable bias" the authors describe, in a smoother form.

      At a penalty chosen for prediction, neither estimator's coefficients estimate partial effects. To estimate one coefficient well, use a method built for that purpose (post-double-selection or double machine learning), which treats the remaining variables as nuisance.

    3. it might boost efficiency to allow inference about coefficients that should be exactly zero

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-09): The aside asks whether ridge or lasso is better for choosing covariates to reduce noise in treatment-effect estimation and leaves it open. There are now direct results for randomised experiments.

      Suggestion: Claude explains: ridge or lasso for covariate adjustment in an experiment?

      In a randomised experiment covariates are there only to absorb outcome variance, so the criterion is out-of-sample prediction of $Y$. Use whichever of ridge, lasso, elastic net or a forest predicts best under cross-validation. Lasso tends to win when a few covariates carry the signal, ridge when it is spread over many.

      Two results make this safe. Bloniarz et al. (2016) show that lasso-adjusted ATE estimates in experiments are consistent and asymptotically normal, with variance no larger than the unadjusted difference in means. Wager et al. (2016) show the same for any prediction method when predictions are cross-fitted (each unit's prediction comes from a model fit without that unit's fold); the precision gain is governed by predictive accuracy.

      Recipe: predict $Y$ from baseline covariates with cross-fitting, then estimate the treatment effect on $Y-\hat Y$, or add $\hat Y$ as a covariate. Leave the treatment coefficient unpenalised.

      In observational data the criterion changes: covariates that predict treatment also have to be kept, which is what post-double-selection (Belloni, Chernozhukov and Hansen 2014) and double machine learning (Chernozhukov et al. 2018) are for.

    4. DR: When is this likely to help/hurt relative to pure lasso?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-08): Open author question, with an answer available from later work.

      Suggestion: Claude explains: when refitting after the lasso helps

      Refitting by OLS on the lasso-selected variables removes the shrinkage on the retained coefficients.

      It helps when the signal is strong and sparse. The lasso then needs a large $\lambda$ to screen out noise variables, and the same $\lambda$ over-shrinks the real coefficients; the refit undoes that.

      It hurts when the signal-to-noise ratio is low or many small effects are present. Shrinkage of the retained coefficients is then useful variance reduction, and the selected set is itself unstable.

      Meinshausen's (2007) relaxed lasso has a second tuning parameter that moves between the lasso fit and the OLS refit and is chosen by cross-validation (relax = TRUE in glmnet), so the data choose the amount of un-shrinking. Belloni and Chernozhukov (2013) show OLS-after-lasso converges at least as fast as the lasso and can do strictly better when selection is good. In the simulations of Hastie, Tibshirani and Tibshirani (2020) the relaxed lasso does well at both low and high signal-to-noise ratios, where the plain lasso is best only at low and best-subset only at high.

      Standard errors from the refitted OLS ignore the selection step and are too small.

    5. No analytical statistical inference after lasso (some being developed?), bootstrap is common

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-06): Outdated. Inference after lasso is now well developed, and the naive bootstrap is known to be unreliable for lasso coefficients. The same applies to point 4 of the EA Forum quote earlier in the chapter ("new techniques being developed").

      Suggestion: Claude explains: inference after the lasso (state of play)

      Which method applies depends on the target.

      1. Effect of one pre-specified regressor (a treatment) with many candidate controls. Post-double-selection (Belloni, Chernozhukov and Hansen 2014) and double/debiased machine learning (Chernozhukov et al. 2018) give standard errors that remain valid when the lasso makes selection mistakes among the controls.
      2. Confidence intervals for individual coefficients in a high-dimensional regression. The debiased lasso (Zhang and Zhang 2014; van de Geer et al. 2014; Javanmard and Montanari 2014).
      3. Inference on the coefficients of the model the lasso selected, conditional on that selection. Exact post-selection inference (Lee, Sun, Sun and Taylor 2016), implemented in the R package selectiveInference.

      The naive bootstrap is unreliable here. The lasso estimator has a point mass at zero, and the residual bootstrap is inconsistent when some true coefficients are zero (Chatterjee and Lahiri 2010; their 2011 paper gives a modified version that works). Sample splitting, selecting on one half and estimating by OLS on the other, is a simple valid alternative at the cost of power.

    6. Not clear here whether standardisation is necessary for the procedure to be valid or just convenient for explaining and deriving its properties.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-05): Open author question. Standardisation changes the lasso solution, so it is a substantive choice; the notes leave this unresolved.

      Suggestion: Claude explains: why predictors are standardised before the lasso

      The lasso penalty treats all coefficients alike, and the size of a coefficient depends on the units of its regressor. Measure income in thousands of dollars in place of dollars and its coefficient becomes 1,000 times larger, so the same $\lambda$ penalises it 1,000 times more and a different model is selected. OLS has no such problem: rescaling a regressor leaves the fitted values unchanged. Standardising each column to mean zero and unit variance makes the penalty apply equally to a one-standard-deviation change in each predictor.

      So the optimisation is well defined either way, and the answer depends on the scaling you choose. Standardising is the default because it removes dependence on arbitrary units.

      • Centring $y$ and $X$ lets the (unpenalised) intercept drop out. Rescaling $y$ only rescales $\lambda$.
      • glmnet standardises internally by default and reports coefficients on the original scale.
      • For dummies, standardising means a rare category is penalised less, per unit of its coefficient, than a common one. Some analysts leave dummies unscaled.
      • Variables that must stay in the model (the treatment indicator, stratification dummies) should get a penalty factor of zero.
    7. All of the controls must still be exogenous, otherwise this itself can lead to a bias.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (B-01): The definition asks for controls on determinants of "the independent variable" and requires controls to be "exogenous". The identifying condition is conditional independence of treatment given controls; a small residual does not deliver it, and Oster's test is cited without saying what it does.

      Suggestion: Claude explains: what a control strategy needs, and what Oster's test does

      A control strategy identifies the effect of $D$ on $Y$ if, among units with the same controls $X$, $D$ is as good as randomly assigned: $Y(d) \perp D \mid X$ ("selection on observables"). In practice:

      • Control for common causes of $D$ and $Y$. Variables that predict only $Y$ add precision. Variables that predict only $D$ cost precision and can amplify whatever bias remains.
      • Controls should be fixed before treatment. Their own coefficients need no causal interpretation. A control that is itself affected by $D$ (a mediator, or a collider such as occupation in a wage-on-schooling regression) biases the coefficient on $D$.
      • A small residual is not sufficient. With $R^2 = 0.9$ the estimate is still biased if the remaining 10% is correlated with $D$.

      Oster (2019) formalises a common robustness argument. If adding observed controls barely moves $\hat\beta$ while raising $R^2$ a lot, unobservables would have to matter far more than the observables to explain the estimate away. Her $\delta$ is the degree of selection on unobservables, relative to observables, needed to drive $\beta$ to zero, given an assumed maximum $R^2$ (she suggests $R_{max} = 1.3\,\tilde R^2$, with $\tilde R^2$ from the regression with controls). $|\delta| > 1$ is the usual benchmark for "robust".

    1. Common methods bias

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-49): A term in quotation marks with no content. It is directly relevant to the survey-based outcomes used throughout the book.

      Suggestion: Claude explains: common method bias

      When two variables are measured the same way (same survey, same respondent, same response scale, same sitting), part of their correlation comes from the shared method: mood on the day, acquiescence, social desirability, a habit of using one end of the scale, or a wish to appear consistent. In measurement-error terms the errors in $X$ and $Y$ are positively correlated, so the usual result that noise attenuates relationships is reversed and associations can be inflated or created.

      Typical case: a survey asks about attitudes toward charity and about donations last year. Respondents who present themselves favourably overstate both, producing a correlation with no behavioural content.

      Remedies, strongest first (Podsakoff, MacKenzie, Lee and Podsakoff 2003): take the outcome from a different source (administrative records, an incentivised choice, a real donation); separate the measurements in time or in position within the survey; vary scale formats and reverse-key some items; include a 'marker' variable that should be unrelated to both and see how strongly it correlates with them. Harman's single-factor test, still widely reported, has little power to detect the problem and is not evidence of its absence.

      For experiments, the same concern is one reason to prefer behavioural outcomes over self-reports collected in the same session as the treatment.

    2. Factor analysis and principal-component analysis

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-48): Empty section, though the chapter title promises dimension reduction and factor analysis.

      Suggestion: Claude explains: PCA or factor analysis?

      Both reduce many correlated variables to a few, with different aims.

      Principal components are weighted sums of the observed variables chosen to capture as much total variance as possible. PCA compresses data and has no model of where the data came from. Measurement error counts as variance to be captured, and the components depend on which items happen to be included.

      Factor analysis is a model: each observed item is caused by a small number of unobserved factors plus its own unique noise, $X_i = \alpha_i + \beta_i \xi + E_i$ as above. It explains only the shared variance (the correlations) and sets item-specific noise aside. This is the tool when the goal is to measure a construct, to test whether a scale has one dimension or several, or to estimate reliability.

      Rules of thumb. For an index to use as a control variable, or to cut the number of outcomes, PCA or a simple average of standardised items is fine; the two are typically very highly correlated. For claims about latent traits use factor analysis: exploratory to find the structure, confirmatory on fresh data to test it. Choose the number of factors by parallel analysis; the 'eigenvalue above 1' rule tends to keep too many. With many reliable items PCA and factor analysis give similar loadings. With few or noisy items they diverge, and PCA loadings are the inflated ones.

    3. we consider a measuring instrument consisting of a prespecified set of

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-47): 'Congeneric' is glossed with '[related?]'; it has a specific meaning. The bullet 'analysis of composite reliability' further down is likewise undefined, and the relation to Cronbach's alpha, the statistic most readers will have met, is absent.

      Suggestion: Claude explains: 'congeneric', and which reliability coefficient to report

      Congeneric means every item measures the same single latent variable $\xi$, while items may differ in how strongly they load on it ($\beta_i$), in their intercepts ($\alpha_i$) and in their error variances. It is the weakest of three nested measurement models:

      • Parallel: equal loadings and equal error variances.
      • Tau-equivalent: equal loadings; error variances free.
      • Congeneric: loadings and error variances both free.

      For the sum score $Z = X_1 + \dots + X_p$, with $\text{Var}(\xi) = 1$, reliability is

      $$\rho_Z = \frac{\left(\sum_i \beta_i\right)^2}{\left(\sum_i \beta_i\right)^2 + \sum_i \text{Var}(E_i)},$$

      usually called composite reliability or McDonald's $\omega$. Cronbach's $\alpha$ equals this only under tau-equivalence with uncorrelated errors. With unequal loadings $\alpha$ understates reliability, and with correlated errors (similarly worded items) it can overstate it.

      Example with three standardised items and loadings 0.9, 0.6, 0.3, hence error variances 0.19, 0.64, 0.91: $\omega = 1.8^2 / (1.8^2 + 1.74) = 0.65$, while $\alpha = 0.60$.

      This is the setting of the paper cited here: reliability of a sum score under the congeneric model, without assuming equal loadings.

    1. John List talks a lot about ‘randomizing across context’ maybe there’s an experimental econ literature on this too?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-44): The section quotes the paper's abstract and asks whether economics has an equivalent, without saying what the problem is.

      Suggestion: The point of Judd, Westfall and Kenny (2012) in economists' terms: if an experiment uses a handful of stimuli (three charity appeals, four vignettes, two price levels) to stand for a category such as 'emotional appeals', the stimuli are a second sample. Treating them as fixed gives standard errors for 'these particular appeals' only. Generalising to the category needs a stimulus-level variance component, and power is then capped by the number of stimuli however many participants there are (Westfall, Kenny and Judd 2014). It is the logic of clustering at the level at which treatment varies: three appeals per arm means, in effect, three clusters per arm. Yarkoni (2022, 'The generalizability crisis') makes the broader argument. In economics the nearest discussions I know concern external validity and site selection (Allcott 2015 on site selection bias; List 2020, 'Non est Disputandum de Generalizability?'); stimulus sampling as such is rarely modelled.

    2. conventional answers ask for 25; this only pertains to frequentist work, not Bayesian

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-43): Half right. Bayesian estimation avoids large-sample approximations, but with few groups the between-group variance is weakly identified whatever the method, and the Bayesian answer then depends on the prior for that variance. The follow-up question about simulation in frequentist models also has a definite answer (yes).

      Suggestion: Claude explains: few groups, frequentist and Bayesian

      With few higher-level units the hard quantity is the between-group variance $\sigma_v^2$, which is estimated from only $J$ group effects. Maximum likelihood then underestimates it, sometimes at exactly zero, and standard errors for group-level coefficients come out too small. REML with Kenward–Roger or Satterthwaite degrees of freedom repairs much of this, and a parametric bootstrap is available (lme4::bootMer, pbkrtest), so simulation-based frequentist inference is an option, as the question below suggests.

      Bayesian estimation does not rely on large-$J$ approximations and carries the uncertainty about $\sigma_v^2$ through to everything else. The small-$J$ problem moves into the prior: with 5 or 10 groups the data say little about $\sigma_v^2$, and the posterior depends visibly on the prior chosen for it. Gelman (2006) recommends weakly informative half-$t$ or half-Cauchy priors on the group-level standard deviation and warns against the once-standard inverse-gamma$(\epsilon, \epsilon)$ prior.

      So the 25-group rule of thumb concerns asymptotic approximations, which Bayesian estimation avoids. The scarcity of information about $\sigma_v^2$ remains, and with small $J$ the sensitivity of results to the variance prior should be reported.

    3. schools with few obs will have an estimated RE very close to the mean

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-42): Shrinkage (partial pooling), the main reason to use these models, appears only as a garbled half-sentence with no formula.

      Suggestion: Claude explains: partial pooling

      The multilevel estimate of a school's intercept is a compromise between the school's own mean and the overall mean:

      $$\hat\alpha_j = w_j\, \bar{y}j + (1 - w_j)\, \bar{y}, \qquad w_j = \frac{\sigma_v^2}{\sigma_v^2 + \sigma\epsilon^2 / n_j}.$$

      The weight on the school's own data rises with its number of students $n_j$ and with how much schools truly differ ($\sigma_v^2$). Take $\sigma_v^2 = 1$ and $\sigma_\epsilon^2 = 4$. A school with 2 students gets $w = 1/(1 + 2) = 0.33$, so its estimate is pulled two-thirds of the way to the overall mean. A school with 40 students gets $w = 1/(1 + 0.1) = 0.91$ and barely moves.

      'One regression per school' is the no-pooling extreme ($w_j = 1$): noisy for small schools, whose extreme means are mostly sampling error. A single pooled regression is the other extreme ($w_j = 0$). The model estimates $\sigma_v^2$ from the data and so chooses the degree of pooling. The shrunken estimates are biased toward the mean for any one school and have lower mean-squared error across schools taken together, the logic shared by James–Stein and empirical Bayes estimators, ridge penalties and random-effects meta-analysis.

    1. this holds whether or not we restrict the age, period, or cohort effects to being linear in a time variable

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-37): The '(I believe)' can be resolved, and doing so shows what is and is not identified, which the section does not say. It also qualifies the two devices described next (the cohort-characteristic model and the residual check). (An off-by-one in the quoted count of cohort effects and the undefined index $k$ are in the format entry.)

      Suggestion: Claude explains: what is and is not identified in APC models

      The belief is right, and the linear case is the whole of the problem. Since cohort = period − age, linear trends satisfy

      $$a \cdot \text{age} + p \cdot \text{period} + c \cdot \text{cohort} = (a - c) \cdot \text{age} + (p + c) \cdot \text{period}.$$

      Only $a - c$ and $p + c$ can be learned. Adding any $\delta$ to the age and cohort slopes and subtracting it from the period slope fits the data identically. 'Incomes rise with age' and 'each cohort earns less than the last while every year is better than the one before' cannot be told apart from the data alone.

      What is identified: all the curvature. Deviations of the age, period and cohort effects from straight lines (second differences, turning points, a one-off period shock) are estimable without extra assumptions. The apc package linked above is built on this (Kuang, Nielsen and Nielsen 2008).

      Consequences for the two devices described next. The cohort-characteristic (APCC) model breaks the collinearity by assuming cohort affects the outcome only through the chosen characteristic; the linear trends are then identified by that exclusion restriction and are as credible as it is. And residuals from an age–period model can reveal non-linear cohort patterns, but a linear cohort trend has already been absorbed into the age and period effects, so flat residuals do not show that cohorts are alike.

    2. Nickell bias and Arellano-Bond and related procedures

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-36): Named in a bullet and again as an empty sub-heading (misspelled 'Nickel'), and listed among the common mistakes in the regression chapter, but never explained.

      Suggestion: Claude explains: Nickell bias

      Model: $y_{it} = \rho\, y_{i,t-1} + \alpha_i + \epsilon_{it}$. The within transformation subtracts each unit's time average. The demeaned lag $y_{i,t-1} - \bar{y}i$ then contains every period's shock through $\bar{y}_i$, including $\epsilon{it}$, so it is correlated with the demeaned error. The bias does not shrink as $N$ grows; it shrinks with $T$. For $\rho > 0$ it is negative and roughly $-(1 + \rho)/(T - 1)$ (Nickell 1981): with $\rho = 0.5$ and $T = 10$ the within estimate centres near 0.34. Coefficients on other regressors are biased too when they are correlated with the lag.

      Remedies: Anderson–Hsiao and Arellano–Bond (1991) first-difference the equation and instrument $\Delta y_{i,t-1}$ with $y_{i,t-2}$ and earlier lags. These instruments are weak when $\rho$ is near 1. 'System GMM' (Blundell and Bond 1998) adds moment conditions at the price of a stationarity assumption on initial conditions. With many periods the instrument count grows quickly and overfits the endogenous variable, so cap or collapse the instruments and report their number (Roodman 2009). Results are sensitive to these choices; show several.

      A shortcut from Mostly Harmless Econometrics (section 5.3): if you are unsure whether selection into treatment is on a fixed unit effect or on the lagged outcome, the fixed-effects estimate and the lagged-dependent-variable estimate (without fixed effects) bracket the true effect.

    3. Does CiC suffer from the same issue?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-34): DR's question is unanswered, and BB's summary of changes-in-changes ('assumptions pretty similar to DiD', 'heterogeneous treatment effects in a better way') is looser than the method warrants.

      Suggestion: Yes. Changes-in-changes (Athey and Imbens 2006) replaces additive parallel trends with two other untestable conditions: each group's distribution of unobservables is stable over time, and the outcome is a monotone function of a scalar unobservable, with that function changing over time in the same way for both groups. What it buys: it does not depend on the scale of the outcome (parallel trends in levels and in logs cannot both hold, while CiC is invariant to monotone transformations), and it delivers the whole counterfactual distribution for the treated group, hence quantile effects on the treated. Two qualifications to the summary above. The assumptions are not nested with DiD's, so 'pretty similar' undersells the difference. And quantile effects describe changes in the distribution of outcomes; they equal effects on individuals only if treatment preserves ranks. Pre-period placebo versions of CiC exist, with the same accept-the-null weakness discussed in the diagnostics chapter. CiC also needs the treated group's outcomes to lie within the support of the control group's.

    4. Fixed effects and differencing

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-32): Empty section.

      Suggestion: Claude explains: fixed effects vs first differences

      Both remove any unit-specific factor that is constant over time. Neither removes unobservables that change over time and move with the treatment.

      • With two periods the two estimators are numerically identical.
      • With more periods they differ in efficiency. Fixed effects (the within estimator) is efficient when the idiosyncratic errors are serially uncorrelated; first differences is efficient when they follow a random walk. Real data usually sit in between, so use standard errors clustered by unit with either.
      • Both need strict exogeneity: the regressor in every period is unrelated to the error in every period. Feedback from past outcomes to current treatment (people enrol after a bad year) violates it, as does a lagged dependent variable (see Nickell bias below). The two estimators then have different biases, so a large gap between them is a warning sign (Wooldridge, Econometric Analysis of Cross Section and Panel Data, ch. 10).
      • Measurement error in the regressor is amplified by both transformations, more so by first differences when the true regressor is persistent, which pulls estimates toward zero (Griliches and Hausman 1986).
      • With heterogeneous effects, fixed effects weights units by their within-unit variance in treatment, the variance weighting described for OLS in the regression chapter. Units whose treatment never changes contribute nothing.
    1. which i think suggests that IV is not (generally) dealing with the problem of OVB that it claims to

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-26): The inference does not follow from Young's result. Also the citation key renders as '(ConsistencyInferenceInstrumental?)' in the built page because the bib entry is a saved Google search with no author, and the link is a Google Scholar redirect.

      Suggestion: Another reading of Young's finding: in his sample of published IV papers, 2SLS confidence intervals are wide enough that they usually contain the OLS point estimate, and tests of OLS against IV rarely reject once inference accounts for non-iid errors and high-leverage observations. That reflects how imprecise IV is: the data usually cannot tell whether there was omitted-variable bias to remove. Whether IV removes it is a separate question that these comparisons cannot settle. The practical message is closer to 'IV rarely improves on OLS in mean-squared-error terms unless the first stage is strong'. The paper is now published: Alwyn Young (2022), 'Consistency without Inference: Instrumental Variables in Practical Application', European Economic Review. Suggest replacing the bib entry with that reference and the redirect link with the journal page.

    1. Sensitivity analysis: Interactive presentation

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-24): Empty section.

      Suggestion: Claude explains: tools for showing sensitivity

      Specification curve / multiverse. List the defensible analysis choices (controls, sample restrictions, outcome definition, functional form), estimate every combination, and plot all estimates sorted by size above a panel showing which choices produced each one (Simonsohn, Simmons and Nelson 2020; Steegen et al. 2016). The reader sees whether the headline estimate is typical or an extreme draw, and which choice drives the variation. R: specr, multiverse.

      How strong would a confounder need to be? Oster (2019) uses the movement in the coefficient and in $R^2$ when observed controls are added to bound the bias from unobservables, and reports how strong selection on unobservables would have to be, relative to selection on observables, to drive the effect to zero. Cinelli and Hazlett (2020) report a 'robustness value': the share of residual variance in both treatment and outcome that a confounder must explain to overturn the result, benchmarked against observed covariates (R: sensemakr).

      Design-specific versions. For IV, Conley, Hansen and Rossi (2012) allow a small direct effect of the instrument on the outcome. For DiD, the Rambachan–Roth bounds described above. For attrition, Lee bounds.

      An interactive version of any of these (a Shiny app or a slider over the sensitivity parameter) lets readers apply their own beliefs about the assumption.

    2. Estimating standard errors

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-23): Empty section.

      Suggestion: Claude explains: choosing standard errors

      Heteroskedasticity-robust standard errors are the default for cross-sections. In small samples or with high-leverage observations use the HC2 or HC3 versions; HC1 (Stata's robust) can be too small.

      Clustered: Abadie, Athey, Imbens and Wooldridge (2023) frame the choice by design. Cluster at the level at which treatment was assigned (villages, classrooms, the individual in a panel), and when clusters were themselves sampled from a larger population of clusters. Correlated residuals within a group are not by themselves a reason to cluster on that group.

      Few clusters (roughly under 40, very unequal sizes, or few treated clusters): cluster-robust standard errors are biased downward and tests over-reject. Use the wild cluster bootstrap (Cameron, Gelbach and Miller 2008) or randomization inference.

      Serial correlation in panels and DiD: Bertrand, Duflo and Mullainathan (2004) found placebo laws 'significant' up to 45% of the time when state-year outcomes were treated as independent. Clustering by state repairs this.

      Size of the stakes, from the Moulton factor: with 50 observations per cluster and an intra-cluster correlation of 0.05, a regressor that varies only by cluster has true sampling variance $1 + (50 - 1)(0.05) = 3.45$ times the naive one, so naive standard errors are too small by a factor of 1.86.

    1. The names of the regions are lost; how do I know which is which?

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-19): The aside ends with unanswered questions about contr.sum (which coefficient is which, why the third is missing) and adopts a de-meaning workaround whose standard errors are wrong and which does not generalise.

      Suggestion: Claude explains: reading contr.sum output

      contr.sum with $k$ levels estimates $k - 1$ deviations and numbers them in the order of levels(region). After relevel(ref = "s") the levels are s, c, n, so region1 is South ($-30.7$) and region2 is Central ($-10.1$). The last level is always the one omitted, and its deviation is minus the sum of the others: North $= 30.7 + 10.1 = +40.8$. The intercept (90.3) is the unweighted mean of the three adjusted group means.

      To keep the names, label the contrast columns:

      contrasts(i_df$region) <- contr.sum(3); colnames(contrasts(i_df$region)) <- levels(i_df$region)[1:2]

      The 'subtract the mean, drop the intercept' regression works because with 0 + R gives the first factor a full set of dummies whatever contrast is set. Three caveats. Its coefficients are deviations from the pooled sample mean, which equals the mean of group means only when groups are the same size. Its standard errors treat the grand mean as known; the correct SE for 'group minus the average of $k$ equal-sized groups' is smaller by a factor $\sqrt{(k-1)/k}$, 18% here. And only the first factor gets the full set, so a second categorical variable falls back to the contrast setting: the 'multiple dimensions' problem noted below. To report every level's deviation with correct SEs, use emmeans::emmeans(model, ~ region) followed by contrast(., "eff").

    2. it is hard to disentangle a heterogeneous response to the treatment from

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-18): The claim is stated in one sentence without an example, and without the practical consequence (interactions are scale-dependent).

      Suggestion: Claude explains: an interaction that is only curvature

      Suppose giving depends on a latent willingness $w$ through a concave function, $y = 10\sqrt{w}$, and treatment adds 5 to $w$ for everyone. Men start at $w = 4$, women at $w = 25$. Treatment moves men from 20 to 30 (+10) and women from 50 to 54.8 (+4.8). A regression of $y$ on treatment, gender and their product reports a real interaction: the effect in dollars is twice as large for men. Yet treatment did the same thing to both groups on the scale where it acts.

      Both descriptions are correct, and which one counts as moderation depends on the scale. An interaction can appear, vanish or change sign under a monotone transformation of the outcome (levels vs logs, probabilities vs log-odds) unless the group lines actually cross; Loftus (1978) called these 'removable' interactions.

      In practice: state the scale on which the claim is made. If the claim is about dollar effects, the interaction in levels is the answer. If the claim is that gender changes responsiveness, check whether it survives flexible control for the baseline level, or compare the groups at similar baselines. Floors and ceilings (many zeros, a capped scale) produce the same pattern mechanically.

    3. Modeling heterogeneity: the limits of Quantile regression

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-17): A bullet promising 'the limits of quantile regression' with nothing under it.

      Suggestion: Claude explains: what quantile regression does and does not show

      A quantile treatment effect compares the same quantile of two distributions, for example the median outcome under treatment minus the median under control. It describes how the distribution shifts. It is the effect on 'the person at the median' only if treatment leaves everyone's rank unchanged, which is rarely defensible.

      Example: outcomes are uniform on 0–100. Treatment raises everyone in the bottom half by 50 and lowers everyone in the top half by 50. The two halves trade places, the treated distribution is identical to the control distribution, and every quantile effect is zero, while every individual effect is $\pm 50$. In the other direction, quantile effects that differ across quantiles show that some heterogeneity exists without saying who gains.

      Two further cautions. With covariates, standard (conditional) quantile regression describes quantiles within covariate cells: a coefficient at the 0.9 quantile concerns people who are high given their covariates, who need not be at the top of the overall distribution (Firpo, Fortin and Lemieux 2009 give the unconditional version). And with a mass at zero, as in donations, the lower quantiles are zero in both arms and carry no information.

    4. Confidence intervals and Bayesian credible intervals

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-16): Empty sub-heading, directly after a paragraph that asks readers to distinguish informative from uninformative nulls and quotes the TOST abstract without showing how the procedure works.

      Suggestion: Claude explains: making a null result informative

      Three results that all read 'not significant' ($p > 0.05$), for an effect in SD units where anything under 0.1 is too small to care about:

      | Estimate | 95% CI | Reading | |---|---|---| | 0.02 | [−0.04, 0.08] | informative null: effects of 0.1 or more are ruled out | | 0.02 | [−0.30, 0.34] | uninformative: large effects in either direction remain possible | | 0.15 | [−0.01, 0.31] | no evidence of absence: the data lean toward a meaningful effect |

      The equivalence test (TOST) formalises the first row. Choose the smallest effect size of interest $\Delta$ before seeing the data, then test $H_0: |\beta| \ge \Delta$ with two one-sided tests. At the 5% level this is the same as checking that the 90% confidence interval lies inside $(-\Delta, \Delta)$. With estimate 0.02 and SE 0.03 the 90% CI is $[-0.03, 0.07]$, inside $\pm 0.1$, so effects as large as 0.1 are rejected.

      A Bayesian 95% credible interval answers a different question: given the prior and the data, the parameter lies in the interval with probability 0.95. With a flat prior and a normal likelihood the two intervals coincide numerically, which is why the informal reading of a confidence interval usually does little damage. They diverge with informative priors, small samples, or parameters near a boundary.

    5. Quadratic regressions are not diagnostic regarding u-shapedness

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-15): One-line pointer to Simonsohn (2018) with no statement of why the quadratic test fails or what replaces it.

      Suggestion: Claude explains: why a significant squared term does not show a U

      A quadratic forces a symmetric parabola on the data, so it always has a turning point somewhere. Take $y = \log x$ for $x$ from 1 to 100. $y$ rises everywhere, yet a regression of $y$ on $x$ and $x^2$ gives a positive coefficient on $x$, a strongly significant negative coefficient on $x^2$, and a fitted peak at about $x = 83$, inside the data. The squared term is picking up concavity; the downturn is produced by the functional form.

      Simonsohn's (2018) 'two-lines' test asks the question directly. Fit one slope below a breakpoint and another above it, and call the relationship U-shaped only if the two slopes have opposite signs and each is individually significant. His 'Robin Hood' procedure chooses the breakpoint to give the test good power. An older alternative in economics, Lind and Mehlum (2010), tests the sign of the slope at both ends of the data range within the quadratic model, and so inherits the quadratic's dependence on functional form.

      Before either test, plot a flexible fit (binned means or a spline).

    6. Are the control variables you use endogenous? (E.g., because FDI may itself affect GDP per capita)

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-14): The heading equates 'bad control' with 'colliders' and the body with 'endogenous controls'. These overlap but are distinct mechanisms, and the Australia example in the fold above is an instance of one of them without being named as such. Also, the fold's claim that controlling for more does not help applies to post-treatment variables; controlling for pre-treatment common causes does reduce confounding.

      Suggestion: Claude explains: three kinds of bad control

      'Bad control' and 'collider' overlap but are different labels. Write $D$ for treatment, $Y$ for outcome and $C$ for the candidate control.

      1. Mediator ($D \to C \to Y$). Controlling for $C$ removes the part of the effect that runs through it. College raises wages partly through occupation; holding occupation fixed deletes that channel.
      2. Collider ($D \to C \leftarrow U \to Y$). $C$ is caused by treatment and by an unobserved factor $U$ that also drives $Y$. Within a level of $C$, $D$ and $U$ become correlated, so the comparison is confounded even if $D$ was randomized. This is the Mostly Harmless point that a post-treatment control undoes random assignment, and it is the mechanism in the Australia example above: among people without a degree, Australians are selected on whatever made them resist a strong push toward university.
      3. Pre-treatment collider ($U_1 \to C \leftarrow U_2$, with $U_1 \to D$ and $U_2 \to Y$). Rare, and a reminder that being measured before treatment does not by itself make a control safe.

      Most post-treatment variables are cases 1 and 2 at once. A control helps when it blocks a path from a common cause of $D$ and $Y$, or absorbs outcome variance without being affected by $D$. Cinelli, Forney and Pearl ('A Crash Course in Good and Bad Controls', 2022) work through the cases one diagram at a time.

    7. this one seems to be conservative in the sense that it implicitly assumes independent hypotheses in making the correction

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-12): Muddled: assuming independence does not make a procedure conservative. Benjamini–Hochberg is guaranteed to control FDR under independence or positive dependence; under arbitrary dependence it can be mildly anti-conservative, and the Benjamini–Yekutieli variant is the conservative fix. The procedure itself is never stated.

      Suggestion: Claude explains: Benjamini–Hochberg and dependence

      BH controls the false discovery rate, the expected share of rejections that are false. With $m$ tests and target $q$: sort the p-values, find the largest $k$ with $p_{(k)} \le \tfrac{k}{m}\, q$, and reject hypotheses $1, \dots, k$.

      Example with $m = 5$, $q = 0.05$ and p-values 0.001, 0.012, 0.03, 0.04, 0.20. The BH thresholds are 0.01, 0.02, 0.03, 0.04, 0.05, so the largest $k$ that passes is 4 and BH rejects four hypotheses. Holm rejects two (0.03 fails its threshold of 0.0167). Bonferroni rejects one (threshold 0.01).

      On dependence: BH is proven to hold FDR at $q$ when the tests are independent or positively dependent in a specific sense (Benjamini and Yekutieli 2001), which covers many practical cases such as positively correlated outcomes. Under arbitrary dependence the FDR can exceed $q$, by at most a factor $\sum_{i=1}^m 1/i$. The Benjamini–Yekutieli variant divides $q$ by that sum and is valid under any dependence, at a cost in power. Independence is thus a condition for BH's guarantee. Its conservatism has a different source: the FDR it actually achieves is $q$ times the share of nulls that are true.

    1. Nonparametric

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (A-04): 'Frequentist', 'Parametric' and 'Nonparametric' are empty headings. The most useful single thing to put here is what the standard rank tests test, since they are routinely misread as tests of means or medians.

      Suggestion: Claude explains: what the common rank tests test

      A two-sample $t$-test (Welch's version by default) tests equality of means. It is reliable in moderate samples even with non-normal data because of the central limit theorem, and struggles with very heavy tails or tiny samples.

      The Mann–Whitney (Wilcoxon rank-sum) test is often described as a test of medians. What it tests is whether a random draw from group A is as likely to be above as below a random draw from group B: $P(A > B) + \tfrac12 P(A = B) = \tfrac12$. Two distributions with the same mean and the same median can be rejected (different spread or skew), and two with different means can fail to be rejected. It is a test of means or medians only under the extra assumption that the distributions differ by a pure shift.

      Practical reading: if the estimand is an average (average donation, average treatment effect), use a mean-based test, with a permutation or bootstrap p-value when the sample is small or skewed. If the question is whether treatment tends to produce higher outcomes, a rank test fits. With many zeros, as in donation data, ranks carry no information about how large the big gifts are, so a rank test can miss a treatment that works through a few large donations.

    1. McElreath’s critique

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (K-09): Empty section; the critique is named and never stated.

      Suggestion: Claude explains: the argument (as I read it)

      This summarizes Chapter 1 of McElreath's Statistical Rethinking; please check it against what you meant to draw from the book.

      • Standard tests are 'golems': procedures that do exactly what they were built for and nothing else. Picking a test from a flowchart hides the model behind it.
      • Rejecting a null hypothesis is a weak form of falsification. Popper asked scientists to try to falsify their own substantive hypothesis; significance testing falsifies a null that nobody holds.
      • Hypotheses are not models. One verbal hypothesis is compatible with several process models, and different process models can imply the same statistical model, so rejecting or retaining a statistical model seldom settles the substantive question.
      • Measurement and observation error mean a single disconfirming result rarely falsifies anything.

      His proposal: write down more than one explicit generative model, including substantively motivated non-null ones, estimate them (he uses a Bayesian framework), and compare their predictions.

    2. Theory, restrictions, and ‘structural vs reduced form’

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (K-08): Empty section.

      Suggestion: Claude explains: 'structural' and 'reduced form'

      'Reduced form' has two meanings. In simultaneous-equations econometrics it is the system solved so that each endogenous variable depends only on exogenous variables and shocks. In current applied usage it means estimating the effect of some variation (a policy, an experiment, an instrument) with a research design and few assumptions about behavior.

      'Structural' estimation recovers parameters of an economic model (preferences, costs, beliefs) that are assumed to stay fixed when policy changes. That permits predictions for policies never observed, and welfare calculations. The price is reliance on functional-form and behavioral assumptions.

      Example: Karlan and List (2007) found that a 1:1 match raised revenue per solicitation by about 19%, and that 2:1 and 3:1 matches did no better. The first result is a credible reduced-form effect for that population. Predicting the response to a different match rate, or to a tax deduction of equal value, needs a model of why donors responded (price, a signal of quality, warm glow), and a simple price-elasticity model would have predicted the higher ratios wrongly.

      Intermediate approaches: 'sufficient statistics' (Chetty 2009), which express welfare effects through a few reduced-form elasticities, and experiments designed to estimate structural parameters (DellaVigna 2018).

    3. The fact that 95% of all (correct) CIs contain the true value does not mean that 95% of those that exclude zero do so correctly.

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (K-05): The tweet is quoted with no commentary; the arithmetic and the reason it happens are left to the reader.

      Suggestion: Claude explains: Senn's example

      The arithmetic: $0.10 \times 0.59 + 0.90 \times 0.99 = 0.059 + 0.891 = 0.95$. Overall coverage is 95%, yet among the intervals that exclude zero only 59% contain the true value.

      Coverage is a property of the procedure, averaged over all samples. It makes no promise about a subset of intervals picked out by a feature of the result. An extreme case: if every true effect is exactly zero, 95% of intervals include zero (all correct) and 5% exclude it (all wrong), so coverage among the 'significant' intervals is 0%. More generally, when true effects are small relative to the standard error, the intervals that exclude zero are disproportionately those where sampling error pushed the estimate away from zero.

      The same mechanism produces the 'winner's curse' and exaggeration (Type M) errors in significant results (Gelman and Carlin 2014), and it is one reason a literature filtered on significance overstates effect sizes (see Section \@ref(pubbias)).

    4. These ‘decision optimization’ cases are referred to as ‘reinforcement learning’ (I think).

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (K-02): 'Reinforcement learning' is too broad a label for this, and the '(I think)' can be resolved.

      Suggestion: Claude explains: what this setting is called

      Choosing an action to maximize expected payoff given data is the subject of statistical decision theory. When data arrive over time and each choice both earns a payoff and yields information, the problem is a multi-armed bandit (the explore/exploit trade-off). Bandits are the simplest case of reinforcement learning, which also covers settings where today's action changes tomorrow's situation. If the aim is only to pick the best option at the end of a test period, the usual terms are best-arm identification or ranking and selection.

      The design implication is the one in the text: sample size should be set by the expected loss from choosing a worse option, and a test can be 'underpowered' for significance while being the payoff-maximizing design. With 10 candidate titles and 1,000 impressions, 100 impressions each gives little chance of a significant pairwise difference, yet choosing the title with the highest observed click rate does better on average than choosing at random, and the expected shortfall relative to the true best shrinks as the sample grows.

      References: Manski (2004) on statistical treatment rules; Feit and Berman (2019), 'Test & Roll: Profit-Maximizing A/B Tests'; Kasy and Sautmann (2021) on adaptive assignment for policy choice.

    1. Tibshirani, Robert. n.d. “Statistical Learning with Sparsity the Lasso and Generalizations.”

      Claude: AI-drafted suggestion from a review of these notes (Nov 2026), posted from David's account. Not yet checked by David.

      Issue (I-04): Several entries in the key-resources list are incomplete or misattributed.

      Suggestion: Suggested full entries:

      • Hastie, Tibshirani and Wainwright (2015), Statistical Learning with Sparsity: The Lasso and Generalizations (currently credited to Tibshirani alone, 'n.d.')
      • Christensen, Freese and Miguel (2019), Transparent and Reproducible Social Science Research: How to Do Open Science
      • Gentzkow and Shapiro, 'Code and Data for the Social Sciences: A Practitioner's Guide' (2014; the list says 2013, please check which you meant)
      • James, Witten, Hastie and Tibshirani, An Introduction to Statistical Learning with Applications in R (2nd ed. 2021)
      • Wickham, Çetinkaya-Rundel and Grolemund, R for Data Science (2nd ed. 2023)
      • McElreath, Statistical Rethinking (2nd ed. 2020)
      • Cunningham (2021), Causal Inference: The Mixtape
      • Imbens (2020), 'Potential Outcome and Directed Acyclic Graph Approaches to Causality: Relevance for Empirical Practice in Economics', Journal of Economic Literature
      • Pearl (2009), Causality (2nd ed.)

      Candidates to add, given the book's focus: Gerber and Green (2012), Field Experiments; Huntington-Klein (2021), The Effect; Roth, Sant'Anna, Bilinski and Poe (2023), 'What's Trending in Difference-in-Differences?', Journal of Econometrics.