ANCOVA with Water Stress and Low-level Ozone
Let’s learn the details of ANCOVA with water stress and low-level ozone.
We'll cover the following
ANCOVA with water stress and ozone
We’ll focus on ozone and water stress (ignoring for now) and perform an analysis of covariance of their impacts on the yield of the William variety. In this type of experiment, soya bean yields are normally analyzed after automatic log transformation. We’ll do the same here for consistency.
Note: It’s important to keep this transformation in mind when you’re interpreting the results, particularly regarding the interaction. This is because multiplicative effects become additive on a log scale.
We may expect both water stress and low-level ozone pollution to decrease yields. It also seems possible that a plant exposed to either of these stresses may be more vulnerable to the effect of the other, and that we may find a synergistic interaction. On the other hand, there is a limit to how far yields can fall—we can’t have negative values—which may restrict things.
We can produce a panel plot of the effects of ozone on the yield of the William soya bean variety. Before we start, because we’ll need to draw a few variations of this figure, it’s a good idea to create objects for the axis labels so that we only have to write them out in full (or make any future changes to them) once. See below for an example of how the labels of this panel plot look:
xlabel <- expression(paste("Ozone (", mu, "L L"^"-1", ")"))
ylabel <- expression(paste("Log Yield (kg ha"^"-1", ")"))
In the qplot()
code, the facets argument sets up a grid of panels by specifying the rows and columns. In this case, a point serves as a placeholder to indicate that there are no rows. If we leave it alone, ggplot2
will limit the plot to the space occupied by the data. Here, we can use the xlim()
function to extend the -axis back to zero, where the regression intercept is located. There are a couple more things to add to the figure, so we won’t print this preliminary version:
Get hands-on with 1400+ tech skills courses.