1.1 Factors: Canopy cover percent (continuous) ~ Ash dieback levels (categories)
#check normality of data
library(dplyr)
library(ggpubr)
library(car)
#change the colname of Canopy_cover_percent in Ash data
colnames(Ash)[colnames(Ash)=="Canopy_cover_percent"] <- "Canopy_cover"
colnames(Ash)[colnames(Ash)=="Ash_dieback"] <- "AD"
#the qq plot shows characteristic of binomial data
p <- ggqqplot(Ash$Canopy_cover)
p
#change the factor levels of AD
Ash$AD <- factor(Ash$AD, levels = c("low", "medium", "high"))
#boxplot
p <- ggboxplot(Ash, x="AD", y= "Canopy_cover",color = "AD", palette = c("#00AFBB", "#E7B800", "#FC4E07")) + labs(x="Extent of ash tree dieback", y = "Canopy Cover (%)") + geom_jitter(shape=19, position=position_jitter(0.2)) + geom_point() + theme(legend.position = "none")
p
#GLM of all three factors
library(MASS)
Canopy_AD <- glm(cbind(Canopy_cover,Canopy_not_cover) ~ AD, data=Ash, family=binomial)
non-integer counts in a binomial glm!
summary(Canopy_AD)
Call:
glm(formula = cbind(Canopy_cover, Canopy_not_cover) ~ AD, family = binomial,
data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.8170 -1.0968 -0.1488 1.4751 3.3650
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.41139 0.06808 -6.043 1.52e-09 ***
ADmedium -0.10631 0.09439 -1.126 0.26
ADhigh -1.04340 0.09639 -10.825 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 271.00 on 32 degrees of freedom
Residual deviance: 117.65 on 30 degrees of freedom
AIC: 280.69
Number of Fisher Scoring iterations: 4
step.model1 <- stepAIC(Canopy_AD, direction = "backward",
trace = FALSE)
non-integer #successes in a binomial glm!
summary(step.model1)
Call:
glm(formula = cbind(Canopy_cover, Canopy_not_cover) ~ AD, family = binomial,
data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.8170 -1.0968 -0.1488 1.4751 3.3650
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.41139 0.06808 -6.043 1.52e-09 ***
ADmedium -0.10631 0.09439 -1.126 0.26
ADhigh -1.04340 0.09639 -10.825 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 271.00 on 32 degrees of freedom
Residual deviance: 117.65 on 30 degrees of freedom
AIC: 280.69
Number of Fisher Scoring iterations: 4
Canopy_AD_BA <- glm(cbind(Canopy_cover,Canopy_not_cover) ~ AD * Understorey, data=Ash, family=binomial)
non-integer counts in a binomial glm!
summary(Canopy_AD_BA)
Call:
glm(formula = cbind(Canopy_cover, Canopy_not_cover) ~ AD * Understorey,
family = binomial, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.8910 -1.1736 -0.1596 1.4570 3.3494
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.49178 0.10304 -4.773 1.82e-06 ***
ADmedium -0.09076 0.17989 -0.504 0.614
ADhigh -0.96580 0.13703 -7.048 1.81e-12 ***
Understorey+ 0.14375 0.13734 1.047 0.295
ADmedium:Understorey+ -0.06288 0.21431 -0.293 0.769
ADhigh:Understorey+ -0.13726 0.19457 -0.705 0.481
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 271.00 on 32 degrees of freedom
Residual deviance: 116.31 on 27 degrees of freedom
AIC: 285.13
Number of Fisher Scoring iterations: 4
step.model2 <- stepAIC(Canopy_AD_BA, direction = "backward",
trace = FALSE)
non-integer #successes in a binomial glm!non-integer counts in a binomial glm!non-integer #successes in a binomial glm!non-integer #successes in a binomial glm!non-integer counts in a binomial glm!non-integer #successes in a binomial glm!
summary(step.model2)
Call:
glm(formula = cbind(Canopy_cover, Canopy_not_cover) ~ AD, family = binomial,
data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.8170 -1.0968 -0.1488 1.4751 3.3650
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.41139 0.06808 -6.043 1.52e-09 ***
ADmedium -0.10631 0.09439 -1.126 0.26
ADhigh -1.04340 0.09639 -10.825 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 271.00 on 32 degrees of freedom
Residual deviance: 117.65 on 30 degrees of freedom
AIC: 280.69
Number of Fisher Scoring iterations: 4
dropterm(step.model2,test = "Chisq")
non-integer #successes in a binomial glm!
Single term deletions
Model:
cbind(Canopy_cover, Canopy_not_cover) ~ AD
Df Deviance AIC LRT Pr(Chi)
<none> 117.65 280.69
AD 2 271.00 430.05 153.35 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#if dropped AD:BA, AIC increases, so don't drop
Canopy_AD_BA_2 <- glm(cbind(Canopy_cover,Canopy_not_cover) ~ AD + Understorey, data=Ash, family=binomial)
non-integer counts in a binomial glm!
anova(Canopy_AD_BA, Canopy_AD_BA_2, test="Chisq")
Analysis of Deviance Table
Model 1: cbind(Canopy_cover, Canopy_not_cover) ~ AD * Understorey
Model 2: cbind(Canopy_cover, Canopy_not_cover) ~ AD + Understorey
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 27 116.31
2 29 116.81 -2 -0.49918 0.7791
summary(Canopy_AD_BA_2)
Call:
glm(formula = cbind(Canopy_cover, Canopy_not_cover) ~ AD + Understorey,
family = binomial, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-3.8873 -1.1698 -0.1798 1.6026 3.1812
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.45418 0.08261 -5.498 3.84e-08 ***
ADmedium -0.12504 0.09658 -1.295 0.195
ADhigh -1.03396 0.09691 -10.669 < 2e-16 ***
Understorey+ 0.07675 0.08361 0.918 0.359
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 271.00 on 32 degrees of freedom
Residual deviance: 116.81 on 29 degrees of freedom
AIC: 281.82
Number of Fisher Scoring iterations: 4
anova(Canopy_AD_BA,Canopy_AD_BA_2)
Analysis of Deviance Table
Model 1: cbind(Canopy_cover, Canopy_not_cover) ~ AD * Understorey
Model 2: cbind(Canopy_cover, Canopy_not_cover) ~ AD + Understorey
Resid. Df Resid. Dev Df Deviance
1 27 116.31
2 29 116.81 -2 -0.49918
#therefore understorey and the interaction between AD and understorey are not important
Design a linear regression plot function
ggplotRegression <- function (fit) {
require(ggplot2)
ggplot(fit$model, aes_string(x = names(fit$model)[2], y = names(fit$model)[1])) +
geom_point() +
stat_smooth(method = "lm", col = "red") +
labs(title = paste("Adj R2 = ",signif(summary(fit)$adj.r.squared, 5),
"Intercept =",signif(fit$coef[[1]],5 ),
" Slope =",signif(fit$coef[[2]], 5),
" P =",signif(summary(fit)$coef[2,4], 5)))
}
Factor 2: temperature fluctuation vs AD & LAI
## Add temperature summaries to Ash data
Ash$Max_temp <- Temp_data$Max_temp[match(Ash$Site, Temp_data$Site)]
Ash$Min_temp <- Temp_data$Min_temp[match(Ash$Site, Temp_data$Site)]
Ash$Temp_range <- Temp_data$Temp_range[match(Ash$Site, Temp_data$Site)]
#Max temp vs AD
#test normality (not normal, SW test: p = 0.036)
p <- ggqqplot(Ash$Max_temp)
p
shapiro.test(Ash$Max_temp)
Shapiro-Wilk normality test
data: Ash$Max_temp
W = 0.93058, p-value = 0.03634
#boxplot of AD ~ Max temp
p <- ggboxplot(Ash, x="AD", y= "Max_temp",color = "AD", palette = c("#00AFBB", "#E7B800", "#FC4E07")) + labs(x="Extent of ash tree disback", y = "Maximum temerature (°C)") + geom_jitter(shape=19, position=position_jitter(0.2)) + geom_point() + theme(legend.position = "none")
p
#Wilcoxon rank sum test:
kruskal.test(Max_temp ~ AD, data = Ash)
Kruskal-Wallis rank sum test
data: Max_temp by AD
Kruskal-Wallis chi-squared = 13.316, df = 2, p-value = 0.001283
pairwise.wilcox.test(Ash$Max_temp, Ash$AD, p.adjust.method = "BH")
cannot compute exact p-value with tiescannot compute exact p-value with tiescannot compute exact p-value with ties
Pairwise comparisons using Wilcoxon rank sum test
data: Ash$Max_temp and Ash$AD
low medium
medium 0.9020 -
high 0.0045 0.0045
P value adjustment method: BH
#significance is between medium and high levels of AD (p=0.0045)
#Minimum Temp vs AD
p <- ggqqplot(Ash$Min_temp)
p
shapiro.test(Ash$Min_temp) #not normal again
Shapiro-Wilk normality test
data: Ash$Min_temp
W = 0.93681, p-value = 0.05489
p <- ggboxplot(Ash, x="AD", y= "Min_temp",color = "AD", palette = c("#00AFBB", "#E7B800", "#FC4E07")) + labs(x="Extent of ash tree disback", y = "Minimum temerature (°C)") + geom_jitter(shape=19, position=position_jitter(0.2)) + geom_point() + theme(legend.position = "none")
p
#Wilcoxon rank sum test:
kruskal.test(Min_temp ~ AD, data = Ash)
Kruskal-Wallis rank sum test
data: Min_temp by AD
Kruskal-Wallis chi-squared = 4.9176, df = 2, p-value = 0.08554
pairwise.wilcox.test(Ash$Min_temp, Ash$AD, p.adjust.method = "BH")
cannot compute exact p-value with tiescannot compute exact p-value with tiescannot compute exact p-value with ties
Pairwise comparisons using Wilcoxon rank sum test
data: Ash$Min_temp and Ash$AD
low medium
medium 0.62 -
high 0.16 0.16
P value adjustment method: BH
#no significance
#Temp range vs AD
p <- ggqqplot(Ash$Temp_range)
p
shapiro.test(Ash$Temp_range) #not very normal again
Shapiro-Wilk normality test
data: Ash$Temp_range
W = 0.93922, p-value = 0.0645
p <- ggboxplot(Ash, x="AD", y= "Temp_range",color = "AD", palette = c("#00AFBB", "#E7B800", "#FC4E07")) + labs(x="Extent of ash tree disback", y = "Temerature range (°C)") + geom_jitter(shape=19, position=position_jitter(0.2)) + geom_point() + theme(legend.position = "none")
p
kruskal.test(Temp_range ~ AD, data = Ash)
Kruskal-Wallis rank sum test
data: Temp_range by AD
Kruskal-Wallis chi-squared = 15.28, df = 2, p-value = 0.0004809
pairwise.wilcox.test(Ash$Temp_range, Ash$AD, p.adjust.method = "BH")
cannot compute exact p-value with tiescannot compute exact p-value with tiescannot compute exact p-value with ties
Pairwise comparisons using Wilcoxon rank sum test
data: Ash$Temp_range and Ash$AD
low medium
medium 0.8371 -
high 0.0021 0.0021
P value adjustment method: BH
#significance between medium and high (0.0021)
#temp ~ LAI
ggplotRegression(lm(Canopy_cover ~ Temp_range, data = Ash))
ggplotRegression(lm(Canopy_cover ~ Min_temp, data = Ash))
ggplotRegression(lm(Canopy_cover ~ Max_temp, data = Ash))
#temp_range ~ Understorey (p=0.02)
ttest_range <- t.test(Temp_range ~ Understorey, data = Ash)
ttest_range
Welch Two Sample t-test
data: Temp_range by Understorey
t = 2.4451, df = 30.966, p-value = 0.02037
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.2673485 2.9569623
sample estimates:
mean in group - mean in group +
12.89286 11.28070
#Max temp ~ understorey (p = 0.04)
ttest_max <- t.test(Max_temp ~ Understorey, data = Ash)
ttest_max
Welch Two Sample t-test
data: Max_temp by Understorey
t = 2.1134, df = 30.916, p-value = 0.04274
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
0.0467348 2.6337163
sample estimates:
mean in group - mean in group +
24.55952 23.21930
#Min temp ~ understorey (p=0.0036)
ttest_min <- t.test(Min_temp ~ Understorey, data = Ash)
ttest_min
Welch Two Sample t-test
data: Min_temp by Understorey
t = -3.1499, df = 30.877, p-value = 0.003614
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.44803140 -0.09582825
sample estimates:
mean in group - mean in group +
11.66667 11.93860
#GLM for temp range ~ AD * LAI
GLM_range_AD_LAI <- glm(Temp_range ~ AD * Canopy_cover, data = Ash)
summary(GLM_range_AD_LAI)
Call:
glm(formula = Temp_range ~ AD * Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0604 -0.9850 -0.4193 0.7151 2.6875
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.68377 2.41035 5.677 4.97e-06 ***
ADmedium -5.66302 2.95658 -1.915 0.0661 .
ADhigh 2.65398 2.63664 1.007 0.3231
Canopy_cover -0.07059 0.05930 -1.190 0.2443
ADmedium:Canopy_cover 0.14323 0.07399 1.936 0.0634 .
ADhigh:Canopy_cover -0.07683 0.07939 -0.968 0.3418
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 2.012371)
Null deviance: 139.320 on 32 degrees of freedom
Residual deviance: 54.334 on 27 degrees of freedom
AIC: 124.11
Number of Fisher Scoring iterations: 2
GLM_range_AD_LAI_model <- stepAIC(GLM_range_AD_LAI, direction = "backward", Trace = FALSE)
Start: AIC=124.11
Temp_range ~ AD * Canopy_cover
Df Deviance AIC
<none> 54.334 124.11
- AD:Canopy_cover 2 76.056 131.20
summary(GLM_range_AD_LAI_model)
Call:
glm(formula = Temp_range ~ AD * Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-2.0604 -0.9850 -0.4193 0.7151 2.6875
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.68377 2.41035 5.677 4.97e-06 ***
ADmedium -5.66302 2.95658 -1.915 0.0661 .
ADhigh 2.65398 2.63664 1.007 0.3231
Canopy_cover -0.07059 0.05930 -1.190 0.2443
ADmedium:Canopy_cover 0.14323 0.07399 1.936 0.0634 .
ADhigh:Canopy_cover -0.07683 0.07939 -0.968 0.3418
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 2.012371)
Null deviance: 139.320 on 32 degrees of freedom
Residual deviance: 54.334 on 27 degrees of freedom
AIC: 124.11
Number of Fisher Scoring iterations: 2
Anova(GLM_range_AD_LAI_model)
Analysis of Deviance Table (Type II tests)
Response: Temp_range
LR Chisq Df Pr(>Chisq)
AD 8.1816 2 0.01673 *
Canopy_cover 1.1153 1 0.29094
AD:Canopy_cover 10.7942 2 0.00453 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#GLM for temp range ~ AD * LAI * Understorey
GLM_range_AD_LAI_US <- glm(Temp_range ~ AD * Canopy_cover * Understorey, data = Ash)
summary(GLM_range_AD_LAI_US)
Call:
glm(formula = Temp_range ~ AD * Canopy_cover * Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.78877 -0.79380 -0.00246 0.42453 2.94694
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 15.34262 3.59668 4.266 0.000344 ***
ADmedium -33.94241 44.56550 -0.762 0.454750
ADhigh 0.45235 3.85771 0.117 0.907770
Canopy_cover -0.08589 0.09303 -0.923 0.366371
Understorey+ -4.81944 4.81865 -1.000 0.328617
ADmedium:Canopy_cover 0.93515 1.24276 0.752 0.460119
ADhigh:Canopy_cover -0.03233 0.11597 -0.279 0.783118
ADmedium:Understorey+ 31.00502 44.71288 0.693 0.495642
ADhigh:Understorey+ 6.01953 5.25033 1.147 0.264483
Canopy_cover:Understorey+ 0.07083 0.12016 0.589 0.561817
ADmedium:Canopy_cover:Understorey+ -0.84392 1.24583 -0.677 0.505549
ADhigh:Canopy_cover:Understorey+ -0.13526 0.15817 -0.855 0.402116
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.892805)
Null deviance: 139.320 on 32 degrees of freedom
Residual deviance: 39.749 on 21 degrees of freedom
AIC: 125.79
Number of Fisher Scoring iterations: 2
GLM_range_AD_LAI_US_model <- stepAIC(GLM_range_AD_LAI_US, direction = "backward", Trace = FALSE)
Start: AIC=125.79
Temp_range ~ AD * Canopy_cover * Understorey
Df Deviance AIC
- AD:Canopy_cover:Understorey 2 41.852 123.49
<none> 39.749 125.79
Step: AIC=123.49
Temp_range ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
AD:Understorey + Canopy_cover:Understorey
Df Deviance AIC
- AD:Understorey 2 43.421 120.71
- Canopy_cover:Understorey 1 41.885 121.52
<none> 41.852 123.49
- AD:Canopy_cover 2 57.826 130.16
Step: AIC=120.71
Temp_range ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey
Df Deviance AIC
<none> 43.421 120.71
- Canopy_cover:Understorey 1 47.858 121.92
- AD:Canopy_cover 2 69.476 132.22
summary(GLM_range_AD_LAI_US_model)
Call:
glm(formula = Temp_range ~ AD + Canopy_cover + Understorey +
AD:Canopy_cover + Canopy_cover:Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.87982 -0.89283 0.06472 0.43748 2.92255
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 12.175030 2.435591 4.999 3.74e-05 ***
ADmedium -5.599137 2.789417 -2.007 0.0556 .
ADhigh 3.699850 2.492636 1.484 0.1502
Canopy_cover -0.007482 0.063814 -0.117 0.9076
Understorey+ 1.004402 1.319920 0.761 0.4538
ADmedium:Canopy_cover 0.152287 0.069947 2.177 0.0391 *
ADhigh:Canopy_cover -0.108977 0.075069 -1.452 0.1590
Canopy_cover:Understorey+ -0.068042 0.042572 -1.598 0.1225
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.736857)
Null deviance: 139.320 on 32 degrees of freedom
Residual deviance: 43.421 on 25 degrees of freedom
AIC: 120.71
Number of Fisher Scoring iterations: 2
Anova(GLM_range_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Temp_range
LR Chisq Df Pr(>Chisq)
AD 7.6994 2 0.0212856 *
Canopy_cover 0.9391 1 0.3325155
Understorey 3.7285 1 0.0534916 .
AD:Canopy_cover 15.0008 2 0.0005529 ***
Canopy_cover:Understorey 2.5545 1 0.1099830
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
dropterm(GLM_range_AD_LAI_US_model,test = "Chisq")
Single term deletions
Model:
Temp_range ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey
Df Deviance AIC scaled dev. Pr(Chi)
<none> 43.421 120.71
AD:Canopy_cover 2 69.476 132.22 15.5108 0.0004284 ***
Canopy_cover:Understorey 1 47.858 121.92 3.2105 0.0731658 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
GLM_range_AD_LAI_US_model<- update(GLM_range_AD_LAI_US_model, . ~ .-Canopy_cover:Understorey)
Anova(GLM_range_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Temp_range
LR Chisq Df Pr(>Chisq)
AD 7.3157 2 0.02579 *
Canopy_cover 0.8861 1 0.34654
Understorey 3.5182 1 0.06070 .
AD:Canopy_cover 11.7995 2 0.00274 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#GLM for temp Max ~ AD * LAI
GLM_Max_AD_LAI <- glm(Max_temp ~ AD * Canopy_cover, data = Ash)
summary(GLM_Max_AD_LAI)
Call:
glm(formula = Max_temp ~ AD * Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8176 -0.8271 -0.3953 0.7564 2.9415
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 25.68355 2.33850 10.983 1.83e-11 ***
ADmedium -6.09723 2.86845 -2.126 0.0428 *
ADhigh 2.21083 2.55805 0.864 0.3951
Canopy_cover -0.07337 0.05753 -1.275 0.2131
ADmedium:Canopy_cover 0.15631 0.07179 2.177 0.0384 *
ADhigh:Canopy_cover -0.06698 0.07703 -0.870 0.3922
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.894189)
Null deviance: 126.682 on 32 degrees of freedom
Residual deviance: 51.143 on 27 degrees of freedom
AIC: 122.11
Number of Fisher Scoring iterations: 2
GLM_Max_AD_LAI_model <- stepAIC(GLM_Max_AD_LAI, direction = "backward", Trace = FALSE)
Start: AIC=122.11
Max_temp ~ AD * Canopy_cover
Df Deviance AIC
<none> 51.143 122.11
- AD:Canopy_cover 2 74.062 130.33
summary(GLM_Max_AD_LAI_model)
Call:
glm(formula = Max_temp ~ AD * Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8176 -0.8271 -0.3953 0.7564 2.9415
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 25.68355 2.33850 10.983 1.83e-11 ***
ADmedium -6.09723 2.86845 -2.126 0.0428 *
ADhigh 2.21083 2.55805 0.864 0.3951
Canopy_cover -0.07337 0.05753 -1.275 0.2131
ADmedium:Canopy_cover 0.15631 0.07179 2.177 0.0384 *
ADhigh:Canopy_cover -0.06698 0.07703 -0.870 0.3922
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.894189)
Null deviance: 126.682 on 32 degrees of freedom
Residual deviance: 51.143 on 27 degrees of freedom
AIC: 122.11
Number of Fisher Scoring iterations: 2
Anova(GLM_Max_AD_LAI_model)
Analysis of Deviance Table (Type II tests)
Response: Max_temp
LR Chisq Df Pr(>Chisq)
AD 7.7053 2 0.021223 *
Canopy_cover 0.7674 1 0.381034
AD:Canopy_cover 12.0995 2 0.002358 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#GLM for temp Max ~ AD * LAI * Understorey
GLM_Max_AD_LAI_US <- glm(Max_temp ~ AD * Canopy_cover * Understorey, data = Ash)
summary(GLM_Max_AD_LAI_US)
Call:
glm(formula = Max_temp ~ AD * Canopy_cover * Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.9710 -0.5837 -0.1009 0.3097 3.1769
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 26.79143 3.60185 7.438 2.59e-07 ***
ADmedium -25.94961 44.62949 -0.581 0.567
ADhigh 0.44560 3.86325 0.115 0.909
Canopy_cover -0.07795 0.09316 -0.837 0.412
Understorey+ -3.60592 4.82557 -0.747 0.463
ADmedium:Canopy_cover 0.71490 1.24455 0.574 0.572
ADhigh:Canopy_cover -0.03279 0.11613 -0.282 0.780
ADmedium:Understorey+ 21.94467 44.77708 0.490 0.629
ADhigh:Understorey+ 5.07734 5.25787 0.966 0.345
Canopy_cover:Understorey+ 0.04689 0.12033 0.390 0.701
ADmedium:Canopy_cover:Understorey+ -0.59748 1.24762 -0.479 0.637
ADhigh:Canopy_cover:Understorey+ -0.11248 0.15840 -0.710 0.485
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.898244)
Null deviance: 126.682 on 32 degrees of freedom
Residual deviance: 39.863 on 21 degrees of freedom
AIC: 125.89
Number of Fisher Scoring iterations: 2
GLM_Max_AD_LAI_US_model <- stepAIC(GLM_Max_AD_LAI_US, direction = "backward", Trace = FALSE)
Start: AIC=125.89
Max_temp ~ AD * Canopy_cover * Understorey
Df Deviance AIC
- AD:Canopy_cover:Understorey 2 41.168 122.95
<none> 39.863 125.89
Step: AIC=122.95
Max_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
AD:Understorey + Canopy_cover:Understorey
Df Deviance AIC
- AD:Understorey 2 42.417 119.93
- Canopy_cover:Understorey 1 41.294 121.05
<none> 41.168 122.95
- AD:Canopy_cover 2 58.533 130.56
Step: AIC=119.93
Max_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey
Df Deviance AIC
<none> 42.417 119.93
- Canopy_cover:Understorey 1 47.405 121.60
- AD:Canopy_cover 2 70.065 132.50
summary(GLM_Max_AD_LAI_US_model)
Call:
glm(formula = Max_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.8336 -0.6947 -0.2494 0.4118 3.1440
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 24.07697 2.40724 10.002 3.19e-10 ***
ADmedium -6.22059 2.75695 -2.256 0.0330 *
ADhigh 3.20641 2.46362 1.301 0.2050
Canopy_cover -0.01028 0.06307 -0.163 0.8719
Understorey+ 1.35145 1.30456 1.036 0.3101
ADmedium:Canopy_cover 0.16890 0.06913 2.443 0.0220 *
ADhigh:Canopy_cover -0.09738 0.07420 -1.312 0.2013
Canopy_cover:Understorey+ -0.07215 0.04208 -1.715 0.0988 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 1.696661)
Null deviance: 126.682 on 32 degrees of freedom
Residual deviance: 42.417 on 25 degrees of freedom
AIC: 119.93
Number of Fisher Scoring iterations: 2
Anova(GLM_Max_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Max_temp
LR Chisq Df Pr(>Chisq)
AD 7.3700 2 0.0250973 *
Canopy_cover 0.6320 1 0.4266055
Understorey 2.2029 1 0.1377498
AD:Canopy_cover 16.2957 2 0.0002894 ***
Canopy_cover:Understorey 2.9405 1 0.0863865 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
dropterm(GLM_Max_AD_LAI_US_model,test = "Chisq")
Single term deletions
Model:
Max_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey
Df Deviance AIC scaled dev. Pr(Chi)
<none> 42.417 119.93
AD:Canopy_cover 2 70.065 132.50 16.5621 0.0002533 ***
Canopy_cover:Understorey 1 47.405 121.60 3.6696 0.0554138 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
GLM_Max_AD_LAI_US_model<- update(GLM_Max_AD_LAI_US_model, . ~ .-Canopy_cover:Understorey)
Anova(GLM_Max_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Max_temp
LR Chisq Df Pr(>Chisq)
AD 6.8254 2 0.032952 *
Canopy_cover 0.5882 1 0.443135
Understorey 2.0499 1 0.152214
AD:Canopy_cover 12.5201 2 0.001911 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
dropterm(GLM_Max_AD_LAI_US_model,test = "Chisq")
Single term deletions
Model:
Max_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover
Df Deviance AIC scaled dev. Pr(Chi)
<none> 47.405 121.60
Understorey 1 51.143 122.11 2.5044 0.113532
AD:Canopy_cover 2 70.233 130.57 12.9717 0.001525 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
GLM_Max_AD_LAI_US_model<- update(GLM_Max_AD_LAI_US_model, . ~ .-Understorey)
Anova(GLM_Max_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Max_temp
LR Chisq Df Pr(>Chisq)
AD 7.7053 2 0.021223 *
Canopy_cover 0.7674 1 0.381034
AD:Canopy_cover 12.0995 2 0.002358 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#GLM for temp min ~ AD * LAI
GLM_Min_AD_LAI <- glm(Min_temp ~ AD * Canopy_cover, data = Ash)
summary(GLM_Min_AD_LAI)
Call:
glm(formula = Min_temp ~ AD * Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.56263 -0.17650 0.04136 0.13546 0.40756
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.999780 0.463834 25.871 <2e-16 ***
ADmedium -0.434208 0.568948 -0.763 0.452
ADhigh -0.443150 0.507381 -0.873 0.390
Canopy_cover -0.002782 0.011411 -0.244 0.809
ADmedium:Canopy_cover 0.013078 0.014238 0.918 0.366
ADhigh:Canopy_cover 0.009854 0.015278 0.645 0.524
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.07452019)
Null deviance: 2.6077 on 32 degrees of freedom
Residual deviance: 2.0120 on 27 degrees of freedom
AIC: 15.337
Number of Fisher Scoring iterations: 2
GLM_Min_AD_LAI_model <- stepAIC(GLM_Min_AD_LAI, direction = "backward", Trace = FALSE)
Start: AIC=15.34
Min_temp ~ AD * Canopy_cover
Df Deviance AIC
- AD:Canopy_cover 2 2.076 12.369
<none> 2.012 15.337
Step: AIC=12.37
Min_temp ~ AD + Canopy_cover
Df Deviance AIC
- AD 2 2.1527 9.5664
- Canopy_cover 1 2.1615 11.7018
<none> 2.0760 12.3692
Step: AIC=9.57
Min_temp ~ Canopy_cover
Df Deviance AIC
<none> 2.1527 9.5664
- Canopy_cover 1 2.6077 13.8952
summary(GLM_Min_AD_LAI_model)
Call:
glm(formula = Min_temp ~ Canopy_cover, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.50704 -0.15187 0.02257 0.15022 0.54313
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.547142 0.117198 98.53 <2e-16 ***
Canopy_cover 0.009138 0.003569 2.56 0.0156 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.06944061)
Null deviance: 2.6077 on 32 degrees of freedom
Residual deviance: 2.1527 on 31 degrees of freedom
AIC: 9.5664
Number of Fisher Scoring iterations: 2
Anova(GLM_Min_AD_LAI_model)
Analysis of Deviance Table (Type II tests)
Response: Min_temp
LR Chisq Df Pr(>Chisq)
Canopy_cover 6.5536 1 0.01047 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#GLM for temp Min ~ AD * LAI * Understorey
GLM_Min_AD_LAI_US <- glm(Min_temp ~ AD * Canopy_cover * Understorey, data = Ash)
summary(GLM_Min_AD_LAI_US)
Call:
glm(formula = Min_temp ~ AD * Canopy_cover * Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.58851 -0.11486 0.04274 0.16721 0.37070
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.4488113 0.6940087 16.497 1.7e-13 ***
ADmedium 7.9928023 8.5992744 0.929 0.363
ADhigh -0.0067449 0.7443768 -0.009 0.993
Canopy_cover 0.0079370 0.0179510 0.442 0.663
Understorey+ 1.2135219 0.9297979 1.305 0.206
ADmedium:Canopy_cover -0.2202512 0.2398013 -0.918 0.369
ADhigh:Canopy_cover -0.0004561 0.0223764 -0.020 0.984
ADmedium:Understorey+ -9.0603475 8.6277122 -1.050 0.306
ADhigh:Understorey+ -0.9421920 1.0130936 -0.930 0.363
Canopy_cover:Understorey+ -0.0239408 0.0231851 -1.033 0.314
ADmedium:Canopy_cover:Understorey+ 0.2464467 0.2403934 1.025 0.317
ADhigh:Canopy_cover:Understorey+ 0.0227779 0.0305198 0.746 0.464
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.07047446)
Null deviance: 2.6077 on 32 degrees of freedom
Residual deviance: 1.4800 on 21 degrees of freedom
AIC: 17.202
Number of Fisher Scoring iterations: 2
GLM_Min_AD_LAI_US_model <- stepAIC(GLM_Min_AD_LAI_US, direction = "backward", Trace = FALSE)
Start: AIC=17.2
Min_temp ~ AD * Canopy_cover * Understorey
Df Deviance AIC
- AD:Canopy_cover:Understorey 2 1.5859 15.484
<none> 1.4800 17.202
Step: AIC=15.48
Min_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
AD:Understorey + Canopy_cover:Understorey
Df Deviance AIC
- AD:Understorey 2 1.6219 12.225
- AD:Canopy_cover 2 1.7112 13.993
- Canopy_cover:Understorey 1 1.6163 14.110
<none> 1.5859 15.484
Step: AIC=12.22
Min_temp ~ AD + Canopy_cover + Understorey + AD:Canopy_cover +
Canopy_cover:Understorey
Df Deviance AIC
- AD:Canopy_cover 2 1.7212 10.184
- Canopy_cover:Understorey 1 1.6381 10.553
<none> 1.6219 12.225
Step: AIC=10.18
Min_temp ~ AD + Canopy_cover + Understorey + Canopy_cover:Understorey
Df Deviance AIC
- AD 2 1.7392 6.5278
- Canopy_cover:Understorey 1 1.7295 8.3433
<none> 1.7212 10.1841
Step: AIC=6.53
Min_temp ~ Canopy_cover + Understorey + Canopy_cover:Understorey
Df Deviance AIC
- Canopy_cover:Understorey 1 1.7517 4.7650
<none> 1.7392 6.5278
Step: AIC=4.76
Min_temp ~ Canopy_cover + Understorey
Df Deviance AIC
<none> 1.7517 4.7650
- Canopy_cover 1 2.0117 7.3315
- Understorey 1 2.1527 9.5664
summary(GLM_Min_AD_LAI_US_model)
Call:
glm(formula = Min_temp ~ Canopy_cover + Understorey, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.60047 -0.13191 -0.01464 0.17141 0.43851
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.476757 0.110776 103.60 <2e-16 ***
Canopy_cover 0.007099 0.003364 2.11 0.0433 *
Understorey+ 0.229240 0.087483 2.62 0.0137 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.05839075)
Null deviance: 2.6077 on 32 degrees of freedom
Residual deviance: 1.7517 on 30 degrees of freedom
AIC: 4.765
Number of Fisher Scoring iterations: 2
Anova(GLM_Min_AD_LAI_US_model)
Analysis of Deviance Table (Type II tests)
Response: Min_temp
LR Chisq Df Pr(>Chisq)
Canopy_cover 4.4523 1 0.034854 *
Understorey 6.8664 1 0.008783 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
dropterm(GLM_Min_AD_LAI_US_model,test = "Chisq")
Single term deletions
Model:
Min_temp ~ Canopy_cover + Understorey
Df Deviance AIC scaled dev. Pr(Chi)
<none> 1.7517 4.7650
Canopy_cover 1 2.0117 7.3315 4.5665 0.032603 *
Understorey 1 2.1527 9.5664 6.8014 0.009108 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Factor 3: Soil moisture ~ AD
p <- ggqqplot(Ash$Soil_moisture_ave)
p
shapiro.test(Ash$Soil_moisture_ave) #the data is normally distributed
Shapiro-Wilk normality test
data: Ash$Soil_moisture_ave
W = 0.94762, p-value = 0.1133
p <- ggboxplot(Ash, x="AD", y= "Soil_moisture_ave",color = "AD", palette = c("#00AFBB", "#E7B800", "#FC4E07")) + labs(x="Extent of ash tree disback", y = "Soil moisture(m^3/m^3)") + geom_jitter(shape=19, position=position_jitter(0.2)) + geom_point() + theme(legend.position = "none")
p
SM_AD <- aov(Soil_moisture_ave ~ AD,data = Ash)
summary(SM_AD)
Df Sum Sq Mean Sq F value Pr(>F)
AD 2 0.01015 0.005074 3.288 0.0511 .
Residuals 30 0.04629 0.001543
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
TukeyHSD(SM_AD)#significance between low and high(p=0.042)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = Soil_moisture_ave ~ AD, data = Ash)
$AD
diff lwr upr p adj
medium-low 0.03041111 -0.014082207 0.07490443 0.2274018
high-low 0.04275397 0.001380884 0.08412705 0.0416947
high-medium 0.01234286 -0.027751278 0.05243699 0.7306348
#soil moisture vs LAI
ggplotRegression(lm(Canopy_cover ~ Soil_moisture_ave, data = Ash))
ggplotRegression(lm(Temp_range ~ Soil_moisture_ave, data = Ash))
#Soil moisture ~ Understorey (no significant difference)
ttest_soil <- t.test(Soil_moisture_ave ~ Understorey, data = Ash)
ttest_soil
Welch Two Sample t-test
data: Soil_moisture_ave by Understorey
t = 0.034764, df = 18.24, p-value = 0.9726
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-0.03392985 0.03507271
sample estimates:
mean in group - mean in group +
0.1635714 0.1630000
#GLM for soil ~ AD * LAI * temp
GLM_soil_AD_LAI_T <- glm(Soil_moisture_ave ~ AD * Canopy_cover * Temp_range, data = Ash)
summary(GLM_soil_AD_LAI_T)
Call:
glm(formula = Soil_moisture_ave ~ AD * Canopy_cover * Temp_range,
data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.081414 -0.015334 -0.000157 0.009398 0.079531
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.921634 0.800870 -1.151 0.2628
ADmedium 1.597247 0.866373 1.844 0.0794 .
ADhigh 1.257761 0.855518 1.470 0.1563
Canopy_cover 0.029502 0.021059 1.401 0.1758
Temp_range 0.099348 0.074217 1.339 0.1950
ADmedium:Canopy_cover -0.042537 0.022391 -1.900 0.0713 .
ADhigh:Canopy_cover -0.031984 0.024499 -1.306 0.2058
ADmedium:Temp_range -0.153826 0.081514 -1.887 0.0730 .
ADhigh:Temp_range -0.106541 0.077253 -1.379 0.1824
Canopy_cover:Temp_range -0.002795 0.001983 -1.409 0.1735
ADmedium:Canopy_cover:Temp_range 0.004172 0.002123 1.965 0.0628 .
ADhigh:Canopy_cover:Temp_range 0.002742 0.002197 1.248 0.2257
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.001540647)
Null deviance: 0.056436 on 32 degrees of freedom
Residual deviance: 0.032354 on 21 degrees of freedom
AIC: -108.96
Number of Fisher Scoring iterations: 2
GLM_soil_AD_LAI_T_model <- stepAIC(GLM_soil_AD_LAI_T, direction = "backward", Trace = FALSE)
Start: AIC=-108.96
Soil_moisture_ave ~ AD * Canopy_cover * Temp_range
Df Deviance AIC
<none> 0.032354 -108.96
- AD:Canopy_cover:Temp_range 2 0.039195 -106.63
summary(GLM_soil_AD_LAI_T_model)
Call:
glm(formula = Soil_moisture_ave ~ AD * Canopy_cover * Temp_range,
data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.081414 -0.015334 -0.000157 0.009398 0.079531
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.921634 0.800870 -1.151 0.2628
ADmedium 1.597247 0.866373 1.844 0.0794 .
ADhigh 1.257761 0.855518 1.470 0.1563
Canopy_cover 0.029502 0.021059 1.401 0.1758
Temp_range 0.099348 0.074217 1.339 0.1950
ADmedium:Canopy_cover -0.042537 0.022391 -1.900 0.0713 .
ADhigh:Canopy_cover -0.031984 0.024499 -1.306 0.2058
ADmedium:Temp_range -0.153826 0.081514 -1.887 0.0730 .
ADhigh:Temp_range -0.106541 0.077253 -1.379 0.1824
Canopy_cover:Temp_range -0.002795 0.001983 -1.409 0.1735
ADmedium:Canopy_cover:Temp_range 0.004172 0.002123 1.965 0.0628 .
ADhigh:Canopy_cover:Temp_range 0.002742 0.002197 1.248 0.2257
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.001540647)
Null deviance: 0.056436 on 32 degrees of freedom
Residual deviance: 0.032354 on 21 degrees of freedom
AIC: -108.96
Number of Fisher Scoring iterations: 2
Anova(GLM_soil_AD_LAI_T_model)
Analysis of Deviance Table (Type II tests)
Response: Soil_moisture_ave
LR Chisq Df Pr(>Chisq)
AD 3.3845 2 0.1841
Canopy_cover 0.3254 1 0.5684
Temp_range 0.2573 1 0.6120
AD:Canopy_cover 3.4023 2 0.1825
AD:Temp_range 0.1561 2 0.9249
Canopy_cover:Temp_range 0.8539 1 0.3555
AD:Canopy_cover:Temp_range 4.4405 2 0.1086
#GLM for soil ~ AD * LAI * Temp * Understorey
GLM_soil_AD_LAI_US_T <- glm(Soil_moisture_ave ~ AD * Canopy_cover * Understorey * Temp_range, data = Ash)
summary(GLM_soil_AD_LAI_US_T)
Call:
glm(formula = Soil_moisture_ave ~ AD * Canopy_cover * Understorey *
Temp_range, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.091963 -0.005916 0.000000 0.007173 0.067235
Coefficients: (3 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.410475 3.132171 -0.450 0.661
ADmedium -4.641804 9.130635 -0.508 0.620
ADhigh 2.045804 3.207693 0.638 0.536
Canopy_cover 0.040000 0.075404 0.530 0.605
Understorey+ -4.247619 4.497782 -0.944 0.364
Temp_range 0.138347 0.261234 0.530 0.606
ADmedium:Canopy_cover 0.254839 0.377279 0.675 0.512
ADhigh:Canopy_cover -0.054820 0.081101 -0.676 0.512
ADmedium:Understorey+ 10.975472 12.160898 0.903 0.385
ADhigh:Understorey+ 3.769302 4.460876 0.845 0.415
Canopy_cover:Understorey+ 0.017857 0.029918 0.597 0.562
ADmedium:Temp_range -0.608677 0.441100 -1.380 0.193
ADhigh:Temp_range -0.166987 0.266042 -0.628 0.542
Canopy_cover:Temp_range -0.003638 0.006381 -0.570 0.579
Understorey+:Temp_range 0.415972 0.414460 1.004 0.335
ADmedium:Canopy_cover:Understorey+ -0.325623 0.359603 -0.906 0.383
ADhigh:Canopy_cover:Understorey+ 0.001494 0.017834 0.084 0.935
ADmedium:Canopy_cover:Temp_range 0.006459 0.006999 0.923 0.374
ADhigh:Canopy_cover:Temp_range 0.004513 0.006763 0.667 0.517
ADmedium:Understorey+:Temp_range NA NA NA NA
ADhigh:Understorey+:Temp_range -0.382201 0.409328 -0.934 0.369
Canopy_cover:Understorey+:Temp_range -0.001455 0.002648 -0.550 0.593
ADmedium:Canopy_cover:Understorey+:Temp_range NA NA NA NA
ADhigh:Canopy_cover:Understorey+:Temp_range NA NA NA NA
(Dispersion parameter for gaussian family taken to be 0.002317415)
Null deviance: 0.056436 on 32 degrees of freedom
Residual deviance: 0.027809 on 12 degrees of freedom
AIC: -95.954
Number of Fisher Scoring iterations: 2
GLM_soil_AD_LAI_US_T_model <- stepAIC(GLM_soil_AD_LAI_US_T, direction = "backward", Trace = FALSE)
Start: AIC=-95.95
Soil_moisture_ave ~ AD * Canopy_cover * Understorey * Temp_range
Step: AIC=-95.95
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Understorey + Canopy_cover:Understorey +
AD:Temp_range + Canopy_cover:Temp_range + Understorey:Temp_range +
AD:Canopy_cover:Understorey + AD:Canopy_cover:Temp_range +
AD:Understorey:Temp_range + Canopy_cover:Understorey:Temp_range
Df Deviance AIC
- AD:Canopy_cover:Understorey 1 0.027825 -97.935
- Canopy_cover:Understorey:Temp_range 1 0.028509 -97.134
<none> 0.027809 -95.954
- AD:Canopy_cover:Temp_range 2 0.031546 -95.793
- AD:Understorey:Temp_range 1 0.029829 -95.639
Step: AIC=-97.93
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Understorey + Canopy_cover:Understorey +
AD:Temp_range + Canopy_cover:Temp_range + Understorey:Temp_range +
AD:Canopy_cover:Temp_range + AD:Understorey:Temp_range +
Canopy_cover:Understorey:Temp_range
Df Deviance AIC
- Canopy_cover:Understorey:Temp_range 1 0.028608 -99.019
- AD:Understorey:Temp_range 2 0.030794 -98.589
<none> 0.027825 -97.935
- AD:Canopy_cover:Temp_range 2 0.034539 -94.802
Step: AIC=-99.02
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Understorey + Canopy_cover:Understorey +
AD:Temp_range + Canopy_cover:Temp_range + Understorey:Temp_range +
AD:Canopy_cover:Temp_range + AD:Understorey:Temp_range
Df Deviance AIC
- Canopy_cover:Understorey 1 0.028651 -100.969
- AD:Understorey:Temp_range 2 0.031078 -100.286
<none> 0.028608 -99.019
- AD:Canopy_cover:Temp_range 2 0.034826 -96.528
Step: AIC=-100.97
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Understorey + AD:Temp_range + Canopy_cover:Temp_range +
Understorey:Temp_range + AD:Canopy_cover:Temp_range + AD:Understorey:Temp_range
Df Deviance AIC
- AD:Understorey:Temp_range 2 0.031161 -102.20
<none> 0.028651 -100.97
- AD:Canopy_cover:Temp_range 2 0.036844 -96.67
Step: AIC=-102.2
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Understorey + AD:Temp_range + Canopy_cover:Temp_range +
Understorey:Temp_range + AD:Canopy_cover:Temp_range
Df Deviance AIC
- AD:Understorey 2 0.031721 -105.61
- Understorey:Temp_range 1 0.031178 -104.18
<none> 0.031161 -102.20
- AD:Canopy_cover:Temp_range 2 0.037025 -100.51
Step: AIC=-105.61
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Temp_range + Canopy_cover:Temp_range +
Understorey:Temp_range + AD:Canopy_cover:Temp_range
Df Deviance AIC
- Understorey:Temp_range 1 0.031944 -107.38
<none> 0.031721 -105.61
- AD:Canopy_cover:Temp_range 2 0.038694 -103.05
Step: AIC=-107.38
Soil_moisture_ave ~ AD + Canopy_cover + Understorey + Temp_range +
AD:Canopy_cover + AD:Temp_range + Canopy_cover:Temp_range +
AD:Canopy_cover:Temp_range
Df Deviance AIC
- Understorey 1 0.032354 -108.96
<none> 0.031944 -107.38
- AD:Canopy_cover:Temp_range 2 0.039192 -104.63
Step: AIC=-108.96
Soil_moisture_ave ~ AD + Canopy_cover + Temp_range + AD:Canopy_cover +
AD:Temp_range + Canopy_cover:Temp_range + AD:Canopy_cover:Temp_range
Df Deviance AIC
<none> 0.032354 -108.96
- AD:Canopy_cover:Temp_range 2 0.039195 -106.63
summary(GLM_soil_AD_LAI_US_T_model)
Call:
glm(formula = Soil_moisture_ave ~ AD + Canopy_cover + Temp_range +
AD:Canopy_cover + AD:Temp_range + Canopy_cover:Temp_range +
AD:Canopy_cover:Temp_range, data = Ash)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.081414 -0.015334 -0.000157 0.009398 0.079531
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.921634 0.800870 -1.151 0.2628
ADmedium 1.597247 0.866373 1.844 0.0794 .
ADhigh 1.257761 0.855518 1.470 0.1563
Canopy_cover 0.029502 0.021059 1.401 0.1758
Temp_range 0.099348 0.074217 1.339 0.1950
ADmedium:Canopy_cover -0.042537 0.022391 -1.900 0.0713 .
ADhigh:Canopy_cover -0.031984 0.024499 -1.306 0.2058
ADmedium:Temp_range -0.153826 0.081514 -1.887 0.0730 .
ADhigh:Temp_range -0.106541 0.077253 -1.379 0.1824
Canopy_cover:Temp_range -0.002795 0.001983 -1.409 0.1735
ADmedium:Canopy_cover:Temp_range 0.004172 0.002123 1.965 0.0628 .
ADhigh:Canopy_cover:Temp_range 0.002742 0.002197 1.248 0.2257
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for gaussian family taken to be 0.001540647)
Null deviance: 0.056436 on 32 degrees of freedom
Residual deviance: 0.032354 on 21 degrees of freedom
AIC: -108.96
Number of Fisher Scoring iterations: 2
Anova(GLM_soil_AD_LAI_US_T_model)
Analysis of Deviance Table (Type II tests)
Response: Soil_moisture_ave
LR Chisq Df Pr(>Chisq)
AD 3.3845 2 0.1841
Canopy_cover 0.3254 1 0.5684
Temp_range 0.2573 1 0.6120
AD:Canopy_cover 3.4023 2 0.1825
AD:Temp_range 0.1561 2 0.9249
Canopy_cover:Temp_range 0.8539 1 0.3555
AD:Canopy_cover:Temp_range 4.4405 2 0.1086
dropterm(GLM_soil_AD_LAI_US_T_model,test = "Chisq")
Single term deletions
Model:
Soil_moisture_ave ~ AD + Canopy_cover + Temp_range + AD:Canopy_cover +
AD:Temp_range + Canopy_cover:Temp_range + AD:Canopy_cover:Temp_range
Df Deviance AIC scaled dev. Pr(Chi)
<none> 0.032354 -108.96
AD:Canopy_cover:Temp_range 2 0.039195 -106.63 6.33 0.04221 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Factor 4: herb layer (NO MORE INTERACTION FROM NOW ON, MODEL OVERFIT)
Anova(Ash_glm)
Analysis of Deviance Table (Type II tests)
Response: cbind(Ash_percent, (100 - Ash_percent))
LR Chisq Df Pr(>Chisq)
AD 1.62824 2 0.4430
Tree_dens 0.18887 1 0.6639
Canopy_cover 1.14095 1 0.2855
Temp_range 0.37471 1 0.5404
Soil_moisture_ave 0.10502 1 0.7459
Factor 5: invertebrate species