-
Notifications
You must be signed in to change notification settings - Fork 0
/
3_fertility_as_prereg.html
7728 lines (7342 loc) · 386 KB
/
3_fertility_as_prereg.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<title>3_fertility_as_prereg.utf8.md</title>
<script src="site_libs/jquery-1.12.4/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<script src="site_libs/htmlwidgets-1.2/htmlwidgets.js"></script>
<link href="site_libs/datatables-css-0.0.0/datatables-crosstalk.css" rel="stylesheet" />
<script src="site_libs/datatables-binding-0.4/datatables.js"></script>
<link href="site_libs/dt-core-1.10.16/css/jquery.dataTables.min.css" rel="stylesheet" />
<link href="site_libs/dt-core-1.10.16/css/jquery.dataTables.extra.css" rel="stylesheet" />
<script src="site_libs/dt-core-1.10.16/js/jquery.dataTables.min.js"></script>
<script src="site_libs/jszip-1.10.16/jszip.min.js"></script>
<script src="site_libs/pdfmake-1.10.16/pdfmake.min.js"></script>
<script src="site_libs/pdfmake-1.10.16/vfs_fonts.js"></script>
<link href="site_libs/dt-ext-buttons-1.10.16/css/buttons.dataTables.min.css" rel="stylesheet" />
<script src="site_libs/dt-ext-buttons-1.10.16/js/dataTables.buttons.min.js"></script>
<script src="site_libs/dt-ext-buttons-1.10.16/js/buttons.flash.min.js"></script>
<script src="site_libs/dt-ext-buttons-1.10.16/js/buttons.html5.min.js"></script>
<script src="site_libs/dt-ext-buttons-1.10.16/js/buttons.colVis.min.js"></script>
<script src="site_libs/dt-ext-buttons-1.10.16/js/buttons.print.min.js"></script>
<link href="site_libs/nouislider-7.0.10/jquery.nouislider.min.css" rel="stylesheet" />
<script src="site_libs/nouislider-7.0.10/jquery.nouislider.min.js"></script>
<link href="site_libs/selectize-0.12.0/selectize.bootstrap3.css" rel="stylesheet" />
<script src="site_libs/selectize-0.12.0/selectize.min.js"></script>
<link href="site_libs/crosstalk-1.0.0/css/crosstalk.css" rel="stylesheet" />
<script src="site_libs/crosstalk-1.0.0/js/crosstalk.min.js"></script>
<script src="library/auto_tab_first_section.js"></script>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
</head>
<body>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
height: auto;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
</style>
<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>
<div class="container-fluid main-container">
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
</script>
<!-- code folding -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Fertility diary</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="1_power_analysis.html">Power analysis</a>
</li>
<li>
<a href="1_researcher_df_analysis.html">Researcher degree of freedom simulation</a>
</li>
<li>
<a href="1_wrangle_data.html">Data wrangling</a>
</li>
<li>
<a href="2_descriptives.html">Descriptives</a>
</li>
<li>
<a href="3_fertility_as_prereg.html">Preregistered analyses</a>
</li>
<li>
<a href="3_fertility_robustness.html">Robustness tests</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<div class="fluid-row" id="header">
</div>
<div id="preregistered-ovulatory-shift-analyses" class="section level1 tab-content">
<h1>Preregistered ovulatory shift analyses</h1>
<p><span style="background:red;width:20px;height:20px;display:inline-block;"></span> Cycling women (not on hormonal birth control)</p>
<p><span style="background:black;width:20px;height:20px;display:inline-block;"></span> Women on hormonal birth control</p>
<p>Analyses as preregistered on the <a href="https://osf.io/5r3yp/">Open Science Framework</a> on March 19, 2014.</p>
<div id="load-data" class="section level2">
<h2>Load data</h2>
<pre class="r"><code>library(knitr)
opts_chunk$set(cache = F, warning = T, message = F, error = T)
source("0_helpers.R")
load("full_data.rdata")
diary$included = diary$included_lax
diary = diary %>%
mutate(
cohabitation = factor(cohabitation),
partner_st_vs_lt = partner_attractiveness_shortterm - partner_attractiveness_longterm
)
diary$fertile = diary$fertile_narrow
opts_chunk$set(warning = T, fig.height = 7, fig.width = 7)
diary2 = diary %>% mutate(fertile = fertile_broad)</code></pre>
<pre class="r"><code>broad_models = models = list()
do_model = function(model, diary) {
outcome = names(model@frame)[1]
model = calculate_effects(model)
options = list(fig.path = paste0(knitr::opts_chunk$get("fig.path"), outcome, "-"),
cache.path = paste0(knitr::opts_chunk$get("cache.path"), outcome, "-"))
asis_knit_child("_pre_reg_model.Rmd", options = options)
}
do_moderators = function(model, diary) {
asis_knit_child("_pre_reg_moderators.Rmd")
}</code></pre>
</div>
<div id="preregistered-hypotheses" class="section level2">
<h2>Preregistered hypotheses</h2>
<p>The following hypotheses were registered on the Open Science Framework on the day that data collection began. We have reworded and reorganised them slightly for space and clarity.</p>
<ol style="list-style-type: decimal">
<li>Ovulatory cycle shifts (increases during fertile window among naturally cycling women in a heterosexual relationship, but not for hormonal contraception users) in</li>
<li>female extra-pair desire and behaviour</li>
<li>female in-pair sexual desire</li>
<li>having and initiating in-pair sexual intercourse (if circumstances allowed, e.g. partner was close by)</li>
<li>subjective feelings of attractiveness</li>
<li>choice of clothing (on the dimensions “sexy”, “figure-hugging”, “seductive”)</li>
<li>reported male partner mate retention strategies</li>
<li>narcissism on both dimensions of the NARC (admiration and rivalry)</li>
<li>Moderation or <em>shift</em> hypotheses: The ovulatory increase in women’s extra-pair desires and reported male mate retention behaviour is strongest (and the in-pair desire increase is weakest) for women who perceive their partners</li>
<li>as low in sexual and physical attractiveness</li>
<li>as low in sexual attractiveness relative to long-term partner attractiveness</li>
<li>as less attractive in relation to themselves</li>
<li>Predicted ovulatory shifts are larger than, and independent of, potential ovulatory shifts in self-esteem</li>
</ol>
</div>
<div id="extra_pair" class="section level2 tab-content">
<h2><em>H1.1.</em> Extra-pair</h2>
<pre class="r"><code>models$extra_pair = lmer(extra_pair ~ included * fertile + ( 1 | person), data = diary)
do_model(models$extra_pair, diary)</code></pre>
<div id="narrow-window" class="section level3">
<h3>Narrow window</h3>
<pre class="r"><code>model %>%
print_summary() %>%
plot_all_effects()</code></pre>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: extra_pair ~ included * fertile + (1 | person)
Data: diary
REML criterion at convergence: 11341
Scaled residuals:
Min 1Q Median 3Q Max
-4.573 -0.546 -0.145 0.413 7.678
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.305 0.553
Residual 0.282 0.531
Number of obs: 6378, groups: person, 493
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.7541 0.0497 537.2116 35.32 < 2e-16 ***
includedhorm_contra -0.0524 0.0588 539.7185 -0.89 0.37
fertile 0.2650 0.0594 5934.3721 4.46 0.0000084 ***
includedhorm_contra:fertile -0.2972 0.0712 5937.8105 -4.18 0.0000301 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) incld_ fertil
inclddhrm_c -0.844
fertile -0.225 0.190
inclddhrm_: 0.188 -0.228 -0.835
</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-36-1.png" width="672" /></p>
<div id="diagnostics" class="section level4 accordion">
<h4>Diagnostics</h4>
<pre class="r"><code>model %>%
plot_outcome(diary) %>%
print_diagnostics()</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-37-1.png" width="672" /></p>
<pre><code>## Error in qqnorm.default(resid(obj)): y is empty or has only NAs</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-37-2.png" width="672" /></p>
</div>
<div id="adjusting-for-self-esteem" class="section level4">
<h4>Adjusting for self esteem</h4>
<pre class="r"><code>model %>%
adjust_for_self_esteem(diary)</code></pre>
<pre><code>##
##
## ```
## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: form
## Data: diary
##
## REML criterion at convergence: 11307
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.453 -0.543 -0.142 0.412 7.517
##
## Random effects:
## Groups Name Variance Std.Dev.
## person (Intercept) 0.305 0.552
## Residual 0.280 0.529
## Number of obs: 6378, groups: person, 493
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 1.5412 0.0596 1046.1239 25.85 < 2e-16 ***
## includedhorm_contra -0.0480 0.0588 539.6460 -0.82 0.41
## fertile 0.2636 0.0592 5933.2999 4.45 0.00000875608 ***
## self_esteem_1 0.0496 0.0077 6335.3270 6.44 0.00000000013 ***
## includedhorm_contra:fertile -0.2996 0.0709 5936.7040 -4.22 0.00002449245 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) incld_ fertil slf__1
## inclddhrm_c -0.709
## fertile -0.185 0.190
## self_estm_1 -0.555 0.012 -0.004
## inclddhrm_: 0.159 -0.227 -0.835 -0.005
##
## ```</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-38-1.png" width="672" /></p>
</div>
</div>
<div id="broad-window" class="section level3">
<h3>Broad window</h3>
<pre class="r"><code>outcome = names(model@frame)[1]
broad_models[[outcome]] <<- model %>%
switch_window_to_broad(diary)</code></pre>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: form
Data: diary2
REML criterion at convergence: 13739
Scaled residuals:
Min 1Q Median 3Q Max
-4.014 -0.541 -0.145 0.408 7.874
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.302 0.550
Residual 0.289 0.537
Number of obs: 7740, groups: person, 493
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.7601 0.0496 555.2525 35.50 < 2e-16 ***
includedhorm_contra -0.0590 0.0587 557.9895 -1.00 0.31591
fertile 0.2221 0.0603 7311.0047 3.68 0.00023 ***
includedhorm_contra:fertile -0.2279 0.0721 7315.9296 -3.16 0.00157 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) incld_ fertil
inclddhrm_c -0.844
fertile -0.255 0.215
inclddhrm_: 0.213 -0.258 -0.837
</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-39-1.png" width="672" /></p>
<div id="diagnostics-1" class="section level4 accordion">
<h4>Diagnostics</h4>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-39-2.png" width="672" /></p>
<pre><code>## Warning: 'sjp.lmer' is deprecated.
## Use 'plot_model' instead.
## See help("Deprecated")</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-39-3.png" width="672" /></p>
<pre><code>## Warning: 'sjp.lmer' is deprecated.
## Use 'plot_model' instead.
## See help("Deprecated")</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-39-4.png" width="672" /><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-39-5.png" width="672" /></p>
</div>
<div id="adjusting-for-self-esteem-1" class="section level4">
<h4>Adjusting for self esteem</h4>
<pre class="r"><code>broad_models[[outcome]] %>%
adjust_for_self_esteem(diary2)</code></pre>
<pre><code>##
##
## ```
## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: form
## Data: diary
##
## REML criterion at convergence: 13690
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.916 -0.544 -0.147 0.412 7.705
##
## Random effects:
## Groups Name Variance Std.Dev.
## person (Intercept) 0.302 0.549
## Residual 0.286 0.535
## Number of obs: 7740, groups: person, 493
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 1.53263 0.05801 996.45051 26.42 < 2e-16 ***
## includedhorm_contra -0.05434 0.05867 557.82744 -0.93 0.35477
## fertile 0.21778 0.06010 7309.97189 3.62 0.00029 ***
## self_esteem_1 0.05297 0.00704 7696.26429 7.53 5.7e-14 ***
## includedhorm_contra:fertile -0.22915 0.07180 7314.72895 -3.19 0.00142 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) incld_ fertil slf__1
## inclddhrm_c -0.726
## fertile -0.212 0.215
## self_estm_1 -0.521 0.010 -0.010
## inclddhrm_: 0.183 -0.257 -0.837 -0.002
##
## ```</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/extra_pair-unnamed-chunk-40-1.png" width="672" /></p>
<pre class="r"><code>bla = 2</code></pre>
<pre class="r"><code>do_moderators(models$extra_pair, diary)</code></pre>
</div>
</div>
<div id="moderators" class="section level3 tab-content">
<h3>Moderators</h3>
<div id="h2_1-partners-physical-attractiveness" class="section level4">
<h4><em>H2_1</em> Partner’s physical attractiveness</h4>
<p>Predicted fertile phase effect sizes (in red): biggest (EP desire, partner mate retention)/smallest (IP desire) when partner’s physical attractiveness is low.</p>
<pre class="r"><code>model %>%
test_moderator("partner_attractiveness_physical", diary)</code></pre>
<table>
<caption>Data: diary</caption>
<colgroup>
<col width="18%" />
<col width="5%" />
<col width="9%" />
<col width="9%" />
<col width="10%" />
<col width="12%" />
<col width="9%" />
<col width="10%" />
<col width="14%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">Df</th>
<th align="center">AIC</th>
<th align="center">BIC</th>
<th align="center">logLik</th>
<th align="center">deviance</th>
<th align="center">Chisq</th>
<th align="center">Chi Df</th>
<th align="center">Pr(>Chisq)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>with_main</strong></td>
<td align="center">8</td>
<td align="center">11330</td>
<td align="center">11385</td>
<td align="center">-5657</td>
<td align="center">11314</td>
<td align="center">NA</td>
<td align="center">NA</td>
<td align="center">NA</td>
</tr>
<tr class="even">
<td align="center"><strong>with_mod</strong></td>
<td align="center">10</td>
<td align="center">11332</td>
<td align="center">11399</td>
<td align="center">-5656</td>
<td align="center">11312</td>
<td align="center">2.756</td>
<td align="center">2</td>
<td align="center">0.2521</td>
</tr>
</tbody>
</table>
<p><img src="3_fertility_as_prereg_files/figure-html/unnamed-chunk-41-1.png" width="672" /></p>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: extra_pair ~ (1 | person) + partner_attractiveness_physical +
included + fertile + partner_attractiveness_physical:included +
partner_attractiveness_physical:fertile + included:fertile +
partner_attractiveness_physical:included:fertile
Data: diary
REML criterion at convergence: 11351
Scaled residuals:
Min 1Q Median 3Q Max
-4.514 -0.543 -0.142 0.412 7.674
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.301 0.549
Residual 0.282 0.531
Number of obs: 6378, groups: person, 493
Fixed effects:
Estimate Std. Error df t value
(Intercept) 2.218603 0.262724 531.771799 8.44
partner_attractiveness_physical -0.057670 0.032051 532.726625 -1.80
includedhorm_contra -0.240812 0.312893 535.501361 -0.77
fertile 0.549603 0.311898 5925.089869 1.76
partner_attractiveness_physical:includedhorm_contra 0.023959 0.037989 536.608359 0.63
partner_attractiveness_physical:fertile -0.035256 0.038004 5928.135305 -0.93
includedhorm_contra:fertile -0.290330 0.379106 5933.097116 -0.77
partner_attractiveness_physical:includedhorm_contra:fertile -0.000411 0.046007 5935.193922 -0.01
Pr(>|t|)
(Intercept) 2.9e-16 ***
partner_attractiveness_physical 0.073 .
includedhorm_contra 0.442
fertile 0.078 .
partner_attractiveness_physical:includedhorm_contra 0.529
partner_attractiveness_physical:fertile 0.354
includedhorm_contra:fertile 0.444
partner_attractiveness_physical:includedhorm_contra:fertile 0.993
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) prtn__ incld_ fertil pr__:_ prt__: incl_:
prtnr_ttrc_ -0.982
inclddhrm_c -0.840 0.825
fertile -0.220 0.217 0.185
prtnr_tt_:_ 0.829 -0.844 -0.982 -0.183
prtnr_ttr_: 0.217 -0.222 -0.182 -0.982 0.187
inclddhrm_: 0.181 -0.178 -0.224 -0.823 0.221 0.808
prtnr_t_:_: -0.179 0.183 0.221 0.811 -0.225 -0.826 -0.982
</code></pre>
</div>
<div id="h2_1-partners-short-term-attractiveness" class="section level4">
<h4><em>H2_1</em> Partner’s short-term attractiveness</h4>
<p>Predicted fertile phase effect sizes (in red): biggest (EP desire, partner mate retention)/smallest (IP desire) when partner’s short-term attractiveness is low.</p>
<pre class="r"><code>model %>%
test_moderator("partner_attractiveness_shortterm", diary)</code></pre>
<table>
<caption>Data: diary</caption>
<colgroup>
<col width="18%" />
<col width="5%" />
<col width="9%" />
<col width="9%" />
<col width="10%" />
<col width="12%" />
<col width="9%" />
<col width="10%" />
<col width="14%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">Df</th>
<th align="center">AIC</th>
<th align="center">BIC</th>
<th align="center">logLik</th>
<th align="center">deviance</th>
<th align="center">Chisq</th>
<th align="center">Chi Df</th>
<th align="center">Pr(>Chisq)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>with_main</strong></td>
<td align="center">8</td>
<td align="center">11335</td>
<td align="center">11389</td>
<td align="center">-5659</td>
<td align="center">11319</td>
<td align="center">NA</td>
<td align="center">NA</td>
<td align="center">NA</td>
</tr>
<tr class="even">
<td align="center"><strong>with_mod</strong></td>
<td align="center">10</td>
<td align="center">11338</td>
<td align="center">11405</td>
<td align="center">-5659</td>
<td align="center">11318</td>
<td align="center">1.183</td>
<td align="center">2</td>
<td align="center">0.5536</td>
</tr>
</tbody>
</table>
<p><img src="3_fertility_as_prereg_files/figure-html/unnamed-chunk-42-1.png" width="672" /></p>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: extra_pair ~ (1 | person) + partner_attractiveness_shortterm +
included + fertile + partner_attractiveness_shortterm:included +
partner_attractiveness_shortterm:fertile + included:fertile +
partner_attractiveness_shortterm:included:fertile
Data: diary
REML criterion at convergence: 11353
Scaled residuals:
Min 1Q Median 3Q Max
-4.511 -0.545 -0.141 0.412 7.683
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.304 0.551
Residual 0.282 0.531
Number of obs: 6378, groups: person, 493
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.7553 0.0497 535.6669 35.35 < 2e-16
partner_attractiveness_shortterm 0.0181 0.0509 545.1232 0.35 0.72
includedhorm_contra -0.0458 0.0590 537.6109 -0.78 0.44
fertile 0.2626 0.0595 5932.1602 4.41 0.000010
partner_attractiveness_shortterm:includedhorm_contra -0.0751 0.0603 543.7968 -1.24 0.21
partner_attractiveness_shortterm:fertile -0.0568 0.0613 5946.8207 -0.93 0.35
includedhorm_contra:fertile -0.2922 0.0714 5935.3670 -4.09 0.000043
partner_attractiveness_shortterm:includedhorm_contra:fertile 0.0343 0.0730 5944.5893 0.47 0.64
(Intercept) ***
partner_attractiveness_shortterm
includedhorm_contra
fertile ***
partner_attractiveness_shortterm:includedhorm_contra
partner_attractiveness_shortterm:fertile
includedhorm_contra:fertile ***
partner_attractiveness_shortterm:includedhorm_contra:fertile
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Correlation of Fixed Effects:
(Intr) prtn__ incld_ fertil pr__:_ prt__: incl_:
prtnr_ttrc_ 0.062
inclddhrm_c -0.842 -0.052
fertile -0.226 -0.018 0.191
prtnr_tt_:_ -0.052 -0.845 0.004 0.015
prtnr_ttr_: -0.018 -0.230 0.015 0.043 0.194
inclddhrm_: 0.189 0.015 -0.228 -0.834 -0.005 -0.036
prtnr_t_:_: 0.015 0.193 -0.005 -0.036 -0.231 -0.839 -0.004
</code></pre>
</div>
<div id="h2_1-partners-short-term-vs-long-term-attractiveness" class="section level4">
<h4><em>H2_1</em> Partner’s short-term vs long-term attractiveness</h4>
<p>Predicted fertile phase effect sizes (in red): biggest (EP desire, partner mate retention)/smallest (IP desire) top-right (high LT, low ST), then top-left (low LT, low ST), then bottom-left (low LT, high ST), then bottom-right (high LT/ST).</p>
<pre class="r"><code>add_main = update.formula(formula(model), new = as.formula(paste0(". ~ . + partner_attractiveness_longterm * included + partner_attractiveness_shortterm * included + partner_attractiveness_longterm * partner_attractiveness_shortterm"))) # reorder so that the triptych looks nice
add_mod_formula = update.formula(update.formula(formula(model), new = . ~ . - included * fertile), new = as.formula(paste0(". ~ . + partner_attractiveness_longterm * fertile * partner_attractiveness_shortterm * included"))) # reorder so that the triptych looks nice
update(model, formula = add_main) -> with_main
update(model, formula = add_mod_formula) -> with_mod
if (is(with_mod, "lmerMod")) {
with_mod <- as_lmerModLmerTest(with_mod)
}
cat(pander(anova(with_main, with_mod)))</code></pre>
<table>
<caption>Data: diary</caption>
<colgroup>
<col width="18%" />
<col width="5%" />
<col width="9%" />
<col width="9%" />
<col width="10%" />
<col width="12%" />
<col width="9%" />
<col width="10%" />
<col width="14%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">Df</th>
<th align="center">AIC</th>
<th align="center">BIC</th>
<th align="center">logLik</th>
<th align="center">deviance</th>
<th align="center">Chisq</th>
<th align="center">Chi Df</th>
<th align="center">Pr(>Chisq)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>with_main</strong></td>
<td align="center">11</td>
<td align="center">11315</td>
<td align="center">11390</td>
<td align="center">-5647</td>
<td align="center">11293</td>
<td align="center">NA</td>
<td align="center">NA</td>
<td align="center">NA</td>
</tr>
<tr class="even">
<td align="center"><strong>with_mod</strong></td>
<td align="center">18</td>
<td align="center">11325</td>
<td align="center">11446</td>
<td align="center">-5644</td>
<td align="center">11289</td>
<td align="center">4.695</td>
<td align="center">7</td>
<td align="center">0.6972</td>
</tr>
</tbody>
</table>
<pre class="r"><code>effs = allEffects(with_mod)
effs = data.frame(effs$`partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:included`) %>%
filter(round(partner_attractiveness_longterm,1) %in% c(-3,-2,0.8),round(partner_attractiveness_shortterm,1) %in% c(-2,0.5, 2))
ggplot(effs, aes(fertile, fit, ymin = lower, ymax = upper, color = included)) +
facet_grid(partner_attractiveness_shortterm ~ partner_attractiveness_longterm) +
geom_smooth(stat='identity') +
scale_color_manual(values = c("cycling" = 'red', 'horm_contra' = 'black'), guide = F) +
scale_fill_manual(values = c("cycling" = 'red', 'horm_contra' = 'black'), guide = F) +
ggtitle("Moderation", "top-to-bottom: short-term,\nleft-to-right: long-term attractiveness of the partner")+
ylab(names(model@frame)[1])</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/unnamed-chunk-43-1.png" width="672" /></p>
<pre class="r"><code>print_summary(with_mod)</code></pre>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: extra_pair ~ (1 | person) + partner_attractiveness_longterm +
fertile + partner_attractiveness_shortterm + included + partner_attractiveness_longterm:fertile +
partner_attractiveness_longterm:partner_attractiveness_shortterm +
fertile:partner_attractiveness_shortterm + partner_attractiveness_longterm:included +
fertile:included + partner_attractiveness_shortterm:included +
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm +
partner_attractiveness_longterm:fertile:included + partner_attractiveness_longterm:partner_attractiveness_shortterm:included +
fertile:partner_attractiveness_shortterm:included + partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:included
Data: diary
REML criterion at convergence: 11358
Scaled residuals:
Min 1Q Median 3Q Max
-4.523 -0.548 -0.144 0.418 7.671
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.288 0.537
Residual 0.282 0.531
Number of obs: 6378, groups: person, 493
Fixed effects:
Estimate
(Intercept) 1.76825
partner_attractiveness_longterm -0.14388
fertile 0.26487
partner_attractiveness_shortterm 0.04287
includedhorm_contra -0.05218
partner_attractiveness_longterm:fertile 0.02248
partner_attractiveness_longterm:partner_attractiveness_shortterm -0.02360
fertile:partner_attractiveness_shortterm -0.06686
partner_attractiveness_longterm:includedhorm_contra -0.01921
fertile:includedhorm_contra -0.29585
partner_attractiveness_shortterm:includedhorm_contra -0.07940
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm -0.01275
partner_attractiveness_longterm:fertile:includedhorm_contra 0.01523
partner_attractiveness_longterm:partner_attractiveness_shortterm:includedhorm_contra 0.09108
fertile:partner_attractiveness_shortterm:includedhorm_contra 0.03953
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:includedhorm_contra -0.00302
Std. Error
(Intercept) 0.04933
partner_attractiveness_longterm 0.05150
fertile 0.06052
partner_attractiveness_shortterm 0.05336
includedhorm_contra 0.05891
partner_attractiveness_longterm:fertile 0.06286
partner_attractiveness_longterm:partner_attractiveness_shortterm 0.04131
fertile:partner_attractiveness_shortterm 0.06580
partner_attractiveness_longterm:includedhorm_contra 0.06446
fertile:includedhorm_contra 0.07330
partner_attractiveness_shortterm:includedhorm_contra 0.06266
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm 0.05182
partner_attractiveness_longterm:fertile:includedhorm_contra 0.08179
partner_attractiveness_longterm:partner_attractiveness_shortterm:includedhorm_contra 0.05797
fertile:partner_attractiveness_shortterm:includedhorm_contra 0.07803
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:includedhorm_contra 0.07436
df
(Intercept) 530.92547
partner_attractiveness_longterm 521.71459
fertile 5927.20084
partner_attractiveness_shortterm 544.64550
includedhorm_contra 533.89389
partner_attractiveness_longterm:fertile 5914.86283
partner_attractiveness_longterm:partner_attractiveness_shortterm 528.98538
fertile:partner_attractiveness_shortterm 5953.85602
partner_attractiveness_longterm:includedhorm_contra 529.29006
fertile:includedhorm_contra 5935.12483
partner_attractiveness_shortterm:includedhorm_contra 543.43694
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm 5932.01295
partner_attractiveness_longterm:fertile:includedhorm_contra 5941.10648
partner_attractiveness_longterm:partner_attractiveness_shortterm:includedhorm_contra 532.93946
fertile:partner_attractiveness_shortterm:includedhorm_contra 5953.37777
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:includedhorm_contra 5948.91692
t value Pr(>|t|)
(Intercept) 35.85 < 2e-16
partner_attractiveness_longterm -2.79 0.0054
fertile 4.38 0.000012
partner_attractiveness_shortterm 0.80 0.4221
includedhorm_contra -0.89 0.3762
partner_attractiveness_longterm:fertile 0.36 0.7207
partner_attractiveness_longterm:partner_attractiveness_shortterm -0.57 0.5681
fertile:partner_attractiveness_shortterm -1.02 0.3096
partner_attractiveness_longterm:includedhorm_contra -0.30 0.7657
fertile:includedhorm_contra -4.04 0.000055
partner_attractiveness_shortterm:includedhorm_contra -1.27 0.2057
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm -0.25 0.8057
partner_attractiveness_longterm:fertile:includedhorm_contra 0.19 0.8523
partner_attractiveness_longterm:partner_attractiveness_shortterm:includedhorm_contra 1.57 0.1167
fertile:partner_attractiveness_shortterm:includedhorm_contra 0.51 0.6125
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:includedhorm_contra -0.04 0.9677
(Intercept) ***
partner_attractiveness_longterm **
fertile ***
partner_attractiveness_shortterm
includedhorm_contra
partner_attractiveness_longterm:fertile
partner_attractiveness_longterm:partner_attractiveness_shortterm
fertile:partner_attractiveness_shortterm
partner_attractiveness_longterm:includedhorm_contra
fertile:includedhorm_contra ***
partner_attractiveness_shortterm:includedhorm_contra
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm
partner_attractiveness_longterm:fertile:includedhorm_contra
partner_attractiveness_longterm:partner_attractiveness_shortterm:includedhorm_contra
fertile:partner_attractiveness_shortterm:includedhorm_contra
partner_attractiveness_longterm:fertile:partner_attractiveness_shortterm:includedhorm_contra
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
</code></pre>
</div>
<div id="h2_1b-partners-short-term-and-long-term-attractiveness" class="section level4">
<h4><em>H2_1b</em> Partner’s short-term and long-term attractiveness</h4>
<p><strong>Edit:</strong> Alternative model specification, added after publication. Predicted fertile phase effect sizes (in red): biggest (EP desire, partner mate retention)/smallest (IP desire) top-right (high LT, low ST), then top-left (low LT, low ST), then bottom-left (low LT, high ST), then bottom-right (high LT/ST).</p>
<pre class="r"><code>add_main = update.formula(formula(model), new = as.formula(paste0(". ~ . + partner_attractiveness_shortterm * included + partner_attractiveness_longterm * fertile * included"))) # reorder so that the triptych looks nice
add_mod_formula = update.formula(update.formula(formula(model), new = . ~ . - included * fertile), new = as.formula(paste0(". ~ . + (partner_attractiveness_shortterm + partner_attractiveness_longterm) * fertile * included"))) # reorder so that the triptych looks nice
update(model, formula = add_main) -> with_main
update(model, formula = add_mod_formula) -> with_mod
if (is(with_mod, "lmerMod")) {
with_mod <- as_lmerModLmerTest(with_mod)
}
cat(pander(anova(with_main, with_mod)))</code></pre>
<table>
<caption>Data: diary</caption>
<colgroup>
<col width="18%" />
<col width="5%" />
<col width="9%" />
<col width="9%" />
<col width="10%" />
<col width="12%" />
<col width="9%" />
<col width="10%" />
<col width="14%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">Df</th>
<th align="center">AIC</th>
<th align="center">BIC</th>
<th align="center">logLik</th>
<th align="center">deviance</th>
<th align="center">Chisq</th>
<th align="center">Chi Df</th>
<th align="center">Pr(>Chisq)</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>with_main</strong></td>
<td align="center">12</td>
<td align="center">11318</td>
<td align="center">11399</td>
<td align="center">-5647</td>
<td align="center">11294</td>
<td align="center">NA</td>
<td align="center">NA</td>
<td align="center">NA</td>
</tr>
<tr class="even">
<td align="center"><strong>with_mod</strong></td>
<td align="center">14</td>
<td align="center">11320</td>
<td align="center">11415</td>
<td align="center">-5646</td>
<td align="center">11292</td>
<td align="center">1.541</td>
<td align="center">2</td>
<td align="center">0.4629</td>
</tr>
</tbody>
</table>
<pre class="r"><code>plot_triptych(with_mod)</code></pre>
<p><img src="3_fertility_as_prereg_files/figure-html/unnamed-chunk-44-1.png" width="672" /></p>
<pre class="r"><code>print_summary(with_mod)</code></pre>
<pre><code>Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: extra_pair ~ (1 | person) + partner_attractiveness_shortterm +
partner_attractiveness_longterm + fertile + included + partner_attractiveness_shortterm:fertile +
partner_attractiveness_longterm:fertile + partner_attractiveness_shortterm:included +
partner_attractiveness_longterm:included + fertile:included +
partner_attractiveness_shortterm:fertile:included + partner_attractiveness_longterm:fertile:included
Data: diary
REML criterion at convergence: 11344
Scaled residuals:
Min 1Q Median 3Q Max
-4.498 -0.549 -0.145 0.420 7.658
Random effects:
Groups Name Variance Std.Dev.
person (Intercept) 0.289 0.538
Residual 0.282 0.531
Number of obs: 6378, groups: person, 493
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 1.7634 0.0487 534.9676 36.24 < 2e-16
partner_attractiveness_shortterm 0.0511 0.0513 543.3477 1.00 0.3192
partner_attractiveness_longterm -0.1403 0.0512 524.7949 -2.74 0.0063
fertile 0.2621 0.0595 5931.3669 4.40 0.000011
includedhorm_contra -0.0353 0.0579 537.0129 -0.61 0.5429
partner_attractiveness_shortterm:fertile -0.0629 0.0631 5944.6343 -1.00 0.3188
partner_attractiveness_longterm:fertile 0.0235 0.0626 5917.2215 0.38 0.7075
partner_attractiveness_shortterm:includedhorm_contra -0.0779 0.0606 542.7737 -1.29 0.1992
partner_attractiveness_longterm:includedhorm_contra -0.0264 0.0642 531.7236 -0.41 0.6811
fertile:includedhorm_contra -0.2962 0.0717 5936.2035 -4.13 0.000037
partner_attractiveness_shortterm:fertile:includedhorm_contra 0.0327 0.0752 5944.4730 0.44 0.6636
partner_attractiveness_longterm:fertile:includedhorm_contra 0.0158 0.0813 5940.3744 0.19 0.8460
(Intercept) ***
partner_attractiveness_shortterm
partner_attractiveness_longterm **
fertile ***
includedhorm_contra
partner_attractiveness_shortterm:fertile
partner_attractiveness_longterm:fertile
partner_attractiveness_shortterm:includedhorm_contra
partner_attractiveness_longterm:includedhorm_contra
fertile:includedhorm_contra ***
partner_attractiveness_shortterm:fertile:includedhorm_contra
partner_attractiveness_longterm:fertile:includedhorm_contra