Chapter 14 Phylogenetic Generalized Linear Models

Load the same libraries and datasets as in the prior chapter.

14.1 Phylogenetic Linear Models

In our phylogenetic linear model we create an important macroevolution hypothesis: Flower length is determined by the types of pollinators that visit the flower.

EXTREMELY IMPORTANT HERE = The main assumption of these models is that the ERRORS (not the response variable) have a normal distribution with a vector of zeros as the mean and variance-covariance matrix sigma^2 *C. Remember C is determined by the structure of the tree as we d calculated it in the continuous trait (Brownian motion) tutorial.

14.1.1 Testing the hypothesis

How would you frame then a biological hypothesis from these observations?

Before typing a model it would be great to think about what we are trying to achieve.

Now use the following code and fill in the necessary arguments.

#not log.flowerlength?
plm.flowerlength <- phylolm(formula, data=, phy=, model="BM")

Interpret this model, what is happening? what is significant and how

summary(plm.flowerlength)

What is happening with the residuals of this linear model

hist(plm.flowerlength$res)
qqnorm(plm.flowerlength$res)

Now what happens if the predictor is log(Length)?

plm.flowerlength2 <- phylolm(formula, data=, phy=, model="BM")

Using the same commands as above, interpret this model, what is happening? what is significant and how

14.2 What happens if the model of evolution is not Brownian motion but something else?

plm.flowerlength3<-phylolm(Length~ P1+P2+P3+ P4, data=pole_dataset, phy=pole_tree, model="OUrandomRoot")

What is this model?

summary(plm.flowerlength3)

interpret this model, what is happening? what is significant and how

plot(plm.flowerlength3)
hist(plm.flowerlength3$res)
qqnorm(plm.flowerlength3$res)

Overall which is the best model and why? Argue statistically but also think about flower length.