Homework # 9

Problem 1

Calculate the natural log of all the numeric variables. Save these in your existing dataframe.

Make a subset of the data including only the extant species (G, H, or P, representing Gorilla, Homo and Pan), excluding the Dikika fossil (D).

Perform a discriminant function analysis (DFA) on the data. Which variable has the strongest loading on LD1?

Make a beautiful plot (using ggplot) of LD1 versus LD2. Hint: to get the LD scores, use the predict() function on your discriminant function analysis model object, as shown in class.

Plot the Dikika fossil on the DFA plot.

BONUS POINT: Surround the points corresponding to each taxon with a polygon to ease visualization. Hint: the chull() function can be used to compute convex hulls, which is the name for polygons that enclose groups of points.