make_excretion()
load('../data/data_excretion.Rda')
kable(head(data_exc))
HQ.LOL.1 |
12/9 |
8:46 |
95 |
22.0 |
9:07 |
104 |
20 |
19.93 |
0.00 |
0.04 |
2.10 |
3.20 |
0:21 |
all lengths from pre-experiment sheet |
0.04 |
1.10 |
HQ |
LL |
HQ.LOL.2 |
12/9 |
8:47 |
96 |
21.5 |
9:08 |
102 |
20 |
18.60 |
0.07 |
-0.04 |
2.15 |
2.20 |
0:21 |
|
-0.11 |
0.05 |
HQ |
LL |
HQ.LOL.3 |
12/9 |
8:49 |
97 |
22.5 |
9:10 |
91 |
20 |
18.30 |
0.04 |
0.11 |
2.05 |
2.09 |
0:21 |
|
0.07 |
0.04 |
HQ |
LL |
HQ.LOL.4 |
12/9 |
8:51 |
98 |
19.5 |
9:12 |
87 |
20 |
18.10 |
0.03 |
0.06 |
2.17 |
2.21 |
0:21 |
|
0.03 |
0.04 |
HQ |
LL |
HQ.LOL.5 |
12/9 |
8:53 |
105 |
22.0 |
9:14 |
93 |
20 |
19.66 |
-0.23 |
-0.17 |
0.61 |
0.68 |
0:21 |
|
0.06 |
0.07 |
HQ |
LL |
HQ.LOL.6 |
12/9 |
8:55 |
100 |
21.0 |
9:16 |
89 |
20 |
18.84 |
-0.31 |
-0.21 |
0.23 |
0.31 |
0:21 |
|
0.10 |
0.08 |
HQ |
LL |
We will initially only use measurements over zero, because they need to be logged.
data_exc <- data_exc %>%
filter(N_exc > 0, P_exc > 0)
ggplot(data_exc, aes(y = N_exc, x = length, col = treatment, group = population)) +
geom_point() +
facet_grid( ~ population) +
scale_x_log10() + scale_y_log10() +
labs(y = expression(paste('N excretion (', mu, 'ug/min)')),
x = 'Standard length (mm)') +
theme_bw()

ggplot(data_exc, aes(y = P_exc, x = length, col = treatment, group = population)) +
geom_point() +
facet_grid( ~ population) +
scale_x_log10() + scale_y_log10() +
labs(y = expression(paste('N excretion (', mu, 'ug/min)')),
x = 'Standard length (mm)') +
theme_bw()

Data Analyses
In order to test for differences in excretion rates we fit two linear models (one for N and one for P). Because excretion rate and fish size scale alometrically, we log-transformed excretion rates when including them as response variables, and included the logarithm of fish length as a covariate. We included population, food treatment, and their interaction, as explanatory factors.
model_N <- lm(log(N_exc) ~ log(length) + treatment * population, data = data_exc)
knitr::kable(summary(model_N)$coefficients)
(Intercept) |
-4.129439 |
9.1297608 |
-0.4523052 |
0.6549495 |
log(length) |
1.023238 |
3.1747477 |
0.3223054 |
0.7499012 |
treatmentLQ |
-1.096752 |
0.4895752 |
-2.2402116 |
0.0342066 |
populationLL |
-1.741545 |
0.5575805 |
-3.1233958 |
0.0044804 |
treatmentLQ:populationLL |
2.534747 |
0.7570780 |
3.3480665 |
0.0025792 |
model_P <- lm(log(P_exc) ~ log(length) + treatment * population, data = data_exc)
knitr::kable(summary(model_P)$coefficients)
(Intercept) |
8.4011766 |
9.7394008 |
0.8625969 |
0.3965587 |
log(length) |
-3.7479962 |
3.3867415 |
-1.1066673 |
0.2789732 |
treatmentLQ |
0.2243500 |
0.5222666 |
0.4295699 |
0.6711883 |
populationLL |
-0.1655622 |
0.5948129 |
-0.2783434 |
0.7830380 |
treatmentLQ:populationLL |
0.2296339 |
0.8076319 |
0.2843298 |
0.7784994 |