#Load in libraries
library(readr)
library(lme4)
## Loading required package: Matrix
library(car)
## Loading required package: carData
## Registered S3 methods overwritten by 'car':
##   method                          from
##   influence.merMod                lme4
##   cooks.distance.influence.merMod lme4
##   dfbeta.influence.merMod         lme4
##   dfbetas.influence.merMod        lme4
library(emmeans)
#Spring 2018 model
setwd("c:/users/Paul/Documents/Rwork")
springonedata<- read.csv(file="springonedata.csv")
str(springonedata)
## 'data.frame':    20 obs. of  12 variables:
##  $ Season           : int  64 64 64 64 64 64 64 64 64 64 ...
##  $ Time             : chr  "S1" "S1" "S1" "S1" ...
##  $ Site             : chr  "Kramer" "Rhinehart" "Bachelor" "Western" ...
##  $ Deer             : chr  "Con" "Con" "Con" "Con" ...
##  $ Honeysuckle      : chr  "H " "H " "H " "H " ...
##  $ Treatment        : chr  "ConH" "ConH" "ConH" "ConH" ...
##  $ min_OM           : num  29.9 22.9 36.6 27.7 66.1 ...
##  $ NetNitr_OM       : num  32 23.6 38.4 29.2 47.4 ...
##  $ Nmin             : num  1.24 0.85 0.96 0.88 1.57 1.86 1.16 1.02 2.79 1.45 ...
##  $ NetNitr          : num  1.32 1.16 0.99 0.98 1.64 1.63 1.22 0.7 2 1.37 ...
##  $ NitrateN         : num  22.5 19.7 16.9 16.7 27.9 ...
##  $ Soilmicrobialresp: num  39 25.9 43.5 41 34.2 ...
mean(springonedata)
## Warning in mean.default(springonedata): argument is not numeric or logical:
## returning NA
## [1] NA
modela <- lm(NetNitr_OM ~ Treatment,data = springonedata)
modelab <- lm(min_OM ~ Treatment,data = springonedata)
summary(modela)
## 
## Call:
## lm(formula = NetNitr_OM ~ Treatment, data = springonedata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -10.518  -4.061  -0.484   4.096  13.272 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      34.118      3.157  10.808 9.22e-09 ***
## TreatmentConNH   -5.732      4.464  -1.284    0.217    
## TreatmentExcH    -7.704      4.464  -1.726    0.104    
## TreatmentExcNH  -10.416      4.464  -2.333    0.033 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 7.059 on 16 degrees of freedom
## Multiple R-squared:  0.2683, Adjusted R-squared:  0.1311 
## F-statistic: 1.956 on 3 and 16 DF,  p-value: 0.1614
summary(modelab)
## 
## Call:
## lm(formula = min_OM ~ Treatment, data = springonedata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -13.770  -7.855  -0.703   4.098  29.470 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      36.630      4.893   7.487  1.3e-06 ***
## TreatmentConNH   -8.866      6.919  -1.281    0.218    
## TreatmentExcH    -8.898      6.919  -1.286    0.217    
## TreatmentExcNH  -11.634      6.919  -1.681    0.112    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.94 on 16 degrees of freedom
## Multiple R-squared:  0.1675, Adjusted R-squared:  0.01143 
## F-statistic: 1.073 on 3 and 16 DF,  p-value: 0.3883
anova(modela)
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##           Df Sum Sq Mean Sq F value Pr(>F)
## Treatment  3 292.36  97.452  1.9558 0.1614
## Residuals 16 797.24  49.827
anova(modelab)
## Analysis of Variance Table
## 
## Response: min_OM
##           Df  Sum Sq Mean Sq F value Pr(>F)
## Treatment  3  385.35  128.45  1.0732 0.3883
## Residuals 16 1915.02  119.69
modelaaov<-aov(NetNitr_OM ~ Treatment,data = springonedata)
posthoca <- TukeyHSD(x=modelaaov, 'Treatment', conf.level=0.95)
posthoca
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NetNitr_OM ~ Treatment, data = springonedata)
## 
## $Treatment
##                diff       lwr      upr     p adj
## ConNH-ConH   -5.732 -18.50477  7.04077 0.5855554
## ExcH-ConH    -7.704 -20.47677  5.06877 0.3433513
## ExcNH-ConH  -10.416 -23.18877  2.35677 0.1318043
## ExcH-ConNH   -1.972 -14.74477 10.80077 0.9702765
## ExcNH-ConNH  -4.684 -17.45677  8.08877 0.7238964
## ExcNH-ExcH   -2.712 -15.48477 10.06077 0.9282176
plot(posthoca)

#####Fall 2018 model
falldata<- read.csv(file="falldata.csv")
str(falldata)
## 'data.frame':    20 obs. of  12 variables:
##  $ Season           : int  293 293 293 293 293 293 293 293 293 293 ...
##  $ Time             : chr  "S3" "S3" "S3" "S3" ...
##  $ Site             : chr  "Kramer" "Rhinehart" "Bachelor" "Western" ...
##  $ Deer             : chr  "Con" "Con" "Con" "Con" ...
##  $ Honeysuckle      : chr  "H " "H " "H " "H " ...
##  $ Treatment        : chr  "ConH" "ConH" "ConH" "ConH" ...
##  $ min_OM           : num  5.34 4.06 6.57 6.31 2.63 ...
##  $ NetNitr_OM       : num  6.97 5.09 8.37 7.64 5.17 ...
##  $ Nmin             : num  1.2 0.52 0.44 0.41 0.39 0.89 0.87 0.83 1.08 0.82 ...
##  $ NetNitr          : num  1.17 0.68 0.54 0.55 0.56 0.94 0.99 0.74 0.75 0.77 ...
##  $ NitrateN         : num  24.5 14.4 11.4 11.4 11.7 ...
##  $ Soilmicrobialresp: num  13.5 12.9 18 16 12.4 ...
modelb <- lm(NetNitr_OM ~ Treatment,data = falldata)
summary(modelb)
## 
## Call:
## lm(formula = NetNitr_OM ~ Treatment, data = falldata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.940 -1.498 -0.036  1.015  7.620 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       6.648      1.220   5.449 5.36e-05 ***
## TreatmentConNH    0.142      1.726   0.082   0.9354    
## TreatmentExcH     4.642      1.726   2.690   0.0161 *  
## TreatmentExcNH   -0.352      1.726  -0.204   0.8409    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.728 on 16 degrees of freedom
## Multiple R-squared:  0.4133, Adjusted R-squared:  0.3033 
## F-statistic: 3.758 on 3 and 16 DF,  p-value: 0.03235
anova(modelb)
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##           Df  Sum Sq Mean Sq F value  Pr(>F)  
## Treatment  3  83.908 27.9693  3.7576 0.03235 *
## Residuals 16 119.094  7.4434                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
modelbaov<-aov(NetNitr_OM ~ Treatment,data = falldata)
posthocb <- TukeyHSD(x=modelbaov, 'Treatment', conf.level=0.95)
posthocb
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NetNitr_OM ~ Treatment, data = falldata)
## 
## $Treatment
##               diff        lwr         upr     p adj
## ConNH-ConH   0.142 -4.7946854  5.07868535 0.9997912
## ExcH-ConH    4.642 -0.2946854  9.57868535 0.0691009
## ExcNH-ConH  -0.352 -5.2886854  4.58468535 0.9968688
## ExcH-ConNH   4.500 -0.4366854  9.43668535 0.0805130
## ExcNH-ConNH -0.494 -5.4306854  4.44268535 0.9914977
## ExcNH-ExcH  -4.994 -9.9306854 -0.05731465 0.0469090
plot(posthocb)

####summer 2018 model
summerdata<- read.csv(file="summerdata.csv")
str(summerdata)
## 'data.frame':    20 obs. of  12 variables:
##  $ Season           : int  183 183 183 183 183 183 183 183 183 183 ...
##  $ Time             : chr  "S2" "S2" "S2" "S2" ...
##  $ Site             : chr  "Kramer" "Rhinehart" "Bachelor" "Western" ...
##  $ Deer             : chr  "Con" "Con" "Con" "Con" ...
##  $ Honeysuckle      : chr  "H " "H " "H " "H " ...
##  $ Treatment        : chr  "ConH" "ConH" "ConH" "ConH" ...
##  $ min_OM           : num  17.33 6.27 5.33 11.43 16.93 ...
##  $ NetNitr_OM       : num  16.9 7.8 7.6 13 11.7 ...
##  $ Nmin             : logi  NA NA NA NA NA NA ...
##  $ NetNitr          : logi  NA NA NA NA NA NA ...
##  $ NitrateN         : logi  NA NA NA NA NA NA ...
##  $ Soilmicrobialresp: logi  NA NA NA NA NA NA ...
modelc <- lm(NetNitr_OM ~ Treatment,data = summerdata)
summary(modelc)
## 
## Call:
## lm(formula = NetNitr_OM ~ Treatment, data = summerdata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -4.728 -3.405  0.308  1.877  5.530 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      11.420      1.499   7.620 1.04e-06 ***
## TreatmentConNH    0.976      2.120   0.460    0.651    
## TreatmentExcH    -0.416      2.120  -0.196    0.847    
## TreatmentExcNH   -0.962      2.120  -0.454    0.656    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.351 on 16 degrees of freedom
## Multiple R-squared:  0.05298,    Adjusted R-squared:  -0.1246 
## F-statistic: 0.2984 on 3 and 16 DF,  p-value: 0.8261
anova(modelc)
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##           Df  Sum Sq Mean Sq F value Pr(>F)
## Treatment  3  10.053  3.3511  0.2984 0.8261
## Residuals 16 179.706 11.2316
modelcaov<-aov(NetNitr_OM ~ Treatment,data = summerdata)
posthocc <- TukeyHSD(x=modelcaov, 'Treatment', conf.level=0.95)
posthocc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NetNitr_OM ~ Treatment, data = summerdata)
## 
## $Treatment
##               diff       lwr      upr     p adj
## ConNH-ConH   0.976 -5.088176 7.040176 0.9665731
## ExcH-ConH   -0.416 -6.480176 5.648176 0.9972078
## ExcNH-ConH  -0.962 -7.026176 5.102176 0.9679075
## ExcH-ConNH  -1.392 -7.456176 4.672176 0.9116377
## ExcNH-ConNH -1.938 -8.002176 4.126176 0.7976044
## ExcNH-ExcH  -0.546 -6.610176 5.518176 0.9937640
plot(posthocc)

###spring 2019 model
springtwodata<- read.csv(file="springtwodata.csv")
str(springtwodata)
## 'data.frame':    20 obs. of  12 variables:
##  $ Season           : int  137 137 137 137 137 137 137 137 137 137 ...
##  $ Time             : chr  "S4" "S4" "S4" "S4" ...
##  $ Site             : chr  "Kramer" "Rhinehart" "Bachelor" "Western" ...
##  $ Deer             : chr  "Con" "Con" "Con" "Con" ...
##  $ Honeysuckle      : chr  "H " "H " "H " "H " ...
##  $ Treatment        : chr  "ConH" "ConH" "ConH" "ConH" ...
##  $ min_OM           : num  10.32 7.98 19.54 18.73 6.4 ...
##  $ NetNitr_OM       : num  12.51 11.1 19.02 19.75 7.82 ...
##  $ Nmin             : logi  NA NA NA NA NA NA ...
##  $ NetNitr          : logi  NA NA NA NA NA NA ...
##  $ NitrateN         : logi  NA NA NA NA NA NA ...
##  $ Soilmicrobialresp: logi  NA NA NA NA NA NA ...
modeld <- lm(NetNitr_OM ~ Treatment,data = springtwodata)
summary(modeld)
## 
## Call:
## lm(formula = NetNitr_OM ~ Treatment, data = springtwodata)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.220 -3.217 -1.054  3.835  9.825 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      14.040      2.197   6.392 1.21e-05 ***
## TreatmentConNH   -2.295      3.295  -0.697   0.4967    
## TreatmentExcH    -6.650      3.106  -2.141   0.0491 *  
## TreatmentExcNH   -8.936      3.106  -2.877   0.0115 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 4.912 on 15 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.4008, Adjusted R-squared:  0.281 
## F-statistic: 3.345 on 3 and 15 DF,  p-value: 0.04767
anova(modeld)
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##           Df Sum Sq Mean Sq F value  Pr(>F)  
## Treatment  3 242.06  80.688  3.3447 0.04767 *
## Residuals 15 361.87  24.124                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
modeldaov<-aov(NetNitr_OM ~ Treatment,data = springtwodata)
posthocd <- TukeyHSD(x=modeldaov, 'Treatment', conf.level=0.95)
posthocd
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NetNitr_OM ~ Treatment, data = springtwodata)
## 
## $Treatment
##               diff       lwr        upr     p adj
## ConNH-ConH  -2.295 -11.79122 7.20122043 0.8968149
## ExcH-ConH   -6.650 -15.60312 2.30312248 0.1851614
## ExcNH-ConH  -8.936 -17.88912 0.01712248 0.0505198
## ExcH-ConNH  -4.355 -13.85122 5.14122043 0.5639729
## ExcNH-ConNH -6.641 -16.13722 2.85522043 0.2258424
## ExcNH-ExcH  -2.286 -11.23912 6.66712248 0.8811364
plot(posthocd)

######################All season NetNitrification model
allseasondata<- read.csv(file="allseasondata.csv")
str(allseasondata)
## 'data.frame':    80 obs. of  12 variables:
##  $ Season           : int  64 64 64 64 64 64 64 64 64 64 ...
##  $ Time             : chr  "Spring1" "Spring1" "Spring1" "Spring1" ...
##  $ Site             : chr  "Kramer" "Rhinehart" "Bachelor" "Western" ...
##  $ Deer             : chr  "Con" "Con" "Con" "Con" ...
##  $ Honeysuckle      : chr  "H " "H " "H " "H " ...
##  $ Treatment        : chr  "ConH" "ConH" "ConH" "ConH" ...
##  $ min_OM           : num  29.9 22.9 36.6 27.7 66.1 ...
##  $ NetNitr_OM       : num  32 23.6 38.4 29.2 47.4 ...
##  $ Nmin             : num  1.24 0.85 0.96 0.88 1.57 1.86 1.16 1.02 2.79 1.45 ...
##  $ NetNitr          : num  1.32 1.16 0.99 0.98 1.64 1.63 1.22 0.7 2 1.37 ...
##  $ NitrateN         : num  22.5 19.7 16.9 16.7 27.9 ...
##  $ Soilmicrobialresp: num  39 25.9 43.5 41 34.2 ...
model2 <- lm(NetNitr_OM ~ Treatment,data = allseasondata)
summary(model2)
## 
## Call:
## lm(formula = NetNitr_OM ~ Treatment, data = allseasondata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.274  -6.920  -3.537   5.057  30.834 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      16.557      2.179   7.597 6.94e-11 ***
## TreatmentConNH   -1.565      3.122  -0.501   0.6177    
## TreatmentExcH    -2.532      3.082  -0.822   0.4139    
## TreatmentExcNH   -5.167      3.082  -1.676   0.0978 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.746 on 75 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.038,  Adjusted R-squared:  -0.0004758 
## F-statistic: 0.9876 on 3 and 75 DF,  p-value: 0.4033
anova(model2)
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##           Df Sum Sq Mean Sq F value Pr(>F)
## Treatment  3  281.4  93.810  0.9876 0.4033
## Residuals 75 7123.8  94.984
model2aov<-aov(NetNitr_OM ~ Treatment,data = allseasondata)
posthoc2 <- TukeyHSD(x=model2aov, 'Treatment', conf.level=0.95)
posthoc2
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NetNitr_OM ~ Treatment, data = allseasondata)
## 
## $Treatment
##                   diff        lwr      upr     p adj
## ConNH-ConH  -1.5649211  -9.768849 6.639007 0.9585381
## ExcH-ConH   -2.5320000 -10.630066 5.566066 0.8440951
## ExcNH-ConH  -5.1665000 -13.264566 2.931566 0.3432866
## ExcH-ConNH  -0.9670789  -9.171007 7.236849 0.9896146
## ExcNH-ConNH -3.6015789 -11.805507 4.602349 0.6577468
## ExcNH-ExcH  -2.6345000 -10.732566 5.463566 0.8279144
plot(posthoc2)

###All season min_OM modeling
minmodel <- lm(min_OM ~ Treatment,data = allseasondata)
summary(minmodel)
## 
## Call:
## lm(formula = min_OM ~ Treatment, data = allseasondata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -13.786  -7.668  -4.308   4.337  49.684 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      16.416      2.546   6.447  9.9e-09 ***
## TreatmentConNH   -2.742      3.648  -0.752    0.455    
## TreatmentExcH    -3.226      3.601  -0.896    0.373    
## TreatmentExcNH   -5.078      3.601  -1.410    0.163    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 11.39 on 75 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.02645,    Adjusted R-squared:  -0.01249 
## F-statistic: 0.6792 on 3 and 75 DF,  p-value: 0.5675
anova(minmodel)
## Analysis of Variance Table
## 
## Response: min_OM
##           Df Sum Sq Mean Sq F value Pr(>F)
## Treatment  3  264.2  88.073  0.6792 0.5675
## Residuals 75 9725.2 129.669
minmodelaov<-aov(min_OM ~ Treatment,data = allseasondata)
minposthoc <- TukeyHSD(x=minmodelaov, 'Treatment', conf.level=0.95)
minposthoc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = min_OM ~ Treatment, data = allseasondata)
## 
## $Treatment
##                   diff       lwr      upr     p adj
## ConNH-ConH  -2.7417895 -12.32729 6.843715 0.8757130
## ExcH-ConH   -3.2265000 -12.68832 6.235316 0.8069236
## ExcNH-ConH  -5.0785000 -14.54032 4.383316 0.4969601
## ExcH-ConNH  -0.4847105 -10.07022 9.100794 0.9991549
## ExcNH-ConNH -2.3367105 -11.92222 7.248794 0.9185086
## ExcNH-ExcH  -1.8520000 -11.31382 7.609816 0.9554301
plot(minposthoc)

###All season Soilmicrobialresp_OM modeling
respmodel <- lm(Soilmicrobialresp ~ Treatment,data = allseasondata)
summary(respmodel)
## 
## Call:
## lm(formula = Soilmicrobialresp ~ Treatment, data = allseasondata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -16.140 -10.368  -4.973  11.396  30.681 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     22.3575     2.7923   8.007 1.07e-11 ***
## TreatmentConNH   2.1915     3.9489   0.555    0.581    
## TreatmentExcH    1.5100     3.9489   0.382    0.703    
## TreatmentExcNH  -0.2275     3.9489  -0.058    0.954    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 12.49 on 76 degrees of freedom
## Multiple R-squared:  0.0069, Adjusted R-squared:  -0.0323 
## F-statistic: 0.176 on 3 and 76 DF,  p-value: 0.9123
anova(respmodel)
## Analysis of Variance Table
## 
## Response: Soilmicrobialresp
##           Df  Sum Sq Mean Sq F value Pr(>F)
## Treatment  3    82.3  27.449   0.176 0.9123
## Residuals 76 11851.3 155.938
respmodelaov<-aov(Soilmicrobialresp ~ Treatment,data = allseasondata)
respposthoc <- TukeyHSD(x=respmodelaov, 'Treatment', conf.level=0.95)
respposthoc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = Soilmicrobialresp ~ Treatment, data = allseasondata)
## 
## $Treatment
##                diff        lwr       upr     p adj
## ConNH-ConH   2.1915  -8.181443 12.564443 0.9449221
## ExcH-ConH    1.5100  -8.862943 11.882943 0.9808364
## ExcNH-ConH  -0.2275 -10.600443 10.145443 0.9999307
## ExcH-ConNH  -0.6815 -11.054443  9.691443 0.9981572
## ExcNH-ConNH -2.4190 -12.791943  7.953943 0.9277825
## ExcNH-ExcH  -1.7375 -12.110443  8.635443 0.9713298
plot(respposthoc)

###All season NitrateN modeling
NNmodel <- lm(NitrateN ~ Treatment,data = allseasondata)
summary(NNmodel)
## 
## Call:
## lm(formula = NitrateN ~ Treatment, data = allseasondata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -11.418  -5.065  -1.122   4.343  16.510 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     16.7865     1.4170  11.847   <2e-16 ***
## TreatmentConNH  -1.1320     2.0039  -0.565   0.5738    
## TreatmentExcH    0.7235     2.0039   0.361   0.7191    
## TreatmentExcNH  -4.3185     2.0039  -2.155   0.0343 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.337 on 76 degrees of freedom
## Multiple R-squared:  0.08878,    Adjusted R-squared:  0.05281 
## F-statistic: 2.468 on 3 and 76 DF,  p-value: 0.06841
anova(NNmodel)
## Analysis of Variance Table
## 
## Response: NitrateN
##           Df  Sum Sq Mean Sq F value  Pr(>F)  
## Treatment  3  297.36  99.121  2.4683 0.06841 .
## Residuals 76 3051.94  40.157                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
NNmodelaov<-aov(NitrateN ~ Treatment,data = allseasondata)
NNposthoc <- TukeyHSD(x=NNmodelaov, 'Treatment', conf.level=0.95)
NNposthoc
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = NitrateN ~ Treatment, data = allseasondata)
## 
## $Treatment
##                diff        lwr       upr     p adj
## ConNH-ConH  -1.1320  -6.395897 4.1318972 0.9421571
## ExcH-ConH    0.7235  -4.540397 5.9873972 0.9837708
## ExcNH-ConH  -4.3185  -9.582397 0.9453972 0.1453840
## ExcH-ConNH   1.8555  -3.408397 7.1193972 0.7910620
## ExcNH-ConNH -3.1865  -8.450397 2.0773972 0.3903249
## ExcNH-ExcH  -5.0420 -10.305897 0.2218972 0.0654165
plot(NNposthoc)

####Split plot Analysis
library(agricolae)
trt= as.factor(allseasondata$Honeysuckle)
blc=as.factor(allseasondata$Time)
yr=as.factor(allseasondata$Deer)
model1=with(allseasondata, sp.plot(blc, yr, trt, NetNitr_OM))
## 
## ANALYSIS SPLIT PLOT:  NetNitr_OM 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: NetNitr_OM
##        Df Sum Sq Mean Sq F value  Pr(>F)  
## blc     3 5319.0 1772.98 20.5046 0.01678 *
## yr      1  173.8  173.80  2.0100 0.25129  
## Ea      3  259.4   86.47  0.6207 0.60422  
## trt     1   98.0   98.03  6.3256 0.04559 *
## yr:trt  1    4.2    4.18  0.2696 0.62218  
## Eb      6   93.0   15.50  0.6207 0.60422  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 65.3 %, cv(b) = 27.7 %, Mean = 14.23114
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla1=model1$gl.a
glb1=model1$gl.b
ea1=model1$Ea
eb1=model1$Eb
#lsd test for main, sub plot and interaction effects (NetNitr_OM)
Mainplot=with(allseasondata, LSD.test(NetNitr_OM, yr, gla1, ea1, console = TRUE))
## 
## Study: NetNitr_OM ~ yr
## 
## LSD t Test for NetNitr_OM 
## 
## Mean Square Error:  86.46739 
## 
## yr,  means and individual ( 95 %) CI
## 
##      NetNitr_OM       std  r       LCL      UCL  Min   Max
## Con    15.79410 10.688583 39 11.055449 20.53276 4.89 47.39
## Excl   12.70725  8.587012 40  8.028205 17.38630 1.30 36.98
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##      NetNitr_OM groups
## Con    15.79410      a
## Excl   12.70725      a
Subplot=with(allseasondata, LSD.test(NetNitr_OM, trt, glb1, eb1, console = TRUE))
## 
## Study: NetNitr_OM ~ trt
## 
## LSD t Test for NetNitr_OM 
## 
## Mean Square Error:  15.49668 
## 
## trt,  means and individual ( 95 %) CI
## 
##    NetNitr_OM       std  r      LCL      UCL  Min   Max
## H    15.29050 10.502839 40 13.76747 16.81353 1.75 47.39
## NH   13.14462  8.903325 39 11.60219 14.68704 1.30 32.38
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##    NetNitr_OM groups
## H    15.29050      a
## NH   13.14462      a
Interaction=LSD.test(allseasondata$NetNitr_OM, yr:trt, glb1, eb1, console = TRUE)
## 
## Study: allseasondata$NetNitr_OM ~ yr:trt
## 
## LSD t Test for allseasondata$NetNitr_OM 
## 
## Mean Square Error:  15.49668 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.NetNitr_OM       std  r       LCL      UCL  Min   Max
## Con:H                   16.55650 11.934784 20 14.402614 18.71039 5.09 47.39
## Con:NH                  14.99158  9.460844 19 12.781739 17.20142 4.89 32.38
## Excl:H                  14.02450  8.978404 20 11.870614 16.17839 1.75 36.98
## Excl:NH                 11.39000  8.190833 20  9.236114 13.54389 1.30 28.42
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$NetNitr_OM groups
## Con:H                   16.55650      a
## Con:NH                  14.99158      a
## Excl:H                  14.02450     ab
## Excl:NH                 11.39000      b
plot(Interaction,ylab= "N net nitrification_OM group means",main ="")

##########lsd test for main, sub plot and interaction effects (min_OM)
model2=with(allseasondata, sp.plot(blc, yr, trt, min_OM))
## 
## ANALYSIS SPLIT PLOT:  min_OM 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: min_OM
##        Df Sum Sq Mean Sq F value   Pr(>F)   
## blc     3 6755.2 2251.74 34.2468 0.008043 **
## yr      1  142.5  142.50  2.1672 0.237377   
## Ea      3  197.3   65.75  0.4053 0.749716   
## trt     1  115.9  115.94  5.0208 0.066281 . 
## yr:trt  1    5.7    5.73  0.2481 0.636118   
## Eb      6  138.5   23.09  0.4053 0.749716   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 59.4 %, cv(b) = 35.2 %, Mean = 13.65405
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla2=model2$gl.a
glb2=model2$gl.b
ea2=model2$Ea
eb2=model2$Eb
Mainplot=with(allseasondata, LSD.test(min_OM, yr, gla2, ea2, console = TRUE))
## 
## Study: min_OM ~ yr
## 
## LSD t Test for min_OM 
## 
## Mean Square Error:  65.75033 
## 
## yr,  means and individual ( 95 %) CI
## 
##        min_OM       std  r       LCL      UCL  Min   Max
## Con  15.08026 12.729022 39 10.948091 19.21242 2.63 66.10
## Excl 12.26350  9.708151 40  8.183313 16.34369 0.19 42.27
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##        min_OM groups
## Con  15.08026      a
## Excl 12.26350      a
Subplot=with(allseasondata, LSD.test(min_OM, trt, glb2, eb2, console = TRUE))
## 
## Study: min_OM ~ trt
## 
## LSD t Test for min_OM 
## 
## Mean Square Error:  23.09079 
## 
## trt,  means and individual ( 95 %) CI
## 
##      min_OM       std  r      LCL      UCL  Min   Max
## H  14.80275 12.967421 40 12.94363 16.66187 0.19 66.10
## NH 12.47590  9.353436 39 10.59309 14.35870 2.97 34.03
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##      min_OM groups
## H  14.80275      a
## NH 12.47590      a
Interaction2=LSD.test(allseasondata$min_OM, yr:trt, glb2, eb2, console = TRUE)
## 
## Study: allseasondata$min_OM ~ yr:trt
## 
## LSD t Test for allseasondata$min_OM 
## 
## Mean Square Error:  23.09079 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.min_OM       std  r       LCL      UCL  Min   Max
## Con:H               16.41600 15.160168 20 13.786805 19.04519 2.63 66.10
## Con:NH              13.67421  9.766820 19 10.976714 16.37171 4.19 34.03
## Excl:H              13.18950 10.480859 20 10.560305 15.81869 0.19 42.27
## Excl:NH             11.33750  9.044511 20  8.708305 13.96669 2.97 33.06
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## Groups according to probability of means differences and alpha level( 0.05 )
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$min_OM groups
## Con:H               16.41600      a
## Con:NH              13.67421     ab
## Excl:H              13.18950     ab
## Excl:NH             11.33750      b
plot(Interaction2,ylab= "N min_OM group means")

##########lsd test for main, sub plot and interaction effects (Soilmicrobialresp)
model3=with(allseasondata, sp.plot(blc, yr, trt, Soilmicrobialresp))
## 
## ANALYSIS SPLIT PLOT:  Soilmicrobialresp 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: Soilmicrobialresp
##        Df Sum Sq Mean Sq F value  Pr(>F)   
## blc     3 8467.5 2822.51 50.1716 0.00461 **
## yr      1    4.1    4.13  0.0734 0.80397   
## Ea      3  168.8   56.26  0.5154 0.67312   
## trt     1    1.0    1.03  0.0428 0.84293   
## yr:trt  1   77.2   77.19  3.2060 0.12356   
## Eb      6  144.4   24.07  0.5154 0.67312   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 32.3 %, cv(b) = 21.1 %, Mean = 23.226
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla3=model3$gl.a
glb3=model3$gl.b
ea3=model3$Ea
eb3=model3$Eb
Mainplot=with(allseasondata, LSD.test(Soilmicrobialresp, yr, gla3, ea3, console = TRUE))
## 
## Study: Soilmicrobialresp ~ yr
## 
## LSD t Test for Soilmicrobialresp 
## 
## Mean Square Error:  56.25718 
## 
## yr,  means and individual ( 95 %) CI
## 
##      Soilmicrobialresp      std  r      LCL      UCL   Min   Max
## Con           23.45325 11.92472 40 19.67909 27.22741 10.46 55.23
## Excl          22.99875 12.79395 40 19.22459 26.77291  5.99 51.66
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## least Significant Difference: 5.337465 
## 
## Treatments with the same letter are not significantly different.
## 
##      Soilmicrobialresp groups
## Con           23.45325      a
## Excl          22.99875      a
Subplot=with(allseasondata, LSD.test(Soilmicrobialresp, trt, glb3, eb3, console = TRUE))
## 
## Study: Soilmicrobialresp ~ trt
## 
## LSD t Test for Soilmicrobialresp 
## 
## Mean Square Error:  24.075 
## 
## trt,  means and individual ( 95 %) CI
## 
##    Soilmicrobialresp      std  r      LCL      UCL  Min   Max
## H            23.1125 12.03731 40 21.21417 25.01083 8.20 51.66
## NH           23.3395 12.69121 40 21.44117 25.23783 5.99 55.23
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 2.684643 
## 
## Treatments with the same letter are not significantly different.
## 
##    Soilmicrobialresp groups
## NH           23.3395      a
## H            23.1125      a
Interaction3=LSD.test(allseasondata$Soilmicrobialresp, yr:trt, glb3, eb3, console = TRUE)
## 
## Study: allseasondata$Soilmicrobialresp ~ yr:trt
## 
## LSD t Test for allseasondata$Soilmicrobialresp 
## 
## Mean Square Error:  24.075 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.Soilmicrobialresp      std  r      LCL      UCL   Min
## Con:H                           22.3575 11.00991 20 19.67286 25.04214 10.55
## Con:NH                          24.5490 12.96673 20 21.86436 27.23364 10.46
## Excl:H                          23.8675 13.22882 20 21.18286 26.55214  8.20
## Excl:NH                         22.1300 12.62517 20 19.44536 24.81464  5.99
##           Max
## Con:H   43.45
## Con:NH  55.23
## Excl:H  51.66
## Excl:NH 43.69
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 3.796658 
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$Soilmicrobialresp groups
## Con:NH                          24.5490      a
## Excl:H                          23.8675      a
## Con:H                           22.3575      a
## Excl:NH                         22.1300      a
plot(Interaction3,ylab= "Soil microbial respiration group means")

###Soil N minerilization modeling
model4=with(allseasondata, sp.plot(blc, yr, trt, Nmin))
## 
## ANALYSIS SPLIT PLOT:  Nmin 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: Nmin
##        Df Sum Sq Mean Sq F value  Pr(>F)  
## blc     3 7.2943 2.43144  8.3482 0.05745 .
## yr      1 0.0567 0.05671  0.1947 0.68889  
## Ea      3 0.8738 0.29125  0.3532 0.78693  
## trt     1 0.3740 0.37401  8.8903 0.02458 *
## yr:trt  1 0.3290 0.32896  7.8195 0.03132 *
## Eb      6 0.2524 0.04207  0.3532 0.78693  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 70.4 %, cv(b) = 26.7 %, Mean = 0.766875
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla4=model4$gl.a
glb4=model4$gl.b
ea4=model4$Ea
eb4=model4$Eb
Mainplot=with(allseasondata, LSD.test(Nmin, yr, gla4, ea4, console = TRUE))
## 
## Study: Nmin ~ yr
## 
## LSD t Test for Nmin 
## 
## Mean Square Error:  0.2912546 
## 
## yr,  means and individual ( 95 %) CI
## 
##         Nmin       std  r      LCL      UCL  Min  Max
## Con  0.74025 0.3536657 40 0.468689 1.011811 0.25 1.57
## Excl 0.79350 0.5132428 40 0.521939 1.065061 0.12 2.79
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## least Significant Difference: 0.3840453 
## 
## Treatments with the same letter are not significantly different.
## 
##         Nmin groups
## Excl 0.79350      a
## Con  0.74025      a
Subplot=with(allseasondata, LSD.test(Nmin, trt, glb4, eb4, console = TRUE))
## 
## Study: Nmin ~ trt
## 
## LSD t Test for Nmin 
## 
## Mean Square Error:  0.04206958 
## 
## trt,  means and individual ( 95 %) CI
## 
##       Nmin       std  r       LCL       UCL  Min  Max
## H  0.83525 0.5058022 40 0.7558953 0.9146047 0.12 2.79
## NH 0.69850 0.3528823 40 0.6191453 0.7778547 0.18 1.41
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 0.1122244 
## 
## Treatments with the same letter are not significantly different.
## 
##       Nmin groups
## H  0.83525      a
## NH 0.69850      b
Interaction4=LSD.test(allseasondata$Nmin, yr:trt, glb4, eb4, console = TRUE)
## 
## Study: allseasondata$Nmin ~ yr:trt
## 
## LSD t Test for allseasondata$Nmin 
## 
## Mean Square Error:  0.04206958 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.Nmin       std  r       LCL       UCL  Min  Max
## Con:H               0.7445 0.3649870 20 0.6322756 0.8567244 0.31 1.57
## Con:NH              0.7360 0.3514092 20 0.6237756 0.8482244 0.25 1.39
## Excl:H              0.9260 0.6120320 20 0.8137756 1.0382244 0.12 2.79
## Excl:NH             0.6610 0.3593840 20 0.5487756 0.7732244 0.18 1.41
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 0.1587093 
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$Nmin groups
## Excl:H              0.9260      a
## Con:H               0.7445      b
## Con:NH              0.7360      b
## Excl:NH             0.6610      b
plot(Interaction4,ylab= " N mineralization group means")

##########lsd test for main, sub plot and interaction effects (NetNitr)
model5=with(allseasondata, sp.plot(blc, yr, trt, NetNitr))
## 
## ANALYSIS SPLIT PLOT:  NetNitr 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: NetNitr
##        Df Sum Sq Mean Sq F value   Pr(>F)   
## blc     3 4.8344 1.61148  7.0286 0.071773 . 
## yr      1 0.0605 0.06050  0.2639 0.642912   
## Ea      3 0.6878 0.22928  0.0777 0.971856   
## trt     1 0.4805 0.48050 19.8499 0.004305 **
## yr:trt  1 0.1882 0.18818  7.7739 0.031654 * 
## Eb      6 0.1452 0.02421  0.0777 0.971856   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 59.8 %, cv(b) = 19.4 %, Mean = 0.8005
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla5=model5$gl.a
glb5=model5$gl.b
ea5=model5$Ea
eb5=model5$Eb
Mainplot=with(allseasondata, LSD.test(NetNitr, yr, gla5, ea5, console = TRUE))
## 
## Study: NetNitr ~ yr
## 
## LSD t Test for NetNitr 
## 
## Mean Square Error:  0.2292767 
## 
## yr,  means and individual ( 95 %) CI
## 
##      NetNitr       std  r       LCL      UCL  Min  Max
## Con    0.828 0.3303394 40 0.5870588 1.068941 0.34 1.64
## Excl   0.773 0.4206479 40 0.5320588 1.013941 0.05 2.00
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## least Significant Difference: 0.3407423 
## 
## Treatments with the same letter are not significantly different.
## 
##      NetNitr groups
## Con    0.828      a
## Excl   0.773      a
Subplot=with(allseasondata, LSD.test(NetNitr, trt, glb5, eb5, console = TRUE))
## 
## Study: NetNitr ~ trt
## 
## LSD t Test for NetNitr 
## 
## Mean Square Error:  0.02420667 
## 
## trt,  means and individual ( 95 %) CI
## 
##    NetNitr       std  r       LCL       UCL  Min Max
## H    0.878 0.3913828 40 0.8178056 0.9381944 0.30 2.0
## NH   0.723 0.3494553 40 0.6628056 0.7831944 0.05 1.4
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 0.08512768 
## 
## Treatments with the same letter are not significantly different.
## 
##    NetNitr groups
## H    0.878      a
## NH   0.723      b
Interaction5=LSD.test(allseasondata$NetNitr, yr:trt, glb5, eb5, console = TRUE)
## 
## Study: allseasondata$NetNitr ~ yr:trt
## 
## LSD t Test for allseasondata$NetNitr 
## 
## Mean Square Error:  0.02420667 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.NetNitr       std  r       LCL       UCL  Min  Max
## Con:H                   0.857 0.3348542 20 0.7718723 0.9421277 0.39 1.64
## Con:NH                  0.799 0.3318037 20 0.7138723 0.8841277 0.34 1.34
## Excl:H                  0.899 0.4487398 20 0.8138723 0.9841277 0.30 2.00
## Excl:NH                 0.647 0.3583456 20 0.5618723 0.7321277 0.05 1.40
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 0.1203887 
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$NetNitr groups
## Excl:H                  0.899      a
## Con:H                   0.857      a
## Con:NH                  0.799      a
## Excl:NH                 0.647      b
plot(Interaction5,ylab= " N net nitrification group means")

##########lsd test for main, sub plot and interaction effects (NitrateN)
model6=with(allseasondata, sp.plot(blc, yr, trt, NitrateN))
## 
## ANALYSIS SPLIT PLOT:  NitrateN 
## Class level information
## 
## yr   :  Con Excl 
## trt  :  H  NH 
## blc  :  Spring1 Summer Fall Spring2 
## 
## Number of observations:  80 
## 
## Analysis of Variance Table
## 
## Response: NitrateN
##        Df Sum Sq Mean Sq F value   Pr(>F)   
## blc     3 835.54 278.513  2.8971 0.202811   
## yr      1  30.33  30.332  0.3155 0.613547   
## Ea      3 288.41  96.135  0.1133 0.952039   
## trt     1 190.59 190.591 17.9716 0.005444 **
## yr:trt  1  76.44  76.441  7.2079 0.036306 * 
## Eb      6  63.63  10.605  0.1133 0.952039   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## cv(a) = 62.8 %, cv(b) = 20.9 %, Mean = 15.60475
#where fp is the name of datafile, trt, rep and yr are the column of the data table, yr = main plot factor, trt=subplot factor and blc=replications
gla6=model6$gl.a
glb6=model6$gl.b
ea6=model6$Ea
eb6=model6$Eb
Mainplot=with(allseasondata, LSD.test(NitrateN, yr, gla6, ea6, console = TRUE))
## 
## Study: NitrateN ~ yr
## 
## LSD t Test for NitrateN 
## 
## Mean Square Error:  96.13501 
## 
## yr,  means and individual ( 95 %) CI
## 
##      NitrateN      std  r      LCL      UCL  Min   Max
## Con   16.2205 5.785652 40 11.28681 21.15419 7.04 28.04
## Excl  14.9890 7.185261 40 10.05531 19.92269 1.05 34.02
## 
## Alpha: 0.05 ; DF Error: 3
## Critical Value of t: 3.182446 
## 
## least Significant Difference: 6.977292 
## 
## Treatments with the same letter are not significantly different.
## 
##      NitrateN groups
## Con   16.2205      a
## Excl  14.9890      a
Subplot=with(allseasondata, LSD.test(NitrateN, trt, glb6, eb6, console = TRUE))
## 
## Study: NitrateN ~ trt
## 
## LSD t Test for NitrateN 
## 
## Mean Square Error:  10.60514 
## 
## trt,  means and individual ( 95 %) CI
## 
##    NitrateN      std  r      LCL      UCL  Min   Max
## H  17.14825 6.631574 40 15.88832 18.40818 6.28 34.02
## NH 14.06125 6.083975 40 12.80132 15.32118 1.05 28.04
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 1.78181 
## 
## Treatments with the same letter are not significantly different.
## 
##    NitrateN groups
## H  17.14825      a
## NH 14.06125      b
Interaction6=LSD.test(allseasondata$NitrateN, yr:trt, glb6, eb6, console = TRUE)
## 
## Study: allseasondata$NitrateN ~ yr:trt
## 
## LSD t Test for allseasondata$NitrateN 
## 
## Mean Square Error:  10.60514 
## 
## yr:trt,  means and individual ( 95 %) CI
## 
##         allseasondata.NitrateN      std  r      LCL      UCL  Min   Max
## Con:H                  16.7865 5.691473 20 15.00469 18.56831 8.09 27.93
## Con:NH                 15.6545 5.970093 20 13.87269 17.43631 7.04 28.04
## Excl:H                 17.5100 7.589585 20 15.72819 19.29181 6.28 34.02
## Excl:NH                12.4680 5.915365 20 10.68619 14.24981 1.05 23.81
## 
## Alpha: 0.05 ; DF Error: 6
## Critical Value of t: 2.446912 
## 
## least Significant Difference: 2.51986 
## 
## Treatments with the same letter are not significantly different.
## 
##         allseasondata$NitrateN groups
## Excl:H                 17.5100      a
## Con:H                  16.7865      a
## Con:NH                 15.6545      a
## Excl:NH                12.4680      b
plot(Interaction6,ylab= "Nitrate nitrogen group means")