statistics:regression
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| statistics:regression [2026/08/19 18:28] – Generic-review fixes: new section on what to cluster on in a single-wave crawl (the biggest gap), attrition in unbalanced panels, compute your own variance/mean; de-duplicated the dependence table; reconciled table row sums; softened 'half the time', GEE karel.kubicek.claude | statistics:regression [2026/08/21 14:50] (current) – Boxes: <wrap> renders a span, use uppercase <WRAP>; one box per list, not per bullet karel.kubicek.claude | ||
|---|---|---|---|
| Line 45: | Line 45: | ||
| The corpus separates them, and the split is stark. **155 papers name a regression model in '' | The corpus separates them, and the split is stark. **155 papers name a regression model in '' | ||
| - | <wrap todo> | + | <WRAP todo> |
| **Say which one you are doing, in the sentence that introduces the model.** "We fit a logistic regression of //banner present// on //rank, category and country// to estimate the association between …" and "we train a logistic-regression classifier as a baseline against our detector" | **Say which one you are doing, in the sentence that introduces the model.** "We fit a logistic regression of //banner present// on //rank, category and country// to estimate the association between …" and "we train a logistic-regression classifier as a baseline against our detector" | ||
| - | </wrap> | + | </WRAP> |
| The rest of this page is about the first activity. Classifier evaluation belongs with [[Design: | The rest of this page is about the first activity. Classifier evaluation belongs with [[Design: | ||
| Line 294: | Line 294: | ||
| * Vu et al. {[vu2025_assessing]} (USENIX Sec 2025) combine the count model with a design: //"we modelled the weekly attack counts … using negative binomial regression - a well-established statistical technique for interrupted time series analysis"// | * Vu et al. {[vu2025_assessing]} (USENIX Sec 2025) combine the count model with a design: //"we modelled the weekly attack counts … using negative binomial regression - a well-established statistical technique for interrupted time series analysis"// | ||
| - | <wrap todo> | + | <WRAP todo> |
| **If your count is "how many //X// out of an opportunity that varies", | **If your count is "how many //X// out of an opportunity that varies", | ||
| - | </wrap> | + | </WRAP> |
| ==== Binary per-site outcomes ==== | ==== Binary per-site outcomes ==== | ||
| Line 310: | Line 310: | ||
| **Your sample size is the number of //events//, not the number of sites.** A crawl of 100,000 sites where 400 show the behaviour you are modelling gives a logistic regression 400 events, and the usual guidance is on the order of ten events per predictor — relaxable, but knowingly {[vittinghoff2007_relaxing]}. This is the failure mode of the rare-phenomenon paper: an enormous //n// and an unstable model. | **Your sample size is the number of //events//, not the number of sites.** A crawl of 100,000 sites where 400 show the behaviour you are modelling gives a logistic regression 400 events, and the usual guidance is on the order of ten events per predictor — relaxable, but knowingly {[vittinghoff2007_relaxing]}. This is the failure mode of the rare-phenomenon paper: an enormous //n// and an unstable model. | ||
| - | <wrap todo> | + | <WRAP todo> |
| **A pseudo-R² of 0.07 is not a broken model, and saying so is not a weakness.** Kieserman et al. {[kieserman2025_tracker]} fit logistic regressions on 40,150 websites to explain which ones configure Google and Meta trackers to harvest form data, and write: //"It is important to acknowledge that our models are a relatively weak fit; the former has a pseudo R-squared of 0.0721"// | **A pseudo-R² of 0.07 is not a broken model, and saying so is not a weakness.** Kieserman et al. {[kieserman2025_tracker]} fit logistic regressions on 40,150 websites to explain which ones configure Google and Meta trackers to harvest form data, and write: //"It is important to acknowledge that our models are a relatively weak fit; the former has a pseudo R-squared of 0.0721"// | ||
| - | </wrap> | + | </WRAP> |
| ==== Proportions, | ==== Proportions, | ||
| Line 408: | Line 408: | ||
| ==== What to cluster on when there is only one crawl ==== | ==== What to cluster on when there is only one crawl ==== | ||
| - | The panel case has an obvious clustering unit: the site. A **single-wave** crawl does not, and it is the commonest design in this corpus — which makes "what do I cluster on?" the question this page is most likely to be asked and the one the literature gives least help with. **No paper in the corpus answers it**: the one crawl paper whose method string names a clustering unit clusters | + | The panel case has an obvious clustering unit: the site. A **single-wave** crawl does not, and it is the commonest design in this corpus — which makes "what do I cluster on?" the question this page is most likely to be asked and the one the literature gives least help with. **No paper in the corpus answers it.** The two crawl papers that cluster at all cluster |
| What you have to choose between, in rough order of how much dependence each induces and how easily you can observe it: | What you have to choose between, in rough order of how much dependence each induces and how easily you can observe it: | ||
| Line 429: | Line 429: | ||
| ^ Remedy ^ What it estimates ^ When it is the right one ^ Cost ^ | ^ Remedy ^ What it estimates ^ When it is the right one ^ Cost ^ | ||
| - | | **Cluster-robust standard errors**, clustered on the site | the same coefficients; | + | | **Cluster-robust standard errors**, clustered on the site | the same coefficients; |
| | **Random intercept for the site** (mixed model / GLMM) | a **site-specific** effect: how the outcome changes for a given site | you want to describe between-site variance itself, or you have few observations per site and want to borrow strength | for a logistic model the coefficient is no longer the population-average one, and is not comparable with a cluster-robust fit {[mood2010_logistic]} | | | **Random intercept for the site** (mixed model / GLMM) | a **site-specific** effect: how the outcome changes for a given site | you want to describe between-site variance itself, or you have few observations per site and want to borrow strength | for a logistic model the coefficient is no longer the population-average one, and is not comparable with a cluster-robust fit {[mood2010_logistic]} | | ||
| | **Fixed effects for the site** (a dummy per site) | a purely **within-site** effect | before/ | | **Fixed effects for the site** (a dummy per site) | a purely **within-site** effect | before/ | ||
| | **GEE with an exchangeable working correlation** | a population-average effect, like cluster-robust | you want the marginal effect and are willing to model the correlation structure | 2 papers in this corpus use one, so expect to have to explain it | | | **GEE with an exchangeable working correlation** | a population-average effect, like cluster-robust | you want the marginal effect and are willing to model the correlation structure | 2 papers in this corpus use one, so expect to have to explain it | | ||
| - | For a crawl the honest default is **cluster-robust standard errors clustered on the site**, because it is one argument, it does not change the estimand, and thousands of clusters is exactly the regime where it works. Say //which// correction you used: '' | + | For a crawl the honest default is **cluster-robust standard errors clustered on the site**, because it is one argument, it does not change the estimand, and thousands of clusters is exactly the regime where it works. Say //which// correction you used: '' |
| ==== What a good one looks like ==== | ==== What a good one looks like ==== | ||
| Line 618: | Line 618: | ||
| ===== Open Questions ===== | ===== Open Questions ===== | ||
| + | <WRAP todo> | ||
| * **Nobody has estimated the intra-class correlation of a web-measurement outcome.** The simulation on this page shows the entire size of the error depends on it, and no paper in this corpus reports one. "What is the ICC of //sets a third-party cookie before consent// by consent platform, by CMS, by hosting provider, and by the same site across monthly crawls?" | * **Nobody has estimated the intra-class correlation of a web-measurement outcome.** The simulation on this page shows the entire size of the error depends on it, and no paper in this corpus reports one. "What is the ICC of //sets a third-party cookie before consent// by consent platform, by CMS, by hosting provider, and by the same site across monthly crawls?" | ||
| * **No crawl paper models the site as a random effect.** One non-crawl field study does {[zeng2022_factors]}, | * **No crawl paper models the site as a random effect.** One non-crawl field study does {[zeng2022_factors]}, | ||
| Line 624: | Line 625: | ||
| * **The 2022-onward arrival of causal designs is ten papers.** Whether it is a durable turn or a handful of authors with economics training is not decidable yet, and the 2025–2026 evidence for it sits in the provisional years. | * **The 2022-onward arrival of causal designs is ten papers.** Whether it is a durable turn or a handful of authors with economics training is not decidable yet, and the 2025–2026 evidence for it sits in the provisional years. | ||
| * **None of the seven venues asks for any of this.** As on [[Statistics: | * **None of the seven venues asks for any of this.** As on [[Statistics: | ||
| + | </ | ||
| ===== Related Pages ===== | ===== Related Pages ===== | ||
statistics/regression.1787164131.txt.gz · Last modified: by karel.kubicek.claude
