Skip to content

feat(psychometric): name grand-mean pooled OLS slope and refuse as within - #334

Draft
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-grand-mean-pooled-slope
Draft

feat(psychometric): name grand-mean pooled OLS slope and refuse as within#334
seonghobae wants to merge 1 commit into
mainfrom
agent/psychometric-grand-mean-pooled-slope

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Slice

Named grand-mean pooled OLS slope in psychometric_core::cluster_mean on current main 6444a81. Independent of #327 / #332 (does not touch event_time.rs). Not another Driver p.16 std restoration. Not a second invariance crate. Not DSEM.

Estimand

Enders and Tofighi (2007, p. 125; PDF opened 2026-08-31T00:20Z from OSF mt5z3) quote Raudenbush and Bryk (2002, pp. 137–139):

  • the total OLS slope on clustered data is a weighted combination of the within-cluster and between-cluster slopes;
  • that total slope “is generally an uninterpretable blend of” (\hat\beta_w) and (\hat\beta_b);
  • the hierarchical estimator under grand-mean centering is an inappropriate estimator of the person-level (Level 1) effect; it too is neither (\beta_w) nor (\beta_b).

Raudenbush and Bryk (2002) remains unread; the quotation is from the opened Enders PDF.

This crate reports the OLS analogue:

  • recover_grand_mean_pooled_slope — ordinary least squares of outcome on predictor, ignoring cluster_key. Grand-mean centering the coordinates does not change an OLS slope, so this is also the OLS analogue of a CGM Level-1 slope that does not include cluster means.
  • It is not CWC (\gamma_{10}), not the between-cluster slope, not the CWC contextual effect, and not their multilevel maximum-likelihood CGM (\gamma_{10}).
  • refuse_grand_mean_pooled_slope_as_within_cluster_effect always fails closed.

Noiseless two-cluster fixture: within (= 0.5), between (= 2.0), contextual (= 1.5), pooled (= 1.7) (strictly between within and between). Empty, singleton, one-cluster, non-finite, singular, and overflowing designs fail closed.

Local verify

  • cargo test -p psychometric_core --offline — lib + integration green (cluster_mean 7, scientific-claim 52, multilevel recovery includes the named pooled helper).
  • cargo clippy -p psychometric_core --offline --all-targets -- -D warnings clean.
  • RUSTDOCFLAGS='-D warnings' cargo doc -p psychometric_core --offline --no-deps clean.

Do not self-approve. Independent non-author APPROVE is required. Do not merge without that APPROVE and exact-head required-check success.

…thin

Enders and Tofighi (2007, p. 125; PDF opened 2026-08-31T00:20Z from OSF
mt5z3) quote Raudenbush and Bryk (2002, pp. 137-139): the total OLS slope
that ignores nesting is generally an uninterpretable blend of the
within-cluster and between-cluster slopes. recover_grand_mean_pooled_slope
is that OLS analogue. It is not CWC gamma10, not between, not contextual,
and not their multilevel CGM gamma10. The refuse helper always fails closed
as a within-cluster effect. Independent of #327/#332. Not a Driver std
restoration and not a second invariance crate.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

Author COMMENT on 05637f7, not approval.

Named grand-mean pooled OLS slope (recover_grand_mean_pooled_slope) plus refuse_grand_mean_pooled_slope_as_within_cluster_effect on current main. Enders and Tofighi (2007, p. 125; PDF opened 2026-08-31T00:20Z from OSF mt5z3) quote Raudenbush and Bryk (2002, pp. 137–139): the total OLS slope that ignores nesting is generally an uninterpretable blend of (\hat\beta_w) and (\hat\beta_b). Raudenbush and Bryk (2002) remains unread; the quotation is from the opened Enders PDF.

Local: cargo test -p psychometric_core --offline green; clippy -D warnings clean; rustdoc -D warnings clean. Independent of #327/#332. Not a Driver std restoration. Not a second invariance crate.

Independent non-author APPROVE is still required. Do not self-approve. Do not merge without that APPROVE and exact-head required-check success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant