-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMatingWithPredationSummary.Rmd
More file actions
89 lines (58 loc) · 2.56 KB
/
MatingWithPredationSummary.Rmd
File metadata and controls
89 lines (58 loc) · 2.56 KB
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
---
title: "Mating With Predation Summary"
output: html_document
---
```{r, include=FALSE, warning=FALSE}
source("Mating_and_Predation_RCode.R")
```
## Courtship:
###Note: Box == Treatment (Predator vs. Control)
```{r}
courtship_model1 <- lmer(court_prop ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = courtship_for_analysis)
summary(courtship_model1)
```
```{r}
plot(effect("Box", courtship_model1), main = "Proportion of Male Time Courting of Immature Female in 900 Seconds",
ylab = "Proportion of Time courting (sec)", xlab = "Treatment")
```
```{r}
courtship_model2 <- lmer(count ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = courtship_for_analysis)
summary(courtship_model2)
```
```{r}
plot(effect("Box", courtship_model2), main = "Number of Male Courtship Bouts to Immature Female in 900 Seconds",
ylab = "Courtship Bouts", xlab = "Treatment")
```
## Copulation
```{r}
copul_model1 <- lmer(Cop_latency ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = copul_for_analysis)
summary(copul_model1)
plot(effect("Box", copul_model1), main = "Mature Female Copulation Latency Rates with/without predator",
ylab = "Copulation Latency (Sec)", xlab = "Treatment")
```
```{r}
copul_model2 <- lmer(Cop_Duration ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = copul_for_analysis)
summary(copul_model2)
plot(effect("Box", copul_model2), main = "Mature Female Copulation Duration Rates with/without predator",
ylab = "Copulation Duration (Sec)", xlab="Treatment")
```
Remove those without copulation occurance
```{r}
copul_model12 <- lmer(Cop_latency ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = copul_for_analysis2)
summary(copul_model12)
plot(effect("Box", copul_model12), main = "Mature Female Copulation Latency Rates with/without predator, 0 removed",
ylab = "Copulation Latency (Sec)", xlab = "Treatment")
```
```{r}
copul_model22 <- lmer(Cop_Duration ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = copul_for_analysis2)
summary(copul_model22)
plot(effect("Box", copul_model22), main = "Mature Female Copulation Duration Rates with/without predator, 0's removed",
ylab = "Copulation Duration (Sec)", xlab="Treatment")
```
Copulation Proportion
```{r}
copprop_mod <- glm(copulationSuccess ~ Box + Replicate + TempCent + HumCent + BPCent + (1|Date), data = copul_for_analysis, family = "binomial")
summary(copprop_mod)
plot(effect("Box", copprop_mod), main = "Copulation Proportions",
ylab = "Copulation Proportion", xlab = "Treatment")
```