Add Gaussian partner-dependence predictive checks - #18
Open
Pascal-Kueng wants to merge 37 commits into
Open
Conversation
use deep copy of model object to work with to avoid changing settings.
Pascal-Kueng
marked this pull request as ready for review
August 26, 2026 00:36
Pascal-Kueng
commented
Aug 26, 2026
Owner
Author
There was a problem hiding this comment.
This can probably be shortened. The basic idea is:
- apply criteria to simulation
- apply criteria to prediction
- plot
19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
simulate_dyad_responses()to generate plug-in response datasets from cross-sectional GaussianglmmTMBmodels.check_partner_dependence()to compare observed and simulated partner variation and association.Scope and interpretation
This PR supports unweighted cross-sectional Gaussian identity-link
glmmTMBmodels without zero inflation. The fitted parameters and fitted-row design remain fixed, while random effects and Gaussian errors are newly generated for each simulated dataset.This is a descriptive plug-in predictive reference. The model is not refitted, parameter uncertainty is not included, and observations are not held out. Observed positions and middle 95% ranges are descriptive guides, not p-values or calibrated confidence intervals.
The check is likely most useful when the model makes a simplifying assumption that could be wrong (for example, no remaining partner relationship or equal variation across roles). When the model freely estimates the same feature from these data, close agreement is expected (learned patterns are reproduced).
For exchangeable dyads, the deterministic summary follows Woody and Sadler's (2005) between-/within-dyad decomposition. The observed-versus-simulated comparison adapts the principle from Gelman, Meng, and Stern (1996). It is not a posterior predictive distribution.
Review focus
Conceptual questions about the diagnostic target and interpretation are collected in Discussion #21.
Validation