#Female mate preferences on male size and wing patch characteristics #This script tests female preference against three traits (size included) #Conclusion: male size is not target of female choice. #setwd("...") #Set working directory getwd() #Check working directory #Test for female preferences for male size and patch characteristics #Data for C. splendens females and unmanipulated males (N=30) #Data collected in summer 2003 #Three male morphological traits and female preference ("score") fempref<-read.csv("FemalePreferences.csv",header=T, sep=";", fill=TRUE) fempref <- as.data.frame(fempref) fempref str(fempref) head(fempref) traitpref1 <- lm(fempref$Score ~ fempref$Patch.length + fempref$Color.Score + fempref$Size) traitpref1 summary(traitpref1) anova(traitpref1) aov(traitpref1) AIC(traitpref1) traitpref2 <- lm(fempref$Score ~ fempref$Color.Score + fempref$Size) traitpref2 summary(traitpref2) anova(traitpref2) aov(traitpref2) AIC(traitpref2) anova(traitpref1,traitpref2) #Comparing the two models - significantly different AIC(traitpref1,traitpref2) #Lower AIC for "traitpref2" compared to "traitpref1" traitpref3 <- lm(fempref$Score ~ fempref$Color.Score) traitpref3 summary(traitpref3) anova(traitpref3) aov(traitpref3) AIC(traitpref3) anova(traitpref2,traitpref3) AIC(traitpref2,traitpref3) ##Dataset used in the above analyses Origin Site Date Time Pres Score Id Species Patch length Color_Score Size Klinga Klinga 08-jul 14h00 22 0.611 483A Splendens 14.71 2 43.76 Klinga Klinga 08-jul 14h30 19 0.0625 494A Splendens 15.20 2 45.02 Klinga Klinga 09-jul 11h30 28 0.863 504B Splendens 13.69 2 43.03 Klinga Klinga 09-jul 13h00 23 0.435 514B Splendens 14.42 2 42.25 Klinga Klinga 09-jul 14h00 24 0.042 515B Splendens 15.19 2 44.35 Klinga Klinga 09-jul 15h00 18 0.437 516B Splendens 14.87 2 42.00 Klinga Klinga 10-jul 10h30 21 1.048 522B Splendens 15.27 3 43.31 Klinga Klinga 10-jul 11h10 23 0.826 531B Splendens 16.44 4 42.51 Klinga Klinga 10-jul 13h25 36 1.027 541B Splendens 15.63 2 42.64 Klinga Klinga 10-jul 14h50 35 0.257 542B Splendens 14.08 2 42.73 Klinga Klinga 13-jul 10h40 21 0.111 603B Splendens 13.95 2 43.9 Klinga Klinga 13-jul 11h25 23 0.0435 604B Splendens 13.66 2 43.4 Klinga Klinga 13-jul 13h00 26 0.923 605B Splendens 16.70 4 43.55 Klinga Klinga 13-jul 14h15 24 0.0417 606B Splendens 16.39 3 42.41 Klinga Klinga 13-jul 15h00 19 1.294 607B Splendens 15.57 5 42.68 Klinga Klinga 23-jul 15h45 26 0.5556 750B Splendens 14.28 2 42.73 Klinga Klinga 29-jul 10h55 23 1.333 784B Splendens 15.68 4 43.17 Klinga Klinga 30-jul 13h00 24 1.286 799B Splendens 15.59 4 44.71 Klinga Klinga 30-jul 13h30 24 0.045 801B Splendens 14.46 4 42.25 Klinga Klinga 30-jul 14h00 27 1.632 802B Splendens 14.98 4 43.24 Klinga Klinga 30-jul 14h30 24 0.857 803B Splendens 15.55 4 44.20 Klinga Klinga 30-jul 15h00 22 1.533 807B Splendens 16.2 3 41.79 Klinga Klinga 03-aug 10h05 24 0.5556 824B Splendens 16.19 4 43.79 Klinga Klinga 01-aug 12h25 19 1.154 817B Splendens 14.78 5 42.97 Klinga Klinga 01-aug 14h00 24 0.941 818B Splendens 14.55 4 44.95 Klinga Klinga 01-aug 14h30 24 0.75 819B Splendens 16.00 3 44.27 Klinga Klinga 01-aug 14h50 22 0.0705 820B Splendens 16.63 4 44.17 Klinga Klinga 01-aug 15h15 21 0.6667 821B Splendens 16.13 3 43.79 Klinga Klinga 01-aug 15h40 20 1.429 822B Splendens 14.88 4 45.45 Klinga Klinga 01-aug 15h55 21 1.353 823B Splendens 15.42 4 43.87 #Testing models with quadratic terms included (six original terms) originalfullmodel <- lm(fempref$Score ~ fempref$Patch.length + I(fempref$Patch.length^2) + fempref$Color.Score + I(fempref$Color.Score^2) + fempref$Size + I(fempref$Size^2)) originalfullmodel summary(originalfullmodel) anova(originalfullmodel) aov(originalfullmodel) AIC(originalfullmodel) reducedmodel1 <- lm(fempref$Score ~ fempref$Patch.length + I(fempref$Patch.length^2) + fempref$Color.Score + I(fempref$Color.Score^2) + fempref$Size) reducedmodel1 summary(reducedmodel1) anova(reducedmodel1) aov(reducedmodel1) AIC(reducedmodel1) anova(originalfullmodel,reducedmodel1) AIC(originalfullmodel,reducedmodel1) reducedmodel2 <- lm(fempref$Score ~ fempref$Patch.length + I(fempref$Patch.length^2) + fempref$Color.Score + I(fempref$Color.Score^2)) reducedmodel2 summary(reducedmodel2) anova(reducedmodel2) aov(reducedmodel2) AIC(reducedmodel2) anova(reducedmodel1,reducedmodel2) AIC(reducedmodel1,reducedmodel2) reducedmodel3 <- lm(fempref$Score ~ fempref$Patch.length + I(fempref$Patch.length^2) + fempref$Color.Score) reducedmodel3 summary(reducedmodel3) anova(reducedmodel3) aov(reducedmodel3) AIC(reducedmodel3) anova(reducedmodel2,reducedmodel3) AIC(reducedmodel2,reducedmodel3) anova(originalfullmodel,reducedmodel3) AIC(originalfullmodel,reducedmodel3) anova(traitpref1,reducedmodel3) AIC(traitpref1,reducedmodel3)