### Example of comparison of allometries between two populations of pupfish
### After accounting for sexual dimorphism, Method 1
data(pupfish)
shape <-two.d.array(pupfish$coords) # GPA-alignment previously performed
CS <- pupfish$CS
Sex <- pupfish$Sex
Pop <- pupfish$Pop
f1 <- shape ~ log(CS) + Sex + Pop
f2 <- ~ log(CS)*Sex*Pop
advanced.procD.lm(f1, f2, groups = ~Pop, slope = ~ log(CS), angle.type = "r", iter=24)
### Method 2
f1 <- shape ~ log(CS)*Sex
f2 <- ~ log(CS)*Sex*Pop
advanced.procD.lm(f1, f2, groups = ~Pop, slope = ~ log(CS), angle.type = "r", iter=24)
Run the code above in your browser using DataLab