R version 3.3.3 (2017-03-06) -- "Another Canoe" Copyright (C) 2017 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. [R.app GUI 1.69 (7328) x86_64-apple-darwin13.4.0] > SynoData <-read.table("~/Desktop/SynoData.csv",header = TRUE, sep = ",") > mod1 <- aov(Jaw~Notochord*Species, data = SynoData) > summary(mod1) Df Sum Sq Mean Sq F value Pr(>F) Notochord 1 16.505 16.505 4713.590 < 2e-16 *** Species 1 0.090 0.090 25.746 1.2e-05 *** Notochord:Species 1 0.009 0.009 2.466 0.125 Residuals 36 0.126 0.004 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > mod2 <- aov(Jaw~Notochord+Species, data = SynoData) > summary(mod2) Df Sum Sq Mean Sq F value Pr(>F) Notochord 1 16.505 16.505 4533.93 < 2e-16 *** Species 1 0.090 0.090 24.77 1.52e-05 *** Residuals 37 0.135 0.004 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > anova(mod1,mod2) Analysis of Variance Table Model 1: Jaw ~ Notochord * Species Model 2: Jaw ~ Notochord + Species Res.Df RSS Df Sum of Sq F Pr(>F) 1 36 0.12606 2 37 0.13470 -1 -0.0086357 2.4662 0.1251 > multipunctatus <- subset(SynoData, Species=="Sm") > lucipinnis <- SynoData[SynoData$Species=='Sl',] > reg1 <- lm(Jaw~Notochord, data=multipunctatus); summary(reg1) Call: lm(formula = Jaw ~ Notochord, data = multipunctatus) Residuals: Min 1Q Median 3Q Max -0.152795 -0.040280 0.009648 0.049943 0.115375 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.04942 0.41826 0.118 0.907244 Notochord 0.22082 0.04748 4.650 0.000199 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.07308 on 18 degrees of freedom Multiple R-squared: 0.5458, Adjusted R-squared: 0.5205 F-statistic: 21.63 on 1 and 18 DF, p-value: 0.000199 > reg2 <- lm(Jaw~Notochord, data=lucipinnis); summary(reg2) Call: lm(formula = Jaw ~ Notochord, data = lucipinnis) Residuals: Min 1Q Median 3Q Max -0.039809 -0.021196 -0.015447 0.001653 0.122536 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.07949 0.15429 0.515 0.612714 Notochord 0.12760 0.03117 4.094 0.000682 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.04078 on 18 degrees of freedom Multiple R-squared: 0.4821, Adjusted R-squared: 0.4534 F-statistic: 16.76 on 1 and 18 DF, p-value: 0.0006819 > plot(Jaw~Notochord, data=SynoData, type='n') > points(multipunctatus$Notochord,multipunctatus$Jaw, pch=20) > points(lucipinnis$Notochord,lucipinnis$Jaw, pch=1) > abline(reg1, lty=1) > abline(reg2, lty=2) > legend("bottomright", c("S. multipunctatus","S. lucipinnis"), lty=c(1,2), pch=c(20,1))