OSCA-source / OSCA.basic

Basics of the OSCA book
10 stars 11 forks source link

Marker Scoring by Pairwise Comparisons #17

Closed DarioS closed 2 months ago

DarioS commented 2 months ago

In Chapter 6,

We deliberately use pairwise comparisons rather than comparing each cluster to the average of all other cells.

How about fitting a model to all cell types at once and then using contrasts such as A - 1/3B + 1/3C + 1/3D?

LTLA commented 2 months ago

Yes, you could do so, and I'd guess that'll probably be similar to the average of the effect sizes from all pairwise comparisons (assuming the variances are not very different between groups).

We do it the current way because we can compute other summaries (e.g., mininum, median, max-rank) from the pairwise effect sizes, rather than being limited to the single effect size from the contrast above.

The pairwise comparison strategy is also less painful to implement than fitting a full-blown linear model to each row. The latter requires me to run QR on the design matrix, solve for the coefficients, get the residual effects to compute the variance, etc. The former just needs the group-wise means and variances and we're good to go.