This code chunk produces the first figure for our manuscript results.
Here we can make a table using the kable package in R to display site characteristics. These are piped directly from stand inventory data, processed in RMarkdown, and displayed.
| Site | Trees (/ha) | BA (m2/ha) |
|---|---|---|
| GCREW | 637.5 ± 57.3 | 44.6 ± 4 |
| Canoe Shed | 529.2 ± 93.8 | 40.4 ± 6 |
| North Branch | 806.9 ± 180.7 | 34.5 ± 7.8 |
Use the R’s power.t.test() function to calculate sampling requirements based on the standard deviation of Rs, the desired power of the test, and the allowable delta (difference from the true mean value):
| delta | 0.25 | 0.5 |
|---|---|---|
| 0.50 | 46 ± 21 | 105 ± 50 |
| 0.75 | 21 ± 9 | 48 ± 22 |
| 1.00 | 13 ± 5 | 27 ± 12 |
BA significance with distance
## # A tibble: 14 x 6
## Distance numDF denDF `F-value` `p-value` term
## <int> <int> <dbl> <dbl> <dbl> <chr>
## 1 2 1 370 5.55 1.90e- 2 BA_m2
## 2 3 1 584 32.2 2.24e- 8 BA_m2
## 3 4 1 702 23.8 1.30e- 6 BA_m2
## 4 5 1 747 55.0 3.27e-13 BA_m2
## 5 6 1 747 57.9 8.19e-14 BA_m2
## 6 7 1 747 39.7 5.13e-10 BA_m2
## 7 8 1 747 38.6 8.72e-10 BA_m2
## 8 9 1 747 56.5 1.60e-13 BA_m2
## 9 10 1 747 39.2 6.35e-10 BA_m2
## 10 11 1 748 31.8 2.46e- 8 BA_m2
## 11 12 1 748 28.7 1.14e- 7 BA_m2
## 12 13 1 749 29.5 7.71e- 8 BA_m2
## 13 14 1 747 30.7 4.12e- 8 BA_m2
## 14 15 1 747 8.03 4.74e- 3 BA_m2
## Response family link method Marginal Conditional
## 1 Flux gaussian identity none 0.7193038 0.7193038
## Linear mixed-effects model fit by maximum likelihood
## Data: dat
## AIC BIC logLik
## 662.7306 709.0243 -321.3653
##
## Random effects:
## Formula: ~1 | Site
## (Intercept) Residual
## StdDev: 1.746841e-05 0.3699403
##
## Fixed effects: log(Flux) ~ T5 * BA_m2 + T20 * BA_m2 + SMoisture + I(SMoisture^2)
## Value Std.Error DF t-value p-value
## (Intercept) -0.646690 0.1174650 747 -5.505386 0.0000
## T5 0.009611 0.0076290 747 1.259764 0.2081
## BA_m2 -0.046179 0.1634607 747 -0.282507 0.7776
## T20 0.084566 0.0091218 747 9.270764 0.0000
## SMoisture 3.526625 0.5576844 747 6.323693 0.0000
## I(SMoisture^2) -5.781701 0.8874114 747 -6.515244 0.0000
## T5:BA_m2 0.118048 0.0258358 747 4.569180 0.0000
## BA_m2:T20 -0.106056 0.0285469 747 -3.715151 0.0002
## Correlation:
## (Intr) T5 BA_m2 T20 SMostr I(SM^2 T5:BA_
## T5 -0.051
## BA_m2 -0.438 0.183
## T20 -0.264 -0.894 0.139
## SMoisture -0.751 -0.035 0.040 0.094
## I(SMoisture^2) 0.631 0.017 -0.046 -0.041 -0.968
## T5:BA_m2 0.032 -0.674 -0.291 0.597 0.038 -0.023
## BA_m2:T20 0.119 0.641 -0.034 -0.684 -0.051 0.034 -0.940
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -5.58765525 -0.50167257 -0.03542634 0.57066707 3.52778408
##
## Number of Observations: 757
## Number of Groups: 3
## numDF denDF F-value p-value
## (Intercept) 1 747 10049.073 <.0001
## T5 1 747 1693.594 <.0001
## BA_m2 1 747 55.003 <.0001
## T20 1 747 102.614 <.0001
## SMoisture 1 747 0.016 0.8994
## I(SMoisture^2) 1 747 41.869 <.0001
## T5:BA_m2 1 747 9.932 0.0017
## BA_m2:T20 1 747 13.802 0.0002
## [1] "Growing Season"
## Response family link method Marginal Conditional
## 1 Flux gaussian identity none 0.6451276 0.6480189
## Linear mixed-effects model fit by maximum likelihood
## Data: dat
## AIC BIC logLik
## 472.0213 517.2128 -226.0107
##
## Random effects:
## Formula: ~1 | Site
## (Intercept) Residual
## StdDev: 0.03053796 0.3369422
##
## Fixed effects: log(Flux) ~ T5 * BA_m2 + T20 * BA_m2 + SMoisture + I(SMoisture^2)
## Value Std.Error DF t-value p-value
## (Intercept) -0.206962 0.1221116 668 -1.694859 0.0906
## T5 -0.005497 0.0072441 668 -0.758778 0.4483
## BA_m2 -0.557802 0.1855757 668 -3.005791 0.0027
## T20 0.082368 0.0083722 668 9.838291 0.0000
## SMoisture 2.971274 0.5427234 668 5.474749 0.0000
## I(SMoisture^2) -4.976874 0.8835183 668 -5.633018 0.0000
## T5:BA_m2 0.131897 0.0266711 668 4.945291 0.0000
## BA_m2:T20 -0.095487 0.0277067 668 -3.446353 0.0006
## Correlation:
## (Intr) T5 BA_m2 T20 SMostr I(SM^2 T5:BA_
## T5 -0.149
## BA_m2 -0.428 0.280
## T20 -0.246 -0.857 0.078
## SMoisture -0.702 -0.009 0.006 0.085
## I(SMoisture^2) 0.580 -0.007 -0.010 -0.028 -0.966
## T5:BA_m2 0.019 -0.638 -0.450 0.565 0.079 -0.055
## BA_m2:T20 0.144 0.601 0.115 -0.672 -0.085 0.057 -0.933
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -6.16996733 -0.59345503 -0.03336197 0.56476986 3.58281300
##
## Number of Observations: 678
## Number of Groups: 3
## numDF denDF F-value p-value
## (Intercept) 1 668 4364.825 <.0001
## T5 1 668 969.230 <.0001
## BA_m2 1 668 45.839 <.0001
## T20 1 668 142.256 <.0001
## SMoisture 1 668 0.024 0.8759
## I(SMoisture^2) 1 668 29.454 <.0001
## T5:BA_m2 1 668 23.106 <.0001
## BA_m2:T20 1 668 11.877 0.0006
## [1] "Dormant Season"
## Response family link method Marginal Conditional
## 1 Flux gaussian identity none 0.4846261 0.4846261
## Linear mixed-effects model fit by maximum likelihood
## Data: dat
## AIC BIC logLik
## 119.7978 134.0145 -53.89892
##
## Random effects:
## Formula: ~1 | Site
## (Intercept) Residual
## StdDev: 1.154782e-05 0.4787036
##
## Fixed effects: log(Flux) ~ BA_m2 + T20 + SMoisture
## Value Std.Error DF t-value p-value
## (Intercept) -0.0327768 0.3978941 73 -0.082376 0.9346
## BA_m2 0.6791317 0.2445661 73 2.776885 0.0070
## T20 0.1221942 0.0191058 73 6.395667 0.0000
## SMoisture -1.7852317 0.8435204 73 -2.116406 0.0377
## Correlation:
## (Intr) BA_m2 T20
## BA_m2 0.019
## T20 -0.581 -0.056
## SMoisture -0.930 -0.215 0.333
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -2.0835973 -0.6571794 0.0452072 0.6846289 2.1639141
##
## Number of Observations: 79
## Number of Groups: 3
## numDF denDF F-value p-value
## (Intercept) 1 73 14.05957 0.0004
## BA_m2 1 73 5.04730 0.0277
## T20 1 73 56.67435 <.0001
## SMoisture 1 73 4.47917 0.0377
## [1] "Low Moisture"
## Response family link method Marginal Conditional
## 1 Flux gaussian identity none 0.4308833 0.4520464
## Linear mixed-effects model fit by maximum likelihood
## Data: dat
## AIC BIC logLik
## 3.747445 20.76316 5.126278
##
## Random effects:
## Formula: ~1 | Site
## (Intercept) Residual
## StdDev: 0.04301772 0.2250289
##
## Fixed effects: log(Flux) ~ T5 + BA_m2 + SMoisture + T5:BA_m2
## Value Std.Error DF t-value p-value
## (Intercept) 0.6998130 0.7691577 77 0.909843 0.3657
## T5 0.0286009 0.0329959 77 0.866802 0.3887
## BA_m2 -3.0816359 1.9095221 77 -1.613826 0.1107
## SMoisture 2.4404559 0.6447975 77 3.784841 0.0003
## T5:BA_m2 0.1561678 0.0834958 77 1.870368 0.0652
## Correlation:
## (Intr) T5 BA_m2 SMostr
## T5 -0.994
## BA_m2 -0.721 0.749
## SMoisture -0.333 0.244 -0.090
## T5:BA_m2 0.728 -0.758 -0.999 0.084
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -2.13075842 -0.61704463 -0.03618069 0.68048233 2.74295161
##
## Number of Observations: 84
## Number of Groups: 3
## numDF denDF F-value p-value
## (Intercept) 1 77 2159.9880 <.0001
## T5 1 77 9.8824 0.0024
## BA_m2 1 77 28.7686 <.0001
## SMoisture 1 77 13.2585 0.0005
## T5:BA_m2 1 77 3.4983 0.0652
## [1] "High Moisture"
## Response family link method Marginal Conditional
## 1 Flux gaussian identity none 0.694165 0.694165
## Linear mixed-effects model fit by maximum likelihood
## Data: dat
## AIC BIC logLik
## 417.441 444.8733 -201.7205
##
## Random effects:
## Formula: ~1 | Site
## (Intercept) Residual
## StdDev: 7.686839e-06 0.4161627
##
## Fixed effects: log(Flux) ~ T5 + BA_m2 + T20 + I(SMoisture^2)
## Value Std.Error DF t-value p-value
## (Intercept) 0.1502698 0.1235411 365 1.216354 0.2246
## T5 0.0574478 0.0102244 365 5.618674 0.0000
## BA_m2 0.3719253 0.0930155 365 3.998532 0.0001
## T20 0.0412225 0.0122494 365 3.365268 0.0008
## I(SMoisture^2) -2.7272007 0.5762887 365 -4.732351 0.0000
## Correlation:
## (Intr) T5 BA_m2 T20
## T5 -0.023
## BA_m2 -0.171 0.062
## T20 -0.103 -0.949 -0.067
## I(SMoisture^2) -0.865 -0.039 -0.087 0.038
##
## Standardized Within-Group Residuals:
## Min Q1 Med Q3 Max
## -4.92609265 -0.42826002 0.03806442 0.57796519 3.11462179
##
## Number of Observations: 372
## Number of Groups: 3
## numDF denDF F-value p-value
## (Intercept) 1 365 2746.8139 <.0001
## T5 1 365 776.9549 <.0001
## BA_m2 1 365 14.7118 1e-04
## T20 1 365 12.5768 4e-04
## I(SMoisture^2) 1 365 22.3952 <.0001