dyad_data.RData
dyad_data.RData
The dataset for the eight core tutorials. Generated by scripts/01_simulate_data.R.
Download dyad_data.RData{.btn .btn-primary download}
Contents
| Object | Format | Dimensions | Description |
|---|---|---|---|
ddl |
long | 200 rows × 10 columns | One row per person |
ddw |
wide | 100 rows × 10 columns | One row per dyad |
The two objects represent the same 100 dyads.
Variables
Person-level (in long format ddl)
| Variable | Type | Description |
|---|---|---|
dyad_id |
integer | Dyad identifier (1–100) |
person_id |
integer | Person within dyad (1 or 2) |
gender |
factor (male, female) |
Distinguishing variable |
wnc |
numeric | Work–nonwork conflict (centred) |
partner_wnc |
numeric | Partner’s WNC |
recovery |
numeric | Recovery from work (centred) |
partner_recovery |
numeric | Partner’s recovery |
satisfaction |
numeric | Relationship satisfaction |
has_children |
numeric (0/1) | Dyad-level covariate |
dual_earner |
numeric (0/1) | Dyad-level covariate |
Wide-format equivalents (in ddw)
| Variable | Meaning |
|---|---|
wnc_a, wnc_p |
WNC for the actor / partner |
recovery_a, recovery_p |
Recovery for the actor / partner |
satisfaction_a, satisfaction_p |
Satisfaction for the actor / partner |
has_children, dual_earner |
Same as in long format |
By convention, in ddw, _a corresponds to male and _p corresponds to female for the scripts that analyse distinguishable dyads.
Data-generating parameters
The simulation uses the following true values, set in the script’s header. Your estimates should be close to these.
Fixed effects
| Parameter | Value | Meaning |
|---|---|---|
a_wnc |
−0.30 | Actor WNC effect |
p_wnc |
−0.15 | Partner WNC effect |
a_rec |
+0.25 | Actor recovery effect |
p_rec |
+0.10 | Partner recovery effect |
c_child |
−0.10 | Children effect |
c_dual |
+0.20 | Dual-earner effect |
int_child_pwnc |
+0.10 | Children × partner WNC |
alpha_m |
5.00 | Male intercept |
alpha_f |
4.85 | Female intercept |
Variance components
| Parameter | Value | Meaning |
|---|---|---|
rho_wnc |
0.40 | Within-dyad WNC correlation |
rho_rec |
0.35 | Within-dyad recovery correlation |
rho_sat |
0.30 | Within-dyad satisfaction residual correlation |
Design choices
- Equal slopes across gender, different intercepts. This makes indistinguishability an empirical question, not a property of the data. The k-patterns page discusses why this matters.
- Within-dyad correlations induced by correlated residuals (
correlate_errors()in the script). The dyad members are correlated for both substantive and methodological reasons. - Children as a moderator. The
int_child_pwnc = 0.10parameter is the headline effect in the Hahn et al. (2014) replication tutorial. It represents the finding that children buffer the partner crossover effect.
Reproducibility
set.seed(2026) is set at the top of the simulation script. Re-running scripts/01_simulate_data.R will always produce the same RData file.
Loading
load("data/dyad_data.RData")
ls() # "ddl" "ddw"
head(ddl, 3)
head(ddw, 3)