FES 720 Introduction to R

LAB: Binomial Data

This is the lab associated with the lecture and lesson on Binomial Data in R.

Please upload your final completed lab on the Assignments page in Canvas, as per the instructions below.

You are welcome and expected to ask for help from the instructors if you get stuck: Please also come to the R Bootcamp on Friday—there is coffee and snacks!


Questions

Flowering Trees

Read in the data

dat <- read.table(file = "http://www.simonqueenborough.info/R/data/flowering.txt", 
                  header = TRUE, sep = '\t')

This dataset contains information on flowering of 1500 Myrsticaceae trees in 2002 in the Yasuni Forest Dynamics Plot, a tropical lowland rain forest in Ecuador. There are data on seven species ($SpCode), their size ($dbh), their sex ($Sex: 0, F, M), if they flowered that year ($Flowers: 1/0), and an index of light availability in the canopy ($CII:, 0-5, with 0 being no light and 5 being full overhead and side light).

  1. Examine the structure of the data.

  2. Look at the first 7 rows.

  3. Is the ratio of flowering to non-flowering trees different from 1:1 (over all species)?

  4. Is the ratio of M to F trees different from 1:1 (over all species)?

  5. Size is likely a key factor affecting the chance of flowering in one year. Model the probability of flowering as a function of size for the species iryapa.

  6. Plot the data and the predicted curve of this relationship.

  7. Do male and female trees of this species have a different probability of flowering as a function of size?

  8. Plot these flowering curves for male and female iryapa trees.


How to write up your answers

Please check the help page for a reminder, if you need to.


Updated: 2017-12-02