Working Title

Female Avoidance behaviour vs Aggressive males

Authors

Anastasia J. Shavrova, Bruno A. Buzatto, & Michael M. Kasumovic

Description

Single mating with different male morph and female egg-laying checked over a lifetime

Hypothesis - Life History Trade-offs

Question: Are fighter males more harmful to females, than scrambler males?

  1. Fighters present a higher sexual conflict scenario for females post-copulatory by boosting fecundity earlier, higher in total fecundity, and decreasing longevity

  2. Scramblers present a higher sexual conflict scenario for females post-copulatory by boosting fecundity earlier, higher in total fecundity, and decreasing longevity

  3. All opposite is true

  4. No changes between morphs

Data

  • trial = experimental trial (1 or 2)
  • mate_type = male morph as fighter (F) or scrambler (S)
  • day = first day of egg counting, starts at day 2 as this is 2 days from mating
  • status = dead (1) or alive (2)
  • egg_count = number of eggs laid by female
  • rep = replicate vial
  • indv = unique individual number

Fecundity Over Time - Overall

Outliers - By rate

Individual 53,78,79

Graph - Overall

Note: day 0 is mating day

Graph - Overall: no outliers

Note: day 0 is mating day

Model - Quadratic regression

Does fecundity over time for females differ on whether they mated with a fighter or a scrambler?

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ (day^2) * mate_type + (1 | indv)
##    Data: fecund_egg
## 
## REML criterion at convergence: 5952.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8497 -0.7262 -0.2215  0.5769  3.7265 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept)  90.02    9.488  
##  Residual             800.91   28.300  
## Number of obs: 621, groups:  indv, 70
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)     44.88173    2.99194 179.83340  15.001  < 2e-16 ***
## day             -0.79676    0.15172 498.33108  -5.251 2.24e-07 ***
## mate_typeS      -0.91143    4.35154 178.23775  -0.209    0.834    
## day:mate_typeS  -0.01416    0.20946 516.13158  -0.068    0.946    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.642              
## mate_typeS  -0.688  0.441       
## day:mt_typS  0.465 -0.724 -0.639

## $emtrends
##  mate_type day^2.trend      SE  df lower.CL upper.CL
##  F             -0.0258 0.00496 491  -0.0355   -0.016
##  S             -0.0262 0.00471 529  -0.0355   -0.017
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate      SE  df t.ratio p.value
##  F - S    0.000458 0.00684 509   0.067  0.9466
## 
## Degrees-of-freedom method: kenward-roger

Model - Quadratic regression - No outliers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ (day^2) * mate_type + (1 | indv)
##    Data: fecund_egg_noout
## 
## REML criterion at convergence: 5275.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8036 -0.7354 -0.2085  0.6131  3.5515 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept)  46.62    6.828  
##  Residual             878.54   29.640  
## Number of obs: 547, groups:  indv, 67
## 
## Fixed effects:
##                Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)     49.5773     3.2535 250.8307  15.238  < 2e-16 ***
## day             -1.1154     0.2074 456.5977  -5.378  1.2e-07 ***
## mate_typeS       1.9196     4.7507 249.1943   0.404    0.687    
## day:mate_typeS  -0.1073     0.2887 466.3030  -0.372    0.710    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.759              
## mate_typeS  -0.685  0.520       
## day:mt_typS  0.545 -0.718 -0.753

## $emtrends
##  mate_type day^2.trend      SE  df lower.CL upper.CL
##  F             -0.0426 0.00798 460  -0.0582  -0.0269
##  S             -0.0466 0.00772 479  -0.0618  -0.0315
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate     SE  df t.ratio p.value
##  F - S     0.00409 0.0111 469   0.368  0.7127
## 
## Degrees-of-freedom method: kenward-roger

First Fecund

Model

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ mate_type + day + (1 | trial)
##    Data: first.fecund
## 
## REML criterion at convergence: 527.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.1914 -0.6517 -0.2490  0.4268  4.0540 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  0.00    0.000   
##  Residual             86.78    9.315   
## Number of obs: 73, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)  14.8866     1.8187 70.0000   8.185 8.32e-12 ***
## mate_typeS   -0.3123     2.2476 70.0000  -0.139  0.88989    
## day          -0.2751     0.1026 70.0000  -2.682  0.00912 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.399       
## day        -0.587 -0.224
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           11.4 1.50 3.21     6.80     16.0
##  S           11.1 1.72 4.34     6.47     15.7
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S       0.312 2.27 69.5   0.138  0.8909
## 
## Degrees-of-freedom method: kenward-roger
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: day ~ mate_type + egg_count + (1 | trial)
##    Data: first.fecund
## 
## REML criterion at convergence: 541.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4956 -0.8135 -0.2049  0.5082  3.0517 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)   0.0     0.00   
##  Residual             106.8    10.34   
## Number of obs: 73, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)  14.4733     2.2309 70.0000   6.488 1.06e-08 ***
## mate_typeS    4.3403     2.4397 70.0000   1.779  0.07957 .  
## egg_count    -0.3387     0.1263 70.0000  -2.682  0.00912 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.549       
## egg_count  -0.681  0.086
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           10.7 1.65 3.05     5.45     15.9
##  S           15.0 1.88 4.13     9.83     20.2
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S       -4.34 2.46 69.5  -1.764  0.0821
## 
## Degrees-of-freedom method: kenward-roger

Model - No outliers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ mate_type + day + (1 | trial)
##    Data: first.fecund.noout
## 
## REML criterion at convergence: 506.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.1951 -0.6554 -0.2482  0.4131  3.9873 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  trial    (Intercept) 6.900e-17 8.307e-09
##  Residual             8.869e+01 9.418e+00
## Number of obs: 70, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)  15.1102     1.9027 67.0000   7.941 3.07e-11 ***
## mate_typeS   -0.3632     2.3039 67.0000  -0.158   0.8752    
## day          -0.2769     0.1126 67.0000  -2.460   0.0165 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.409       
## day        -0.610 -0.180
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           11.8 1.53 3.09     7.01     16.6
##  S           11.4 1.79 4.45     6.67     16.2
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S       0.363 2.33 66.6   0.156  0.8767
## 
## Degrees-of-freedom method: kenward-roger
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: day ~ mate_type + egg_count + (1 | trial)
##    Data: first.fecund.noout
## 
## REML criterion at convergence: 511.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.4358 -0.8100 -0.2711  0.5454  2.5587 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  0.00    0.000   
##  Residual             95.83    9.789   
## Number of obs: 70, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)    
## (Intercept)  13.9740     2.1631 67.0000   6.460 1.38e-08 ***
## mate_typeS    3.2779     2.3615 67.0000   1.388   0.1697    
## egg_count    -0.2991     0.1216 67.0000  -2.460   0.0165 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.530       
## egg_count  -0.689  0.071
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           10.5 1.58 2.95     5.42     15.6
##  S           13.8 1.85 4.21     8.74     18.8
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S       -3.28 2.39 66.7  -1.369  0.1755
## 
## Degrees-of-freedom method: kenward-roger

Peak Fecundity

#Model

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ mate_type + day + (1 | trial)
##    Data: peak.fecund.single
## 
## REML criterion at convergence: 675.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.54961 -0.51241  0.00699  0.70239  1.99080 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  156.3   12.5    
##  Residual             1095.7   33.1    
## Number of obs: 70, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error       df t value Pr(>|t|)  
## (Intercept) 82.82853   11.73342  2.12851   7.059   0.0165 *
## mate_typeS  -5.10166    7.99101 66.08017  -0.638   0.5254  
## day          0.03635    0.65784 66.05110   0.055   0.9561  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.262       
## day        -0.466 -0.113

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           83.2 10.4 1.31     6.54      160
##  S           78.1 10.6 1.41     8.35      148
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate SE   df t.ratio p.value
##  F - S         5.1  8 66.1   0.638  0.5259
## 
## Degrees-of-freedom method: kenward-roger
## boundary (singular) fit: see help('isSingular')
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: day ~ mate_type + egg_count + (1 | trial)
##    Data: peak.fecund.single
## 
## REML criterion at convergence: 452
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2415 -0.5862 -0.1316  0.4825  6.0908 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  0.00    0.000   
##  Residual             37.85    6.152   
## Number of obs: 70, groups:  trial, 2
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  8.055507   2.096774 67.000000   3.842 0.000274 ***
## mate_typeS   1.415769   1.475644 67.000000   0.959 0.340794    
## egg_count    0.003208   0.021922 67.000000   0.146 0.884079    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.383       
## egg_count  -0.876  0.059
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           8.32 1.02 2.84     4.97     11.7
##  S           9.73 1.13 3.24     6.28     13.2
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate  SE   df t.ratio p.value
##  F - S       -1.42 1.5 66.8  -0.945  0.3480
## 
## Degrees-of-freedom method: kenward-roger

#Model - no outliers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ mate_type + day + (1 | trial)
##    Data: peak.fecund.single.nout
## 
## REML criterion at convergence: 623.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7729 -0.5785  0.0714  0.6150  2.1579 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept) 122.1    11.05   
##  Residual             784.1    28.00   
## Number of obs: 67, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)   
## (Intercept)  64.1738    11.8557  3.5281   5.413  0.00803 **
## mate_typeS   -2.3371     6.8874 63.1823  -0.339  0.73549   
## day           2.5149     0.9044 63.9070   2.781  0.00712 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.290       
## day        -0.641  0.039

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           85.2 9.10 1.26     13.0      157
##  S           82.9 9.35 1.38     19.3      147
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S        2.34 6.91 63.2   0.338  0.7363
## 
## Degrees-of-freedom method: kenward-roger
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: day ~ mate_type + egg_count + (1 | trial)
##    Data: peak.fecund.single.nout
## 
## REML criterion at convergence: 366.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2746 -0.7398 -0.2650  0.4425  3.6480 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  0.07338 0.2709  
##  Residual             13.53192 3.6786  
## Number of obs: 67, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error       df t value Pr(>|t|)   
## (Intercept)  4.41317    1.42329 17.07040   3.101  0.00647 **
## mate_typeS  -0.09495    0.90223 63.81009  -0.105  0.91652   
## egg_count    0.04694    0.01482 37.02879   3.168  0.00308 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.319       
## egg_count  -0.892  0.029

## $emmeans
##  mate_type emmean    SE   df lower.CL upper.CL
##  F           8.41 0.644 2.26     5.92     10.9
##  S           8.31 0.722 2.76     5.90     10.7
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE   df t.ratio p.value
##  F - S      0.0949 0.918 63.8   0.103  0.9180
## 
## Degrees-of-freedom method: kenward-roger

To Peak

Outliers - by rate

outlier indviduals 79,53,78

topeak_nooutlier <-  to_peak_egg %>%
  group_by(indv) %>%
  mutate(rate_of_lay=(max(egg_count)-min(egg_count))/(max(day)-min(day))) %>%
  filter(rate_of_lay!="NaN") %>%
  filter(row_number(rate_of_lay) == 1)%>%
  ungroup() %>%
  filter(rate_of_lay<1)

to_peak_noout <- to_peak_egg %>%
  filter(!indv %in% c(79,53, 78))

Graph

Model

Does the rate at which fighters reach peak fecundity differ from the rate of scramblers?

The rate of reaching peak fecundity significantly differs between fighters and scramblers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ day * mate_type + (1 | indv)
##    Data: to_peak_egg
## 
## REML criterion at convergence: 2636.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0702 -0.6794 -0.0127  0.5443  3.1710 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept) 250.5    15.83   
##  Residual             702.2    26.50   
## Number of obs: 276, groups:  indv, 69
## 
## Fixed effects:
##                Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)      7.9004     5.3328 231.9258   1.481     0.14    
## day              7.5980     0.7403 254.3682  10.263  < 2e-16 ***
## mate_typeS      33.7573     6.8939 186.0345   4.897 2.11e-06 ***
## day:mate_typeS  -6.6871     0.8134 259.6822  -8.221 9.67e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.748              
## mate_typeS  -0.774  0.579       
## day:mt_typS  0.681 -0.910 -0.661

## $emtrends
##  mate_type day.trend    SE  df lower.CL upper.CL
##  F             7.598 0.743 249     6.13     9.06
##  S             0.911 0.341 272     0.24     1.58
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE  df t.ratio p.value
##  F - S        6.69 0.818 256   8.180  <.0001
## 
## Degrees-of-freedom method: kenward-roger
## $emtrends
## indv = 43.6:
##  mate_type day.trend   SE  df lower.CL upper.CL
##  F             0.562 0.33 271  -0.0864     1.21
##  S             0.562 0.33 271  -0.0864     1.21
## 
## Confidence level used: 0.95 
## 
## $contrasts
## indv = 43.6:
##  contrast estimate SE  df t.ratio p.value
##  F - S           0  0 271     NaN     NaN

Model - no outliers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ day * mate_type + (1 | indv)
##    Data: to_peak_noout
## 
## REML criterion at convergence: 2321.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.34954 -0.69479  0.00582  0.54988  2.81162 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept) 148.9    12.20   
##  Residual             636.3    25.23   
## Number of obs: 247, groups:  indv, 66
## 
## Fixed effects:
##                Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)      9.2818     4.9076 222.1372   1.891  0.05988 .  
## day              7.4054     0.6986 227.4714  10.600  < 2e-16 ***
## mate_typeS      16.4155     6.9510 209.4921   2.362  0.01911 *  
## day:mate_typeS  -2.6924     0.9454 233.9895  -2.848  0.00479 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.783              
## mate_typeS  -0.706  0.553       
## day:mt_typS  0.579 -0.739 -0.758

## $emtrends
##  mate_type day.trend    SE  df lower.CL upper.CL
##  F              7.41 0.702 224     6.02     8.79
##  S              4.71 0.642 239     3.45     5.98
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE  df t.ratio p.value
##  F - S        2.69 0.951 232   2.830  0.0051
## 
## Degrees-of-freedom method: kenward-roger

From Peak

Outliers - by rate

outlier indviduals 79,53,78

frompeak_nooutlier <-  from_peak_egg %>%
  group_by(indv) %>%
  mutate(rate_of_lay=(max(egg_count)-min(egg_count))/(max(day)-min(day))) %>%
  filter(rate_of_lay!="NaN") %>%
  filter(row_number(rate_of_lay) == 1)%>%
  ungroup() %>%
  filter(rate_of_lay<1)

from_peak_noout <- from_peak_egg %>%
  filter(!indv %in% c(79,53,78)) 

Graph

Model

Does the rate at which fighters die from peak fecundity differ from the rate of scramblers?

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ day * mate_type + (1 | indv)
##    Data: from_peak_egg
## 
## REML criterion at convergence: 4054.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9177 -0.7361 -0.1730  0.5418  3.2581 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept) 110.0    10.49   
##  Residual             852.5    29.20   
## Number of obs: 420, groups:  indv, 68
## 
## Fixed effects:
##                Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)     54.7196     4.1580 198.5586  13.160  < 2e-16 ***
## day             -1.2150     0.1904 299.0791  -6.381 6.69e-10 ***
## mate_typeS       8.4040     6.3533 141.6372   1.323    0.188    
## day:mate_typeS  -0.3936     0.2790 178.7381  -1.411    0.160    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.751              
## mate_typeS  -0.654  0.491       
## day:mt_typS  0.513 -0.682 -0.773

## $emtrends
##  mate_type day.trend    SE  df lower.CL upper.CL
##  F             -1.21 0.193 311    -1.60   -0.835
##  S             -1.61 0.207 128    -2.02   -1.199
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE  df t.ratio p.value
##  F - S       0.394 0.283 193   1.391  0.1658
## 
## Degrees-of-freedom method: kenward-roger

Model - no outliers

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: egg_count ~ day * mate_type + (1 | indv)
##    Data: from_peak_noout
## 
## REML criterion at convergence: 3590.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2031 -0.7164 -0.1446  0.5789  3.0977 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  indv     (Intercept) 169.1    13.00   
##  Residual             825.6    28.73   
## Number of obs: 372, groups:  indv, 65
## 
## Fixed effects:
##                Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept)     73.4936     5.3909 186.8642  13.633  < 2e-16 ***
## day             -2.4362     0.2951 283.3514  -8.255 5.82e-15 ***
## mate_typeS      -0.8038     7.7513 175.0252  -0.104    0.918    
## day:mate_typeS   0.1775     0.4042 290.6595   0.439    0.661    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) day    mt_tyS
## day         -0.818              
## mate_typeS  -0.695  0.569       
## day:mt_typS  0.598 -0.730 -0.805

## $emtrends
##  mate_type day.trend    SE  df lower.CL upper.CL
##  F             -2.44 0.298 312    -3.02    -1.85
##  S             -2.26 0.279 323    -2.81    -1.71
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE  df t.ratio p.value
##  F - S      -0.178 0.408 317  -0.435  0.6638
## 
## Degrees-of-freedom method: kenward-roger

Total Fecundity

Model

Does total fecundity differ between females mated with scramblers or fighters?

## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: total ~ mate_type + (1 | trial)
##    Data: total.fecund
## 
## REML criterion at convergence: 876.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.98237 -0.71989 -0.07264  0.85126  2.55591 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  5628     75.02  
##  Residual             24349    156.04  
## Number of obs: 69, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)
## (Intercept)  273.092     59.113   1.209   4.620    0.103
## mate_typeS   -10.682     37.650  66.039  -0.284    0.778
## 
## Correlation of Fixed Effects:
##            (Intr)
## mate_typeS -0.302

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F            273 59.1 1.21     -231      777
##  S            262 59.8 1.26     -212      737
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE df t.ratio p.value
##  F - S        10.7 37.7 66   0.284  0.7776
## 
## Degrees-of-freedom method: kenward-roger
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: total ~ mate_type + (1 | trial)
##    Data: total.fecund.noout
## 
## REML criterion at convergence: 830.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0108 -0.7765 -0.1444  0.8354  2.6907 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  trial    (Intercept)  6854     82.79  
##  Residual             21708    147.34  
## Number of obs: 66, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error      df t value Pr(>|t|)
## (Intercept)  281.413     63.637   1.156   4.422    0.116
## mate_typeS    -4.573     36.422  63.056  -0.126    0.900
## 
## Correlation of Fixed Effects:
##            (Intr)
## mate_typeS -0.266

## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F            281 63.6 1.16     -310      872
##  S            277 64.4 1.21     -272      826
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE   df t.ratio p.value
##  F - S        4.57 36.5 63.1   0.125  0.9006
## 
## Degrees-of-freedom method: kenward-roger

Survival Graph

Survival Graph - no outliers

Model - Cox Model (egg count as covariate)

Is survival predicted by fecundity over time and does it differ between mate types?

While survival probability does not significantly differ between mate types (fighter or scrambler) the boost in fecundity does significantly decrease survivorship for females.

## Cox mixed-effects model fit by maximum likelihood
##   Data: longevity
##   events, n = 70, 70
##   Iterations= 2 16 
##                    NULL Integrated    Fitted
## Log-likelihood -230.439  -221.8047 -221.7796
## 
##                   Chisq   df         p   AIC  BIC
## Integrated loglik 17.27 4.00 0.0017139  9.27 0.27
##  Penalized loglik 17.32 3.02 0.0006239 11.27 4.47
## 
## Model:  Surv(day) ~ mate_type * egg_count + (1 | indv) 
## Fixed coefficients
##                             coef exp(coef)   se(coef)     z      p
## mate_typeS           -0.22215139 0.8007941 0.26734576 -0.83 0.4100
## egg_count             0.05239071 1.0537874 0.01782293  2.94 0.0033
## mate_typeS:egg_count  0.00699503 1.0070196 0.02120873  0.33 0.7400
## 
## Random effects
##  Group Variable  Std Dev      Variance    
##  indv  Intercept 0.0199928009 0.0003997121
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  mate_type  emmean    SE  df asymp.LCL asymp.UCL
##  F          0.0863 0.115 Inf    -0.139     0.312
##  S         -0.0990 0.129 Inf    -0.352     0.154
## 
## Results are given on the log (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate    SE  df z.ratio p.value
##  F - S       0.185 0.244 Inf   0.760  0.4475
## 
## Results are given on the log (not the response) scale.
##                     chisq df     p
## mate_type           0.101  1 0.751
## egg_count           3.202  1 0.074
## mate_type:egg_count 4.502  1 0.034
## GLOBAL              5.339  3 0.149

No outliers

## Cox mixed-effects model fit by maximum likelihood
##   Data: longevity.noout
##   events, n = 67, 67
##   Iterations= 2 16 
##                     NULL Integrated    Fitted
## Log-likelihood -217.7369  -209.8246 -209.8007
## 
##                   Chisq   df         p  AIC   BIC
## Integrated loglik 15.82 4.00 0.0032637 7.82 -0.99
##  Penalized loglik 15.87 3.02 0.0012339 9.83  3.16
## 
## Model:  Surv(day) ~ mate_type * egg_count + (1 | indv) 
## Fixed coefficients
##                             coef exp(coef)   se(coef)     z      p
## mate_typeS           -0.19862947 0.8198536 0.27546953 -0.72 0.4700
## egg_count             0.04994957 1.0512181 0.01793231  2.79 0.0053
## mate_typeS:egg_count  0.00754370 1.0075722 0.02145639  0.35 0.7300
## 
## Random effects
##  Group Variable  Std Dev     Variance   
##  indv  Intercept 0.019992349 0.000399694
## NOTE: Results may be misleading due to involvement in interactions
## $emmeans
##  mate_type  emmean    SE  df asymp.LCL asymp.UCL
##  F          0.0712 0.116 Inf    -0.156     0.298
##  S         -0.0860 0.134 Inf    -0.349     0.177
## 
## Results are given on the log (not the response) scale. 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate   SE  df z.ratio p.value
##  F - S       0.157 0.25 Inf   0.629  0.5295
## 
## Results are given on the log (not the response) scale.
##                     chisq df     p
## mate_type           0.213  1 0.644
## egg_count           2.705  1 0.100
## mate_type:egg_count 3.961  1 0.047
## GLOBAL              4.729  3 0.193

Time of laying

lay_time_single <- read.csv("C:/Users/z5218946/OneDrive - UNSW/Research/Mites Fecundity/egg_count_lay.csv")

str(lay_time_single)
## 'data.frame':    517 obs. of  7 variables:
##  $ ï..trial : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ mate_type: chr  "F" "F" "F" "S" ...
##  $ day      : int  2 4 6 2 4 6 9 2 4 6 ...
##  $ status   : int  1 1 2 1 1 1 2 1 1 1 ...
##  $ egg_count: int  28 0 13 35 81 0 1 22 60 64 ...
##  $ rep      : int  9 9 9 4 4 4 4 20 20 20 ...
##  $ indv     : int  3 3 3 4 4 4 4 5 5 5 ...
colnames(lay_time_single)[1]="trial"
lay_time_single$egg_count <- as.numeric(lay_time_single$egg_count)
lay_time_single$trial <- as.numeric(lay_time_single$trial)
lay_time_single$day <- as.numeric(lay_time_single$day)
lay_time_single$rep <- as.factor(lay_time_single$rep)
lay_time_single$indv <- as.numeric(lay_time_single$indv)

day_of_last_lay <- lay_time_single %>%
  group_by(indv) %>%
  top_n(1, day)

ggplot(day_of_last_lay, aes(mate_type,day)) + geom_boxplot()

mod_lay <- lmer(day~mate_type + egg_count + (1|trial), day_of_last_lay)
## boundary (singular) fit: see help('isSingular')
summary(mod_lay)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: day ~ mate_type + egg_count + (1 | trial)
##    Data: day_of_last_lay
## 
## REML criterion at convergence: 499
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9180 -0.7106 -0.1074  0.6363  3.2503 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev. 
##  trial    (Intercept) 9.066e-20 3.011e-10
##  Residual             7.744e+01 8.800e+00
## Number of obs: 70, groups:  trial, 2
## 
## Fixed effects:
##             Estimate Std. Error       df t value Pr(>|t|)    
## (Intercept) 19.25703    1.90144 67.00000  10.128 3.83e-15 ***
## mate_typeS   1.64587    2.15230 67.00000   0.765   0.4471    
## egg_count   -0.12653    0.05045 67.00000  -2.508   0.0146 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) mt_tyS
## mate_typeS -0.644       
## egg_count  -0.649  0.204
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
hist(resid(mod_lay))

emmeans(mod_lay, pairwise~mate_type)
## $emmeans
##  mate_type emmean   SE   df lower.CL upper.CL
##  F           16.7 1.47 3.28     12.2     21.1
##  S           18.3 1.64 3.68     13.6     23.1
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
##  contrast estimate  SE   df t.ratio p.value
##  F - S       -1.65 2.2 66.9  -0.749  0.4565
## 
## Degrees-of-freedom method: kenward-roger