Giri et al. (2016) were interested in the capacity of Atlantic salmon (Salmo salar), grown in an aquaculture situation, to deliver high levels of omega-3 long-chain polyunsaturated fatty acids (PUFA) in their tissues. Specifically, they tested whether several micronutrients (iron, zinc, magnesium) and coenzymes (riboflavin, biotin and niacin) could increase the conversion from short- to long-chain PUFA. They used four treatments, a diet lacking in these micronutrients and coenzymes (T-0), a diet with normal levels (T-100), and two levels of fortification, where the enzymes and micronutrients were 300% and 600% greater than normal (T-300 and T-600).

E. Peter Steenstra/USFWS, Public domain, via Wikimedia Commons

E. Peter Steenstra/USFWS, Public domain, via Wikimedia Commons

Giri, S. S., Graham, J., Hamid, N. K. A., Donald, J. A. & Turchini, G. M. (2016). Dietary micronutrients and in vivo n−3 LC-PUFA biosynthesis in Atlantic salmon. Aquaculture, 452, 416-25.

Link to paper; the data are available here

Preliminaries

First, load the required packages (sjstats, pwr)

Import giri data file (giri.csv)

giri <- read.csv("../data/giri.csv")
head(giri,10)

Make treat a factor

giri$treat <- factor(giri$treat)

Fit model for long-chain omega-3 fatty acids as the response variable

This is the variable n.3.lc.PUFA

giri.aov <- aov(n.3.LC.PUFA~treat, data=giri)

Check diagnostics. We are most interested in the residual plot.

plot(giri.aov)

Nothing of concern in diagnostic plots

Examine model results.

tidy(giri.aov)

Get effect sizes

#effectsizes used here to get eta-squared values, which tidy doesn't provide
effectsize(giri.aov)
For one-way between subjects designs, partial eta squared is equivalent to eta squared. Returning eta squared.
# Effect Size for ANOVA

Parameter | Eta2 |       95% CI
-------------------------------
treat     | 0.70 | [0.18, 1.00]

- One-sided CIs: upper bound fixed at [1.00].
effectsize(giri.aov, type = "omega")
For one-way between subjects designs, partial omega squared is equivalent to omega squared. Returning omega squared.
# Effect Size for ANOVA

Parameter | Omega2 |       95% CI
---------------------------------
treat     |   0.57 | [0.00, 1.00]

- One-sided CIs: upper bound fixed at [1.00].
effectsize(giri.aov, type = "f")
For one-way between subjects designs, partial eta squared is equivalent to eta squared. Returning eta squared.
# Effect Size for ANOVA

Parameter | Cohen's f |      95% CI
-----------------------------------
treat     |      1.54 | [0.48, Inf]

- One-sided CIs: upper bound fixed at [Inf].
emmeans(giri.aov, ~treat)
 treat emmean    SE df lower.CL upper.CL
 0       9.05 0.307  8     8.35     9.76
 100    10.59 0.307  8     9.88    11.30
 300    10.70 0.307  8     9.99    11.40
 600    10.47 0.307  8     9.77    11.18

Confidence level used: 0.95 

Do linear polynomial contrast

contrasts(giri$treat) <- contr.poly(4, scores=c(0, 100, 300, 600))
giri1.aov <- aov(n.3.LC.PUFA~treat, data=giri)
summary.aov(giri1.aov, split=list(treat=list("Linear"=1, "Quadratic"=2)))
                   Df Sum Sq Mean Sq F value Pr(>F)  
treat               3  5.355   1.785   6.330 0.0166 *
  treat: Linear     1  1.730   1.730   6.134 0.0383 *
  treat: Quadratic  1  2.496   2.496   8.851 0.0177 *
Residuals           8  2.256   0.282                 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
LS0tCnRpdGxlOiAiUUsgQm94IDYuNCIKb3V0cHV0OgogIGh0bWxfbm90ZWJvb2s6CiAgICB0aGVtZTogZmxhdGx5Ci0tLQoKYGBge3Igc2V0dXAsIGluY2x1ZGU9RkFMU0V9CmtuaXRyOjpvcHRzX2NodW5rJHNldChlY2hvID0gVFJVRSkKYGBgCgpHaXJpIGV0IGFsLiAoMjAxNikgd2VyZSBpbnRlcmVzdGVkIGluIHRoZSBjYXBhY2l0eSBvZiBBdGxhbnRpYyBzYWxtb24gKCpTYWxtbyBzYWxhciopLCBncm93biBpbiBhbiBhcXVhY3VsdHVyZSBzaXR1YXRpb24sIHRvIGRlbGl2ZXIgaGlnaCBsZXZlbHMgb2Ygb21lZ2EtMyBsb25nLWNoYWluIHBvbHl1bnNhdHVyYXRlZCBmYXR0eSBhY2lkcyAoUFVGQSkgaW4gdGhlaXIgdGlzc3Vlcy4gU3BlY2lmaWNhbGx5LCB0aGV5IHRlc3RlZCB3aG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