Microcosm

    Grass microcosm data analysis help sheet

    Responses

    aboveground biomass

    belowground biomass

    mycorrhizal colonization (%)

    growth (change in height from November to October)

    Treatments

    single species with mycorrhizae

    single species without mycorrhizae

    competition with mycorrhizae

    competition without mycorrhizae

    Analysis

    The pot is our unit of replication, even though we have the height measurements for each stem. All our analyses should be done at the pot level, so we’ll first need to calculate height averages for each species within each pot and then calculate the difference in average heights to measure average growth per species per pot.

    Calculate the average height for each species within each pot at measurement time 1 and measurement time 2.

    a. Use aggregate. Call the new column avgHeight.

    3. Calculate the differences in average heights between the two measurement times.

    a. This is a little trickier. What we’re going to do is make the first measurement negative and keep the second positive. Then we can use the sum() function to get the difference between the first and second measurement times. I wrote a loop that you can modify to fit your own data frame. Everywhere you see ‘dat’ change it to the name of your dataframe.

    for (i in 1:(dim(dat)[1])){
    if (dat$measurement_time[i] == 1) {dat$heightneg[i] = -dat$avgHeight[i]}

    else {dat$heightneg[i]=dat$avgHeight[i]} }

    b. Use aggregate() to calculate the sum of heightneg by species, by pot, by competition treatment and by mycorrhizal treatment. You should end with a dataframe that includes pot, species, competition and

    mycorrhizal treatments and the difference in height between the two measurement times. These numbers should all be positive (unless overall our grasses shrunk!).

    The biomass and mycorrhizae responses should already be at the per species per pot level.

    The next step is to separate out the data into the bigblue and fowlblue species vs the rye and sideoats species. The line below will create a dataframe where the species is big blue or fowl blue. Modify the below to work with your dataframe names. Also code a line that will make a ryeoatDat that contains data for rye or oat.

    blueDat = subset(dat, dat$species == “bigblue” | dat$speices == “fowlblue”)

    6. Lastly, we need to do the statistical analysis to see if there are any differences in our responses among our treatments. We have two categorical variables: competition (yes or no) and mycorrhizae (yes or no). When we have categorical variables but continuous responses, we’ll use a classic ANOVA (analysis of variance). It is called a two-way ANOVA because we have two treatments. Here is the general code:

    aov1 = aov(response ~ trt1*trt2, data = blueDat)

    where trt1 is one treatment and trt2 is the other treatment and blueDat is the name of your dataframe. Modify the above code to work with your dataframe and column names.

    The final task is to interpret your results and create the appropriate tables and graphs to tell the story of our class experiment.

                                                                                                                                      Order Now