The evidence graphs of the data transformations:
garlicmustard <- read.csv("C:\\Users\\Gabriela Krochmal\\Downloads\\ENVS 286 Garlic Mustard Data.csv")
seedPodNosqrt <- sqrt(garlicmustard$seedPodNo)
qqnorm(seedPodNosqrt)
qqline(seedPodNosqrt) #Transformed the seedPodNo data by square rooting it
flowerNosqrt <- sqrt(garlicmustard$flowerNo)
qqnorm(flowerNosqrt)
qqline(flowerNosqrt) #Transformed the flowerNo data by square rooting it
leafNosqrt <- sqrt(garlicmustard$leafNo)
qqnorm(leafNosqrt)
qqline(leafNosqrt) #Transformed the leafNo data by square rooting it
The linear models of the most & least correlated comparisons:
garlicmustard6.LM <- lm(flowerNosqrt ~ seedPodNosqrt, data=garlicmustard)
plot(garlicmustard6.LM)
summary(garlicmustard6.LM) #linear model of flowerno vs seedpodno
##
## Call:
## lm(formula = flowerNosqrt ~ seedPodNosqrt, data = garlicmustard)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2794 -0.6691 0.1808 1.1853 2.2704
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.85032 0.82657 1.029 0.3159
## seedPodNosqrt 0.14095 0.07814 1.804 0.0863 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.568 on 20 degrees of freedom
## Multiple R-squared: 0.1399, Adjusted R-squared: 0.09693
## F-statistic: 3.254 on 1 and 20 DF, p-value: 0.08633
garlicmustard8.LM <- lm(leafNosqrt ~ seedPodNosqrt, data=garlicmustard)
plot(garlicmustard8.LM)
summary(garlicmustard8.LM) #linear model of leafno vs seedpodno
##
## Call:
## lm(formula = leafNosqrt ~ seedPodNosqrt, data = garlicmustard)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7007 -0.7509 0.1496 0.6007 2.2339
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.02570 0.55995 3.618 0.00172 **
## seedPodNosqrt 0.56280 0.05293 10.633 1.12e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.062 on 20 degrees of freedom
## Multiple R-squared: 0.8497, Adjusted R-squared: 0.8422
## F-statistic: 113.1 on 1 and 20 DF, p-value: 1.117e-09
Conclusion: The overall linear regression model for leaf number vs seed pod number was the most correlated. This comparison had a p-value of 1.117e-09, and a r-squared value of 0.8422. The linear regression model for flower number vs seed pod number was the least correlated. This comparison had a p-value of 0.08633, and a r-squared value of 0.09693. I did a square root data transformation for the flower number, seed pod number, and the leaf number variables. This transformation made my data more number. An ecological reason why the leaf number and seed pod number is the most correlated is because with more leaves there is more photosynthesis occuring which produces energy from the glucose, this energy can be used to make more seed pods. An ecological reason why the flower number and seed pod number is the least correlated is because the flowers are the reproduction part of a plant and that would not have a relationship with the amount of seed pods.