Surface Rate of Spread Residual Testing

# Posterior predictive check
pp_check(S_ROS_model_student, type = "dens_overlay")  # compare observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(S_ROS_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_ROS <- residuals(S_ROS_model_student)
fitted_vals_ROS <- fitted(S_ROS_model_student)

# Plot residuals vs fitted
plot(fitted_vals_ROS, resid_student_ROS,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_ROS, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(S_ROS_model_student)$fixed  # won't show nu
##                                          Estimate  Est.Error     l-95% CI
## Intercept                             2.511273604 0.02073910  2.469097133
## StatusInvaded                         1.025970853 0.04187374  0.941143287
## Live_Fuel_MoistureHigh               -0.513618527 0.01612774 -0.544097242
## Live_Fuel_MoistureLow                 0.707636590 0.01656283  0.675919029
## Dead_Fuel_MoistureHigh               -0.456874403 0.01675007 -0.490165458
## Dead_Fuel_MoistureLow                 0.492721061 0.01503063  0.462711996
## Live_BiomassHigh                     -0.186199522 0.01575937 -0.217052054
## Live_BiomassLow                       0.264094822 0.01558078  0.232500419
## Dead_BiomassHigh                      0.099240873 0.01572093  0.069251938
## Dead_BiomassLow                      -0.071685261 0.01507310 -0.100975675
## Litter_BiomassHigh                    0.303972652 0.01526024  0.274280749
## Litter_BiomassLow                    -0.692763597 0.01740764 -0.728351065
## StatusInvaded:Live_Fuel_MoistureHigh  0.002078916 0.03365383 -0.065202082
## StatusInvaded:Live_Fuel_MoistureLow  -0.242774234 0.03522497 -0.311138535
## StatusInvaded:Dead_Fuel_MoistureHigh -0.649751744 0.04700543 -0.744018972
## StatusInvaded:Dead_Fuel_MoistureLow   0.058191173 0.03500799 -0.009941134
## StatusInvaded:Live_BiomassHigh        0.221020030 0.04043025  0.139894987
## StatusInvaded:Live_BiomassLow        -0.462692211 0.03373972 -0.527750953
## StatusInvaded:Dead_BiomassHigh        0.646514629 0.03780767  0.572669754
## StatusInvaded:Dead_BiomassLow        -0.475944771 0.03853137 -0.549239941
## StatusInvaded:Litter_BiomassHigh      0.795463312 0.03329553  0.731206934
## StatusInvaded:Litter_BiomassLow      -0.378212163 0.05357327 -0.485337763
##                                         u-95% CI      Rhat Bulk_ESS Tail_ESS
## Intercept                             2.55255276 0.9999055 3227.766 3056.570
## StatusInvaded                         1.10480795 1.0005969 2577.376 2789.308
## Live_Fuel_MoistureHigh               -0.48218797 1.0006090 3820.049 3162.781
## Live_Fuel_MoistureLow                 0.74119637 0.9996957 4044.098 2938.329
## Dead_Fuel_MoistureHigh               -0.42369666 1.0005611 3773.369 3205.671
## Dead_Fuel_MoistureLow                 0.52251922 1.0001984 3884.464 2789.502
## Live_BiomassHigh                     -0.15493574 1.0009358 3237.898 2816.943
## Live_BiomassLow                       0.29383807 1.0000568 3773.973 3247.681
## Dead_BiomassHigh                      0.12951127 1.0015556 3805.688 3224.138
## Dead_BiomassLow                      -0.04194931 1.0006062 3846.894 2646.284
## Litter_BiomassHigh                    0.33384514 1.0009480 4380.233 3263.215
## Litter_BiomassLow                    -0.65962723 1.0001342 3905.716 3091.310
## StatusInvaded:Live_Fuel_MoistureHigh  0.06606601 0.9998534 3226.453 2914.847
## StatusInvaded:Live_Fuel_MoistureLow  -0.17357121 0.9996544 3539.131 2852.619
## StatusInvaded:Dead_Fuel_MoistureHigh -0.55829003 1.0019644 2496.743 2643.952
## StatusInvaded:Dead_Fuel_MoistureLow   0.12850577 1.0008385 2805.162 2395.458
## StatusInvaded:Live_BiomassHigh        0.29864875 1.0015006 3130.156 2914.754
## StatusInvaded:Live_BiomassLow        -0.39898642 1.0000175 3373.746 3259.485
## StatusInvaded:Dead_BiomassHigh        0.72037310 1.0001074 3205.672 2996.156
## StatusInvaded:Dead_BiomassLow        -0.39946557 1.0006108 2613.347 3042.981
## StatusInvaded:Litter_BiomassHigh      0.86023915 1.0009495 3398.122 3037.051
## StatusInvaded:Litter_BiomassLow      -0.27498673 1.0017877 2819.408 3003.406
fixef(S_ROS_model_student)          # for fixed effects
##                                          Estimate  Est.Error         Q2.5
## Intercept                             2.511273604 0.02073910  2.469097133
## StatusInvaded                         1.025970853 0.04187374  0.941143287
## Live_Fuel_MoistureHigh               -0.513618527 0.01612774 -0.544097242
## Live_Fuel_MoistureLow                 0.707636590 0.01656283  0.675919029
## Dead_Fuel_MoistureHigh               -0.456874403 0.01675007 -0.490165458
## Dead_Fuel_MoistureLow                 0.492721061 0.01503063  0.462711996
## Live_BiomassHigh                     -0.186199522 0.01575937 -0.217052054
## Live_BiomassLow                       0.264094822 0.01558078  0.232500419
## Dead_BiomassHigh                      0.099240873 0.01572093  0.069251938
## Dead_BiomassLow                      -0.071685261 0.01507310 -0.100975675
## Litter_BiomassHigh                    0.303972652 0.01526024  0.274280749
## Litter_BiomassLow                    -0.692763597 0.01740764 -0.728351065
## StatusInvaded:Live_Fuel_MoistureHigh  0.002078916 0.03365383 -0.065202082
## StatusInvaded:Live_Fuel_MoistureLow  -0.242774234 0.03522497 -0.311138535
## StatusInvaded:Dead_Fuel_MoistureHigh -0.649751744 0.04700543 -0.744018972
## StatusInvaded:Dead_Fuel_MoistureLow   0.058191173 0.03500799 -0.009941134
## StatusInvaded:Live_BiomassHigh        0.221020030 0.04043025  0.139894987
## StatusInvaded:Live_BiomassLow        -0.462692211 0.03373972 -0.527750953
## StatusInvaded:Dead_BiomassHigh        0.646514629 0.03780767  0.572669754
## StatusInvaded:Dead_BiomassLow        -0.475944771 0.03853137 -0.549239941
## StatusInvaded:Litter_BiomassHigh      0.795463312 0.03329553  0.731206934
## StatusInvaded:Litter_BiomassLow      -0.378212163 0.05357327 -0.485337763
##                                            Q97.5
## Intercept                             2.55255276
## StatusInvaded                         1.10480795
## Live_Fuel_MoistureHigh               -0.48218797
## Live_Fuel_MoistureLow                 0.74119637
## Dead_Fuel_MoistureHigh               -0.42369666
## Dead_Fuel_MoistureLow                 0.52251922
## Live_BiomassHigh                     -0.15493574
## Live_BiomassLow                       0.29383807
## Dead_BiomassHigh                      0.12951127
## Dead_BiomassLow                      -0.04194931
## Litter_BiomassHigh                    0.33384514
## Litter_BiomassLow                    -0.65962723
## StatusInvaded:Live_Fuel_MoistureHigh  0.06606601
## StatusInvaded:Live_Fuel_MoistureLow  -0.17357121
## StatusInvaded:Dead_Fuel_MoistureHigh -0.55829003
## StatusInvaded:Dead_Fuel_MoistureLow   0.12850577
## StatusInvaded:Live_BiomassHigh        0.29864875
## StatusInvaded:Live_BiomassLow        -0.39898642
## StatusInvaded:Dead_BiomassHigh        0.72037310
## StatusInvaded:Dead_BiomassLow        -0.39946557
## StatusInvaded:Litter_BiomassHigh      0.86023915
## StatusInvaded:Litter_BiomassLow      -0.27498673
posterior_summary(S_ROS_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error     Q2.5    Q97.5
## nu 1.954324 0.1886443 1.619196 2.356151
# residuals for normality
mcmc_areas(as.matrix(S_ROS_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Surface Rate of Spread")

Surface Flame Length

# Posterior predictive check
pp_check(S_FL_model_student, type = "dens_overlay")  # compare observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(S_FL_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_FL <- residuals(S_FL_model_student)
fitted_vals_FL <- fitted(S_FL_model_student)

# residuals vs fitted
plot(fitted_vals_FL, resid_student_FL,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_FL, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(S_FL_model_student)$fixed  # won't show nu
## Warning: Parts of the model have not converged (some Rhats are > 1.05). Be
## careful when analysing the results! We recommend running more iterations and/or
## setting stronger priors.
##                                          Estimate  Est.Error     l-95% CI
## Intercept                             1.565263488 0.01360309  1.537690136
## StatusInvaded                         0.219763181 0.07465246  0.104868270
## Live_Fuel_MoistureLow                 0.247024171 0.02071710  0.219732092
## Live_Fuel_MoistureHigh               -0.189710833 0.01811909 -0.226472732
## Dead_Fuel_MoistureLow                 0.232802393 0.01372796  0.212640583
## Dead_Fuel_MoistureHigh               -0.223021338 0.02939312 -0.273372746
## Live_BiomassLow                       0.059759236 0.01128241  0.041377898
## Live_BiomassHigh                     -0.037615464 0.01131713 -0.063708863
## Dead_BiomassLow                      -0.038630779 0.01108623 -0.063640860
## Dead_BiomassHigh                      0.062019840 0.01267167  0.042702095
## Litter_BiomassLow                    -0.416544674 0.04506480 -0.484062182
## Litter_BiomassHigh                    0.189514387 0.01050554  0.170408475
## StatusInvaded:Live_Fuel_MoistureLow  -0.112900640 0.01745154 -0.141962873
## StatusInvaded:Live_Fuel_MoistureHigh  0.037537179 0.02069339 -0.008992032
## StatusInvaded:Dead_Fuel_MoistureLow   0.002741969 0.02332396 -0.031959456
## StatusInvaded:Dead_Fuel_MoistureHigh -0.133547343 0.06413545 -0.231336489
## StatusInvaded:Live_BiomassLow        -0.102869960 0.02957393 -0.144612742
## StatusInvaded:Live_BiomassHigh        0.036167783 0.06330758 -0.058544746
## StatusInvaded:Dead_BiomassLow        -0.218368538 0.04155770 -0.289494086
## StatusInvaded:Dead_BiomassHigh        0.267444451 0.07898131  0.171511909
## StatusInvaded:Litter_BiomassLow      -0.283560058 0.19316425 -0.504212439
## StatusInvaded:Litter_BiomassHigh      0.333300479 0.07878759  0.239248894
##                                         u-95% CI     Rhat    Bulk_ESS Tail_ESS
## Intercept                             1.59518775 1.097896 2529.807410 251.1047
## StatusInvaded                         0.31441153 1.736197    6.136455 150.4333
## Live_Fuel_MoistureLow                 0.28726432 1.708413    6.206677 127.6082
## Live_Fuel_MoistureHigh               -0.16402927 1.597467    6.744236 150.9560
## Dead_Fuel_MoistureLow                 0.26376064 1.320613    9.752804 183.6784
## Dead_Fuel_MoistureHigh               -0.18545795 1.732066    6.121089 129.3637
## Live_BiomassLow                       0.08664954 1.090307   30.038944 175.6714
## Live_BiomassHigh                     -0.01863266 1.080566   37.487576 162.8280
## Dead_BiomassLow                      -0.01851237 1.105115   79.357507 211.1374
## Dead_BiomassHigh                      0.09193930 1.212155   13.412934 139.2341
## Litter_BiomassLow                    -0.36144585 1.734501    6.109876 125.4377
## Litter_BiomassHigh                    0.21421096 1.103437   94.942278 180.4536
## StatusInvaded:Live_Fuel_MoistureLow  -0.07171653 1.094240   50.985798 189.0553
## StatusInvaded:Live_Fuel_MoistureHigh  0.06992315 1.254497   11.499597 128.7986
## StatusInvaded:Dead_Fuel_MoistureLow   0.05391997 1.435925    8.034184 170.2053
## StatusInvaded:Dead_Fuel_MoistureHigh -0.05289941 1.733461    6.108566 136.2247
## StatusInvaded:Live_BiomassLow        -0.04460386 1.662425    6.415570 167.2091
## StatusInvaded:Live_BiomassHigh        0.11628990 1.735146    6.123450 109.5343
## StatusInvaded:Dead_BiomassLow        -0.16295715 1.731731    6.120338 138.5109
## StatusInvaded:Dead_BiomassHigh        0.37686829 1.733381    6.113415 131.1651
## StatusInvaded:Litter_BiomassLow      -0.05752646 1.733802    6.141816 144.6656
## StatusInvaded:Litter_BiomassHigh      0.44305527 1.734460    6.105141 152.6535
fixef(S_FL_model_student)          # for fixed effects
##                                          Estimate  Est.Error         Q2.5
## Intercept                             1.565263488 0.01360309  1.537690136
## StatusInvaded                         0.219763181 0.07465246  0.104868270
## Live_Fuel_MoistureLow                 0.247024171 0.02071710  0.219732092
## Live_Fuel_MoistureHigh               -0.189710833 0.01811909 -0.226472732
## Dead_Fuel_MoistureLow                 0.232802393 0.01372796  0.212640583
## Dead_Fuel_MoistureHigh               -0.223021338 0.02939312 -0.273372746
## Live_BiomassLow                       0.059759236 0.01128241  0.041377898
## Live_BiomassHigh                     -0.037615464 0.01131713 -0.063708863
## Dead_BiomassLow                      -0.038630779 0.01108623 -0.063640860
## Dead_BiomassHigh                      0.062019840 0.01267167  0.042702095
## Litter_BiomassLow                    -0.416544674 0.04506480 -0.484062182
## Litter_BiomassHigh                    0.189514387 0.01050554  0.170408475
## StatusInvaded:Live_Fuel_MoistureLow  -0.112900640 0.01745154 -0.141962873
## StatusInvaded:Live_Fuel_MoistureHigh  0.037537179 0.02069339 -0.008992032
## StatusInvaded:Dead_Fuel_MoistureLow   0.002741969 0.02332396 -0.031959456
## StatusInvaded:Dead_Fuel_MoistureHigh -0.133547343 0.06413545 -0.231336489
## StatusInvaded:Live_BiomassLow        -0.102869960 0.02957393 -0.144612742
## StatusInvaded:Live_BiomassHigh        0.036167783 0.06330758 -0.058544746
## StatusInvaded:Dead_BiomassLow        -0.218368538 0.04155770 -0.289494086
## StatusInvaded:Dead_BiomassHigh        0.267444451 0.07898131  0.171511909
## StatusInvaded:Litter_BiomassLow      -0.283560058 0.19316425 -0.504212439
## StatusInvaded:Litter_BiomassHigh      0.333300479 0.07878759  0.239248894
##                                            Q97.5
## Intercept                             1.59518775
## StatusInvaded                         0.31441153
## Live_Fuel_MoistureLow                 0.28726432
## Live_Fuel_MoistureHigh               -0.16402927
## Dead_Fuel_MoistureLow                 0.26376064
## Dead_Fuel_MoistureHigh               -0.18545795
## Live_BiomassLow                       0.08664954
## Live_BiomassHigh                     -0.01863266
## Dead_BiomassLow                      -0.01851237
## Dead_BiomassHigh                      0.09193930
## Litter_BiomassLow                    -0.36144585
## Litter_BiomassHigh                    0.21421096
## StatusInvaded:Live_Fuel_MoistureLow  -0.07171653
## StatusInvaded:Live_Fuel_MoistureHigh  0.06992315
## StatusInvaded:Dead_Fuel_MoistureLow   0.05391997
## StatusInvaded:Dead_Fuel_MoistureHigh -0.05289941
## StatusInvaded:Live_BiomassLow        -0.04460386
## StatusInvaded:Live_BiomassHigh        0.11628990
## StatusInvaded:Dead_BiomassLow        -0.16295715
## StatusInvaded:Dead_BiomassHigh        0.37686829
## StatusInvaded:Litter_BiomassLow      -0.05752646
## StatusInvaded:Litter_BiomassHigh      0.44305527
posterior_summary(S_FL_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error     Q2.5    Q97.5
## nu 9.508761  10.96614 1.005379 37.13207
# residuals for normality
mcmc_areas(as.matrix(S_FL_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Surface Flame Length")

Fireline Intensity Residual Testing

# Posterior predictive check
pp_check(S_FI_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(S_FI_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_FI <- residuals(S_FI_model_student)
fitted_vals_FI <- fitted(S_FI_model_student)

# residuals vs fitted
plot(fitted_vals_FI, resid_student_FI,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_FI, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(S_FI_model_student)$fixed  # won't show nu
##                                        Estimate Est.Error   l-95% CI
## Intercept                             700.90688  6.181744  688.80792
## StatusInvaded                         251.60872 13.996659  223.73929
## Live_Fuel_MoistureLow                 221.32404  5.293988  211.08587
## Live_Fuel_MoistureHigh               -160.62021  4.352098 -169.13617
## Dead_Fuel_MoistureLow                 224.28232  4.751268  215.06570
## Dead_Fuel_MoistureHigh               -186.01624  4.756648 -195.29739
## Live_BiomassLow                        51.29415  4.659247   42.25693
## Live_BiomassHigh                      -35.49662  4.631119  -44.47486
## Dead_BiomassLow                       -36.19901  4.803248  -45.81143
## Dead_BiomassHigh                       54.78179  4.687596   45.61967
## Litter_BiomassLow                    -353.10499  5.303279 -363.79496
## Litter_BiomassHigh                    183.33991  4.449137  174.54249
## StatusInvaded:Live_Fuel_MoistureLow   -43.79676  9.942814  -63.45885
## StatusInvaded:Live_Fuel_MoistureHigh  -27.77514  9.708994  -47.30447
## StatusInvaded:Dead_Fuel_MoistureLow    56.94615  9.998317   36.90421
## StatusInvaded:Dead_Fuel_MoistureHigh -283.84504 10.765980 -304.83477
## StatusInvaded:Live_BiomassLow        -120.93512 12.620236 -145.69646
## StatusInvaded:Live_BiomassHigh        133.77620 11.198982  111.05907
## StatusInvaded:Dead_BiomassLow        -225.19374 11.032929 -247.63794
## StatusInvaded:Dead_BiomassHigh        373.66243  9.809462  354.37899
## StatusInvaded:Litter_BiomassLow      -131.35471 13.179124 -157.74888
## StatusInvaded:Litter_BiomassHigh      479.54206  9.725437  460.45345
##                                         u-95% CI      Rhat Bulk_ESS Tail_ESS
## Intercept                             713.157107 1.0006319 3444.683 3174.225
## StatusInvaded                         278.504983 1.0011774 2420.272 2527.327
## Live_Fuel_MoistureLow                 231.737681 0.9999748 3907.839 3143.425
## Live_Fuel_MoistureHigh               -152.108683 1.0020292 4378.851 3397.443
## Dead_Fuel_MoistureLow                 233.675738 0.9996323 3701.448 3144.190
## Dead_Fuel_MoistureHigh               -176.650918 1.0007370 3702.666 2826.976
## Live_BiomassLow                        60.182001 0.9998414 4121.373 3451.354
## Live_BiomassHigh                      -26.479198 1.0011441 4429.751 3298.397
## Dead_BiomassLow                       -27.023861 1.0013166 4024.614 3238.409
## Dead_BiomassHigh                       63.872092 1.0024002 3818.227 2991.120
## Litter_BiomassLow                    -342.886387 0.9996699 4341.151 3044.907
## Litter_BiomassHigh                    192.211275 0.9996382 4303.199 2987.632
## StatusInvaded:Live_Fuel_MoistureLow   -24.347705 1.0002197 3674.404 3151.761
## StatusInvaded:Live_Fuel_MoistureHigh   -9.023398 1.0008666 3499.870 3105.889
## StatusInvaded:Dead_Fuel_MoistureLow    76.214174 0.9999277 2990.547 2987.033
## StatusInvaded:Dead_Fuel_MoistureHigh -262.765230 1.0000891 3880.998 2987.249
## StatusInvaded:Live_BiomassLow         -96.396977 1.0003254 3090.139 3220.100
## StatusInvaded:Live_BiomassHigh        155.491693 1.0001467 3527.594 3235.609
## StatusInvaded:Dead_BiomassLow        -203.607304 1.0005779 3579.114 3078.565
## StatusInvaded:Dead_BiomassHigh        393.280520 1.0011096 3828.999 3100.494
## StatusInvaded:Litter_BiomassLow      -105.767680 1.0028414 3833.632 3318.445
## StatusInvaded:Litter_BiomassHigh      498.875290 0.9997877 3552.642 3015.887
fixef(S_FI_model_student)          # for fixed effects
##                                        Estimate Est.Error       Q2.5
## Intercept                             700.90688  6.181744  688.80792
## StatusInvaded                         251.60872 13.996659  223.73929
## Live_Fuel_MoistureLow                 221.32404  5.293988  211.08587
## Live_Fuel_MoistureHigh               -160.62021  4.352098 -169.13617
## Dead_Fuel_MoistureLow                 224.28232  4.751268  215.06570
## Dead_Fuel_MoistureHigh               -186.01624  4.756648 -195.29739
## Live_BiomassLow                        51.29415  4.659247   42.25693
## Live_BiomassHigh                      -35.49662  4.631119  -44.47486
## Dead_BiomassLow                       -36.19901  4.803248  -45.81143
## Dead_BiomassHigh                       54.78179  4.687596   45.61967
## Litter_BiomassLow                    -353.10499  5.303279 -363.79496
## Litter_BiomassHigh                    183.33991  4.449137  174.54249
## StatusInvaded:Live_Fuel_MoistureLow   -43.79676  9.942814  -63.45885
## StatusInvaded:Live_Fuel_MoistureHigh  -27.77514  9.708994  -47.30447
## StatusInvaded:Dead_Fuel_MoistureLow    56.94615  9.998317   36.90421
## StatusInvaded:Dead_Fuel_MoistureHigh -283.84504 10.765980 -304.83477
## StatusInvaded:Live_BiomassLow        -120.93512 12.620236 -145.69646
## StatusInvaded:Live_BiomassHigh        133.77620 11.198982  111.05907
## StatusInvaded:Dead_BiomassLow        -225.19374 11.032929 -247.63794
## StatusInvaded:Dead_BiomassHigh        373.66243  9.809462  354.37899
## StatusInvaded:Litter_BiomassLow      -131.35471 13.179124 -157.74888
## StatusInvaded:Litter_BiomassHigh      479.54206  9.725437  460.45345
##                                            Q97.5
## Intercept                             713.157107
## StatusInvaded                         278.504983
## Live_Fuel_MoistureLow                 231.737681
## Live_Fuel_MoistureHigh               -152.108683
## Dead_Fuel_MoistureLow                 233.675738
## Dead_Fuel_MoistureHigh               -176.650918
## Live_BiomassLow                        60.182001
## Live_BiomassHigh                      -26.479198
## Dead_BiomassLow                       -27.023861
## Dead_BiomassHigh                       63.872092
## Litter_BiomassLow                    -342.886387
## Litter_BiomassHigh                    192.211275
## StatusInvaded:Live_Fuel_MoistureLow   -24.347705
## StatusInvaded:Live_Fuel_MoistureHigh   -9.023398
## StatusInvaded:Dead_Fuel_MoistureLow    76.214174
## StatusInvaded:Dead_Fuel_MoistureHigh -262.765230
## StatusInvaded:Live_BiomassLow         -96.396977
## StatusInvaded:Live_BiomassHigh        155.491693
## StatusInvaded:Dead_BiomassLow        -203.607304
## StatusInvaded:Dead_BiomassHigh        393.280520
## StatusInvaded:Litter_BiomassLow      -105.767680
## StatusInvaded:Litter_BiomassHigh      498.875290
posterior_summary(S_FI_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate  Est.Error     Q2.5    Q97.5
## nu 1.350625 0.08625954 1.190411 1.526701
# residuals for normality
mcmc_areas(as.matrix(S_FI_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Surface Fireline Intensity")

Crown Transition Ratio Residual Testing

# Posterior predictive check
pp_check(Crown_TR_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(Crown_TR_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_TR <- residuals(Crown_TR_model_student)
fitted_vals_TR <- fitted(Crown_TR_model_student)

# residuals vs fitted
plot(fitted_vals_TR, resid_student_TR,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_TR, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(Crown_TR_model_student)$fixed  # won't show nu
##                                           Estimate   Est.Error     l-95% CI
## Intercept                             0.6129234767 0.016464223  0.580406242
## StatusInvaded                        -0.0823887524 0.024753588 -0.130215107
## Live_Fuel_MoistureLow                 0.0580196717 0.005054448  0.048445694
## Live_Fuel_MoistureHigh               -0.0440771509 0.005494557 -0.054978798
## Dead_Fuel_MoistureLow                 0.0552528675 0.004927074  0.045598628
## Dead_Fuel_MoistureHigh               -0.0501973147 0.005518816 -0.061047119
## Live_BiomassLow                       0.0130433407 0.005152978  0.002991078
## Live_BiomassHigh                     -0.0095394451 0.005141820 -0.019588085
## Dead_BiomassLow                      -0.0100739452 0.005144880 -0.020040274
## Dead_BiomassHigh                      0.0149900109 0.005081192  0.005256775
## Litter_BiomassLow                    -0.1000961691 0.006151148 -0.112450972
## Litter_BiomassHigh                    0.0455112543 0.004909365  0.035986663
## TreeBH                               -0.0490855441 0.001647840 -0.052170404
## StatusInvaded:Live_Fuel_MoistureLow  -0.0158797705 0.007167955 -0.030142365
## StatusInvaded:Live_Fuel_MoistureHigh  0.0003145876 0.007741565 -0.015034760
## StatusInvaded:Dead_Fuel_MoistureLow   0.0067326112 0.007112781 -0.007220109
## StatusInvaded:Dead_Fuel_MoistureHigh -0.0663059117 0.007844782 -0.081794497
## StatusInvaded:Live_BiomassLow        -0.0219117801 0.007296939 -0.035560809
## StatusInvaded:Live_BiomassHigh       -0.0069538397 0.008021317 -0.022082088
## StatusInvaded:Dead_BiomassLow        -0.0559358950 0.007605017 -0.070714630
## StatusInvaded:Dead_BiomassHigh        0.0891059582 0.007289165  0.074891666
## StatusInvaded:Litter_BiomassLow      -0.0187200700 0.008099980 -0.034520037
## StatusInvaded:Litter_BiomassHigh      0.1120681706 0.007156695  0.098022435
## StatusInvaded:TreeBH                  0.0140105484 0.002466413  0.009212198
##                                           u-95% CI      Rhat Bulk_ESS Tail_ESS
## Intercept                             6.441069e-01 1.0022563 2588.469 3223.606
## StatusInvaded                        -3.267097e-02 1.0028991 2730.140 2811.011
## Live_Fuel_MoistureLow                 6.802088e-02 1.0000992 3239.783 3272.876
## Live_Fuel_MoistureHigh               -3.349206e-02 1.0027061 3214.297 2703.211
## Dead_Fuel_MoistureLow                 6.483835e-02 0.9998304 3448.708 2904.669
## Dead_Fuel_MoistureHigh               -3.945215e-02 1.0000414 3201.244 3142.698
## Live_BiomassLow                       2.316997e-02 1.0002944 3450.537 3089.430
## Live_BiomassHigh                      3.946170e-04 0.9998864 3465.368 3305.440
## Dead_BiomassLow                      -5.121892e-05 1.0003716 3758.342 2960.171
## Dead_BiomassHigh                      2.485176e-02 1.0001277 4025.760 3347.356
## Litter_BiomassLow                    -8.785524e-02 1.0022307 2668.272 2926.483
## Litter_BiomassHigh                    5.509137e-02 1.0021339 3630.210 3273.711
## TreeBH                               -4.571882e-02 1.0014269 2807.139 2903.993
## StatusInvaded:Live_Fuel_MoistureLow  -2.017728e-03 1.0007770 3133.988 3336.010
## StatusInvaded:Live_Fuel_MoistureHigh  1.514693e-02 1.0018914 2778.557 3031.341
## StatusInvaded:Dead_Fuel_MoistureLow   2.115738e-02 1.0003165 3562.856 2826.081
## StatusInvaded:Dead_Fuel_MoistureHigh -5.063100e-02 1.0002926 2996.350 2947.992
## StatusInvaded:Live_BiomassLow        -7.674986e-03 1.0014961 3287.819 2866.285
## StatusInvaded:Live_BiomassHigh        8.810821e-03 1.0003114 3271.773 2871.049
## StatusInvaded:Dead_BiomassLow        -4.074358e-02 1.0007497 3458.240 2918.336
## StatusInvaded:Dead_BiomassHigh        1.035038e-01 1.0002572 3711.379 3046.271
## StatusInvaded:Litter_BiomassLow      -2.909616e-03 1.0002948 2904.087 3044.451
## StatusInvaded:Litter_BiomassHigh      1.261581e-01 1.0001094 3684.456 3391.221
## StatusInvaded:TreeBH                  1.892455e-02 1.0020532 3223.948 2837.055
fixef(Crown_TR_model_student)          # for fixed effects
##                                           Estimate   Est.Error         Q2.5
## Intercept                             0.6129234767 0.016464223  0.580406242
## StatusInvaded                        -0.0823887524 0.024753588 -0.130215107
## Live_Fuel_MoistureLow                 0.0580196717 0.005054448  0.048445694
## Live_Fuel_MoistureHigh               -0.0440771509 0.005494557 -0.054978798
## Dead_Fuel_MoistureLow                 0.0552528675 0.004927074  0.045598628
## Dead_Fuel_MoistureHigh               -0.0501973147 0.005518816 -0.061047119
## Live_BiomassLow                       0.0130433407 0.005152978  0.002991078
## Live_BiomassHigh                     -0.0095394451 0.005141820 -0.019588085
## Dead_BiomassLow                      -0.0100739452 0.005144880 -0.020040274
## Dead_BiomassHigh                      0.0149900109 0.005081192  0.005256775
## Litter_BiomassLow                    -0.1000961691 0.006151148 -0.112450972
## Litter_BiomassHigh                    0.0455112543 0.004909365  0.035986663
## TreeBH                               -0.0490855441 0.001647840 -0.052170404
## StatusInvaded:Live_Fuel_MoistureLow  -0.0158797705 0.007167955 -0.030142365
## StatusInvaded:Live_Fuel_MoistureHigh  0.0003145876 0.007741565 -0.015034760
## StatusInvaded:Dead_Fuel_MoistureLow   0.0067326112 0.007112781 -0.007220109
## StatusInvaded:Dead_Fuel_MoistureHigh -0.0663059117 0.007844782 -0.081794497
## StatusInvaded:Live_BiomassLow        -0.0219117801 0.007296939 -0.035560809
## StatusInvaded:Live_BiomassHigh       -0.0069538397 0.008021317 -0.022082088
## StatusInvaded:Dead_BiomassLow        -0.0559358950 0.007605017 -0.070714630
## StatusInvaded:Dead_BiomassHigh        0.0891059582 0.007289165  0.074891666
## StatusInvaded:Litter_BiomassLow      -0.0187200700 0.008099980 -0.034520037
## StatusInvaded:Litter_BiomassHigh      0.1120681706 0.007156695  0.098022435
## StatusInvaded:TreeBH                  0.0140105484 0.002466413  0.009212198
##                                              Q97.5
## Intercept                             6.441069e-01
## StatusInvaded                        -3.267097e-02
## Live_Fuel_MoistureLow                 6.802088e-02
## Live_Fuel_MoistureHigh               -3.349206e-02
## Dead_Fuel_MoistureLow                 6.483835e-02
## Dead_Fuel_MoistureHigh               -3.945215e-02
## Live_BiomassLow                       2.316997e-02
## Live_BiomassHigh                      3.946170e-04
## Dead_BiomassLow                      -5.121892e-05
## Dead_BiomassHigh                      2.485176e-02
## Litter_BiomassLow                    -8.785524e-02
## Litter_BiomassHigh                    5.509137e-02
## TreeBH                               -4.571882e-02
## StatusInvaded:Live_Fuel_MoistureLow  -2.017728e-03
## StatusInvaded:Live_Fuel_MoistureHigh  1.514693e-02
## StatusInvaded:Dead_Fuel_MoistureLow   2.115738e-02
## StatusInvaded:Dead_Fuel_MoistureHigh -5.063100e-02
## StatusInvaded:Live_BiomassLow        -7.674986e-03
## StatusInvaded:Live_BiomassHigh        8.810821e-03
## StatusInvaded:Dead_BiomassLow        -4.074358e-02
## StatusInvaded:Dead_BiomassHigh        1.035038e-01
## StatusInvaded:Litter_BiomassLow      -2.909616e-03
## StatusInvaded:Litter_BiomassHigh      1.261581e-01
## StatusInvaded:TreeBH                  1.892455e-02
posterior_summary(Crown_TR_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error     Q2.5    Q97.5
## nu 1.238435 0.0722551 1.104652 1.386999
# residuals for normality
mcmc_areas(as.matrix(Crown_TR_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Crown Transition Ratio")

Crown Active Ratio Residual Testing

# Posterior predictive check
pp_check(Crown_AR_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(Crown_AR_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_AR <- residuals(Crown_AR_model_student)
fitted_vals_AR <- fitted(Crown_AR_model_student)

# residuals vs fitted
plot(fitted_vals_AR, resid_student_AR,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_AR, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(Crown_AR_model_student)$fixed  # won't show nu
## Warning: Parts of the model have not converged (some Rhats are > 1.05). Be
## careful when analysing the results! We recommend running more iterations and/or
## setting stronger priors.
##                                         Estimate    Est.Error    l-95% CI
## Intercept                             0.11500000 5.000628e-03  0.10999951
## StatusInvaded                        -0.03500000 5.000629e-03 -0.04000030
## Live_Fuel_MoistureLow                 0.02500000 5.000629e-03  0.01999970
## Live_Fuel_MoistureHigh               -0.02500000 5.000630e-03 -0.03000031
## Dead_Fuel_MoistureLow                 0.03000000 1.788284e-07  0.02999963
## Dead_Fuel_MoistureHigh               -0.11500000 5.000627e-03 -0.12000031
## StatusInvaded:Live_Fuel_MoistureLow  -0.01499999 5.000633e-03 -0.02000070
## StatusInvaded:Live_Fuel_MoistureHigh  0.01500001 5.000633e-03  0.00999931
## StatusInvaded:Dead_Fuel_MoistureLow   0.01999999 3.150494e-07  0.01999935
## StatusInvaded:Dead_Fuel_MoistureHigh  0.03500000 5.000626e-03  0.02999920
##                                         u-95% CI     Rhat    Bulk_ESS  Tail_ESS
## Intercept                             0.12000023 1.737481    6.113234  56.69807
## StatusInvaded                        -0.02999940 1.737247    6.126344  57.05970
## Live_Fuel_MoistureLow                 0.03000046 1.738943    6.140922  51.80560
## Live_Fuel_MoistureHigh               -0.01999952 1.738379    6.105538  58.88050
## Dead_Fuel_MoistureLow                 0.03000037 1.112678 3264.121938 139.95467
## Dead_Fuel_MoistureHigh               -0.10999939 1.736201    6.139759  51.92185
## StatusInvaded:Live_Fuel_MoistureLow  -0.00999957 1.739338    6.107515  45.81922
## StatusInvaded:Live_Fuel_MoistureHigh  0.02000043 1.739680    6.120394  52.17634
## StatusInvaded:Dead_Fuel_MoistureLow   0.02000066 1.105972 3331.037168 149.74876
## StatusInvaded:Dead_Fuel_MoistureHigh  0.04000043 1.738053    6.126688  43.28162
fixef(Crown_AR_model_student)          # for fixed effects
##                                         Estimate    Est.Error        Q2.5
## Intercept                             0.11500000 5.000628e-03  0.10999951
## StatusInvaded                        -0.03500000 5.000629e-03 -0.04000030
## Live_Fuel_MoistureLow                 0.02500000 5.000629e-03  0.01999970
## Live_Fuel_MoistureHigh               -0.02500000 5.000630e-03 -0.03000031
## Dead_Fuel_MoistureLow                 0.03000000 1.788284e-07  0.02999963
## Dead_Fuel_MoistureHigh               -0.11500000 5.000627e-03 -0.12000031
## StatusInvaded:Live_Fuel_MoistureLow  -0.01499999 5.000633e-03 -0.02000070
## StatusInvaded:Live_Fuel_MoistureHigh  0.01500001 5.000633e-03  0.00999931
## StatusInvaded:Dead_Fuel_MoistureLow   0.01999999 3.150494e-07  0.01999935
## StatusInvaded:Dead_Fuel_MoistureHigh  0.03500000 5.000626e-03  0.02999920
##                                            Q97.5
## Intercept                             0.12000023
## StatusInvaded                        -0.02999940
## Live_Fuel_MoistureLow                 0.03000046
## Live_Fuel_MoistureHigh               -0.01999952
## Dead_Fuel_MoistureLow                 0.03000037
## Dead_Fuel_MoistureHigh               -0.10999939
## StatusInvaded:Live_Fuel_MoistureLow  -0.00999957
## StatusInvaded:Live_Fuel_MoistureHigh  0.02000043
## StatusInvaded:Dead_Fuel_MoistureLow   0.02000066
## StatusInvaded:Dead_Fuel_MoistureHigh  0.04000043
posterior_summary(Crown_AR_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate  Est.Error     Q2.5    Q97.5
## nu 1.194549 0.06551687 1.086057 1.263923
# residuals for normality
mcmc_areas(as.matrix(Crown_AR_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Crown Active Ratio")

Crown Rate of Spread Residual Testing

# Posterior predictive check
pp_check(Crown_ROS_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(Crown_ROS_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_CROS <- residuals(Crown_ROS_model_student)
fitted_vals_CROS <- fitted(Crown_ROS_model_student)

# residuals vs fitted
plot(fitted_vals_CROS, resid_student_CROS,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_CROS, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(Crown_ROS_model_student)$fixed  # won't show nu
## Warning: Parts of the model have not converged (some Rhats are > 1.05). Be
## careful when analysing the results! We recommend running more iterations and/or
## setting stronger priors.
##                                         Estimate   Est.Error      l-95% CI
## Intercept                             1.32831185 0.029087173  1.300000e+00
## StatusInvaded                        -0.41773411 0.020131029 -4.567543e-01
## Live_Fuel_MoistureLow                 0.31884579 0.081516853  2.199911e-01
## Live_Fuel_MoistureHigh               -0.20178097 0.007472729 -2.204983e-01
## Dead_Fuel_MoistureLow                 0.39905720 0.007370159  3.812269e-01
## Dead_Fuel_MoistureHigh               -1.33353720 0.034309839 -1.383676e+00
## StatusInvaded:Live_Fuel_MoistureLow  -0.25241462 0.147980716 -4.000005e-01
## StatusInvaded:Live_Fuel_MoistureHigh  0.05197872 0.052989515 -4.991359e-07
## StatusInvaded:Dead_Fuel_MoistureLow   0.23481339 0.066010956  1.459390e-01
## StatusInvaded:Dead_Fuel_MoistureHigh  0.41755434 0.020343513  3.999993e-01
##                                        u-95% CI     Rhat    Bulk_ESS  Tail_ESS
## Intercept                             1.3722379 1.739920    6.143823  49.77381
## StatusInvaded                        -0.3999994 1.736552    6.317159  61.64879
## Live_Fuel_MoistureLow                 0.4000004 1.740416    6.097161  47.35441
## Live_Fuel_MoistureHigh               -0.1868673 1.768175 1371.770071 136.27607
## Dead_Fuel_MoistureLow                 0.4143522 1.768797 2893.070885 108.90252
## Dead_Fuel_MoistureHigh               -1.2999994 1.742074    6.105147  46.56599
## StatusInvaded:Live_Fuel_MoistureLow  -0.0804603 1.738116    6.115205  44.62229
## StatusInvaded:Live_Fuel_MoistureHigh  0.1280359 1.734850    6.119248  93.09398
## StatusInvaded:Dead_Fuel_MoistureLow   0.3000005 1.737333    6.118946  49.64444
## StatusInvaded:Dead_Fuel_MoistureHigh  0.4581562 1.737933    6.468365  64.22359
fixef(Crown_ROS_model_student)          # for fixed effects
##                                         Estimate   Est.Error          Q2.5
## Intercept                             1.32831185 0.029087173  1.300000e+00
## StatusInvaded                        -0.41773411 0.020131029 -4.567543e-01
## Live_Fuel_MoistureLow                 0.31884579 0.081516853  2.199911e-01
## Live_Fuel_MoistureHigh               -0.20178097 0.007472729 -2.204983e-01
## Dead_Fuel_MoistureLow                 0.39905720 0.007370159  3.812269e-01
## Dead_Fuel_MoistureHigh               -1.33353720 0.034309839 -1.383676e+00
## StatusInvaded:Live_Fuel_MoistureLow  -0.25241462 0.147980716 -4.000005e-01
## StatusInvaded:Live_Fuel_MoistureHigh  0.05197872 0.052989515 -4.991359e-07
## StatusInvaded:Dead_Fuel_MoistureLow   0.23481339 0.066010956  1.459390e-01
## StatusInvaded:Dead_Fuel_MoistureHigh  0.41755434 0.020343513  3.999993e-01
##                                           Q97.5
## Intercept                             1.3722379
## StatusInvaded                        -0.3999994
## Live_Fuel_MoistureLow                 0.4000004
## Live_Fuel_MoistureHigh               -0.1868673
## Dead_Fuel_MoistureLow                 0.4143522
## Dead_Fuel_MoistureHigh               -1.2999994
## StatusInvaded:Live_Fuel_MoistureLow  -0.0804603
## StatusInvaded:Live_Fuel_MoistureHigh  0.1280359
## StatusInvaded:Dead_Fuel_MoistureLow   0.3000005
## StatusInvaded:Dead_Fuel_MoistureHigh  0.4581562
posterior_summary(Crown_ROS_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error    Q2.5    Q97.5
## nu 27.34562  29.48568 1.04158 88.72254
# residuals for normality
mcmc_areas(as.matrix(Crown_ROS_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Crown Fire Rate of Spread")

Crown Flame Length Residual Testing

# Posterior predictive check
pp_check(Crown_FL_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(Crown_FL_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_CFL <- residuals(Crown_FL_model_student)
fitted_vals_CFL <- fitted(Crown_FL_model_student)

# residuals vs fitted
plot(fitted_vals_CFL, resid_student_CFL,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# residual distribution
hist(resid_student_CFL, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(Crown_FL_model_student)$fixed  # won't show nu
##                                         Estimate   Est.Error    l-95% CI
## Intercept                             1.60358622 0.032649654  1.54127080
## StatusInvaded                        -0.41278772 0.051277799 -0.51261330
## Live_Fuel_MoistureLow                 0.59838106 0.017346500  0.56410228
## Live_Fuel_MoistureHigh               -0.51366717 0.016924827 -0.54572947
## Dead_Fuel_MoistureLow                 0.71432562 0.014770838  0.68554944
## Dead_Fuel_MoistureHigh               -3.40450498 0.029993684 -3.46503029
## Live_BiomassLow                      -0.01347317 0.016686660 -0.04589867
## Live_BiomassHigh                      0.01990218 0.016683452 -0.01311449
## Dead_BiomassLow                      -0.02426924 0.016489394 -0.05726898
## Dead_BiomassHigh                      0.02772166 0.016825446 -0.00593994
## Litter_BiomassLow                    -0.16094530 0.016558101 -0.19344250
## Litter_BiomassHigh                    0.08294601 0.016911906  0.05028787
## TreeBH                                0.23640976 0.003360238  0.22974585
## StatusInvaded:Live_Fuel_MoistureLow  -0.21206523 0.026950997 -0.26420119
## StatusInvaded:Live_Fuel_MoistureHigh  0.19346404 0.028785376  0.13854255
## StatusInvaded:Dead_Fuel_MoistureLow   0.44021486 0.024176080  0.39244212
## StatusInvaded:Dead_Fuel_MoistureHigh  0.75096465 0.046949928  0.65999715
## StatusInvaded:Live_BiomassLow         0.02625260 0.026002456 -0.02496613
## StatusInvaded:Live_BiomassHigh       -0.04189005 0.026516864 -0.09379242
## StatusInvaded:Dead_BiomassLow        -0.08225192 0.026525252 -0.13433372
## StatusInvaded:Dead_BiomassHigh        0.09358959 0.026772854  0.04257756
## StatusInvaded:Litter_BiomassLow      -0.02614928 0.027150721 -0.07884036
## StatusInvaded:Litter_BiomassHigh      0.08015396 0.026617602  0.02773483
## StatusInvaded:TreeBH                 -0.05166779 0.005483500 -0.06265434
##                                          u-95% CI     Rhat Bulk_ESS Tail_ESS
## Intercept                             1.667799278 1.000593 3076.691 2868.322
## StatusInvaded                        -0.312242986 1.000742 2876.301 3083.552
## Live_Fuel_MoistureLow                 0.632036097 1.000215 4078.621 3424.372
## Live_Fuel_MoistureHigh               -0.481351380 1.000002 3848.678 3273.951
## Dead_Fuel_MoistureLow                 0.743039817 1.000505 4165.471 3607.932
## Dead_Fuel_MoistureHigh               -3.346979671 1.000966 3780.962 2998.969
## Live_BiomassLow                       0.019747617 1.000849 3337.281 3209.641
## Live_BiomassHigh                      0.052320829 1.000916 3466.268 3392.239
## Dead_BiomassLow                       0.007630704 1.002224 3571.336 2998.372
## Dead_BiomassHigh                      0.060016700 1.001834 3422.130 3267.060
## Litter_BiomassLow                    -0.128135556 1.000303 3444.542 3330.575
## Litter_BiomassHigh                    0.116277248 1.000877 3513.399 3057.700
## TreeBH                                0.243003273 1.000708 4098.382 2723.110
## StatusInvaded:Live_Fuel_MoistureLow  -0.159802969 1.000367 4099.238 3420.680
## StatusInvaded:Live_Fuel_MoistureHigh  0.248650416 1.000620 3526.973 3357.867
## StatusInvaded:Dead_Fuel_MoistureLow   0.488682157 1.000905 3730.673 2976.436
## StatusInvaded:Dead_Fuel_MoistureHigh  0.844557679 1.001205 3877.721 3050.862
## StatusInvaded:Live_BiomassLow         0.076786079 1.001040 3585.836 3075.007
## StatusInvaded:Live_BiomassHigh        0.010107868 1.000354 3354.681 2981.639
## StatusInvaded:Dead_BiomassLow        -0.028886923 1.001588 3130.128 3031.190
## StatusInvaded:Dead_BiomassHigh        0.146494555 1.000849 2944.545 2514.990
## StatusInvaded:Litter_BiomassLow       0.025776986 1.000408 3807.431 3251.495
## StatusInvaded:Litter_BiomassHigh      0.131270667 1.000246 3495.820 2998.574
## StatusInvaded:TreeBH                 -0.040805892 1.001326 3628.728 3057.615
fixef(Crown_FL_model_student)          # for fixed effects
##                                         Estimate   Est.Error        Q2.5
## Intercept                             1.60358622 0.032649654  1.54127080
## StatusInvaded                        -0.41278772 0.051277799 -0.51261330
## Live_Fuel_MoistureLow                 0.59838106 0.017346500  0.56410228
## Live_Fuel_MoistureHigh               -0.51366717 0.016924827 -0.54572947
## Dead_Fuel_MoistureLow                 0.71432562 0.014770838  0.68554944
## Dead_Fuel_MoistureHigh               -3.40450498 0.029993684 -3.46503029
## Live_BiomassLow                      -0.01347317 0.016686660 -0.04589867
## Live_BiomassHigh                      0.01990218 0.016683452 -0.01311449
## Dead_BiomassLow                      -0.02426924 0.016489394 -0.05726898
## Dead_BiomassHigh                      0.02772166 0.016825446 -0.00593994
## Litter_BiomassLow                    -0.16094530 0.016558101 -0.19344250
## Litter_BiomassHigh                    0.08294601 0.016911906  0.05028787
## TreeBH                                0.23640976 0.003360238  0.22974585
## StatusInvaded:Live_Fuel_MoistureLow  -0.21206523 0.026950997 -0.26420119
## StatusInvaded:Live_Fuel_MoistureHigh  0.19346404 0.028785376  0.13854255
## StatusInvaded:Dead_Fuel_MoistureLow   0.44021486 0.024176080  0.39244212
## StatusInvaded:Dead_Fuel_MoistureHigh  0.75096465 0.046949928  0.65999715
## StatusInvaded:Live_BiomassLow         0.02625260 0.026002456 -0.02496613
## StatusInvaded:Live_BiomassHigh       -0.04189005 0.026516864 -0.09379242
## StatusInvaded:Dead_BiomassLow        -0.08225192 0.026525252 -0.13433372
## StatusInvaded:Dead_BiomassHigh        0.09358959 0.026772854  0.04257756
## StatusInvaded:Litter_BiomassLow      -0.02614928 0.027150721 -0.07884036
## StatusInvaded:Litter_BiomassHigh      0.08015396 0.026617602  0.02773483
## StatusInvaded:TreeBH                 -0.05166779 0.005483500 -0.06265434
##                                             Q97.5
## Intercept                             1.667799278
## StatusInvaded                        -0.312242986
## Live_Fuel_MoistureLow                 0.632036097
## Live_Fuel_MoistureHigh               -0.481351380
## Dead_Fuel_MoistureLow                 0.743039817
## Dead_Fuel_MoistureHigh               -3.346979671
## Live_BiomassLow                       0.019747617
## Live_BiomassHigh                      0.052320829
## Dead_BiomassLow                       0.007630704
## Dead_BiomassHigh                      0.060016700
## Litter_BiomassLow                    -0.128135556
## Litter_BiomassHigh                    0.116277248
## TreeBH                                0.243003273
## StatusInvaded:Live_Fuel_MoistureLow  -0.159802969
## StatusInvaded:Live_Fuel_MoistureHigh  0.248650416
## StatusInvaded:Dead_Fuel_MoistureLow   0.488682157
## StatusInvaded:Dead_Fuel_MoistureHigh  0.844557679
## StatusInvaded:Live_BiomassLow         0.076786079
## StatusInvaded:Live_BiomassHigh        0.010107868
## StatusInvaded:Dead_BiomassLow        -0.028886923
## StatusInvaded:Dead_BiomassHigh        0.146494555
## StatusInvaded:Litter_BiomassLow       0.025776986
## StatusInvaded:Litter_BiomassHigh      0.131270667
## StatusInvaded:TreeBH                 -0.040805892
posterior_summary(Crown_FL_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error     Q2.5    Q97.5
## nu 1.483786  0.103169 1.301273 1.708044
# residuals for normality
mcmc_areas(as.matrix(Crown_FL_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Crown Fire Flame Length")

Crown Fireline Intensity Residual Testing

# Posterior predictive check
pp_check(Crown_Fin_model_student, type = "dens_overlay")  # observed vs simulated density
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

pp_check(Crown_Fin_model_student, type = "scatter_avg")   # observed vs predicted means
## Using all posterior draws for ppc type 'scatter_avg' by default.

# Extract residuals
resid_student_CFin <- residuals(Crown_Fin_model_student)
fitted_vals_CFin <- fitted(Crown_Fin_model_student)

# residuals vs fitted
plot(fitted_vals_CFin, resid_student_CFin,
     xlab = "Fitted values",
     ylab = "Residuals",
     main = "Residuals vs Fitted")
abline(h = 0, col = "red", lwd = 2)

# Check residual distribution
hist(resid_student_CFin, breaks = 30, main = "Residual Histogram",
     xlab = "Residuals", col = "grey")

# estimated degrees of freedom
summary(Crown_Fin_model_student)$fixed  # won't show nu
##                                          Estimate Est.Error     l-95% CI
## Intercept                              323.731786 27.239625   272.164991
## StatusInvaded                         -158.465461 39.601322  -234.941700
## Live_Fuel_MoistureLow                  398.757464 14.427251   370.086824
## Live_Fuel_MoistureHigh                -328.253443 12.991596  -352.596987
## Dead_Fuel_MoistureLow                  468.981713 12.194934   444.441919
## Dead_Fuel_MoistureHigh               -1473.765606 19.639166 -1511.751766
## Live_BiomassLow                        -10.538311 13.315112   -36.858094
## Live_BiomassHigh                         8.265974 13.585487   -18.167574
## Dead_BiomassLow                        -13.226853 13.263647   -39.238448
## Dead_BiomassHigh                        17.269807 13.003567    -8.582099
## Litter_BiomassLow                     -103.537338 13.165977  -129.183634
## Litter_BiomassHigh                      50.599806 13.468335    24.016404
## TreeBH                                 150.462796  2.690285   145.158032
## StatusInvaded:Live_Fuel_MoistureLow   -157.883608 20.395250  -198.274151
## StatusInvaded:Live_Fuel_MoistureHigh   153.187887 19.578621   114.830101
## StatusInvaded:Dead_Fuel_MoistureLow    246.816818 19.087881   209.247687
## StatusInvaded:Dead_Fuel_MoistureHigh   465.364632 28.403837   410.591330
## StatusInvaded:Live_BiomassLow           16.691539 20.102356   -22.068238
## StatusInvaded:Live_BiomassHigh         -19.261323 20.241216   -59.547418
## StatusInvaded:Dead_BiomassLow          -41.800715 19.707174   -80.116680
## StatusInvaded:Dead_BiomassHigh          54.816574 19.681654    15.852255
## StatusInvaded:Litter_BiomassLow         -2.312753 19.509095   -40.297207
## StatusInvaded:Litter_BiomassHigh        38.527733 20.067760    -2.174401
## StatusInvaded:TreeBH                   -44.688076  4.102727   -52.949016
##                                          u-95% CI      Rhat Bulk_ESS Tail_ESS
## Intercept                              376.704695 1.0002714 2574.499 2658.080
## StatusInvaded                          -80.503518 0.9994277 2519.981 2659.711
## Live_Fuel_MoistureLow                  426.216387 1.0000187 3863.669 3433.533
## Live_Fuel_MoistureHigh                -302.785295 1.0009591 4420.350 3256.861
## Dead_Fuel_MoistureLow                  492.981846 1.0005468 3592.114 3117.725
## Dead_Fuel_MoistureHigh               -1435.097052 1.0009482 3465.896 3005.523
## Live_BiomassLow                         15.593335 1.0001382 3233.371 3316.136
## Live_BiomassHigh                        34.951798 1.0018438 3560.279 3107.347
## Dead_BiomassLow                         12.445131 0.9998812 3804.156 3348.844
## Dead_BiomassHigh                        42.743257 1.0003310 3698.674 3248.086
## Litter_BiomassLow                      -77.703022 1.0028302 3683.588 3174.918
## Litter_BiomassHigh                      77.234157 1.0006289 3685.862 3266.274
## TreeBH                                 155.750858 1.0005405 3013.817 2765.378
## StatusInvaded:Live_Fuel_MoistureLow   -118.086041 1.0000070 3788.061 3422.595
## StatusInvaded:Live_Fuel_MoistureHigh   191.598444 1.0005296 3781.680 3320.614
## StatusInvaded:Dead_Fuel_MoistureLow    283.882179 1.0005876 3783.479 3222.681
## StatusInvaded:Dead_Fuel_MoistureHigh   522.222052 1.0014246 3862.855 2872.899
## StatusInvaded:Live_BiomassLow           56.020571 1.0012431 3228.686 3443.216
## StatusInvaded:Live_BiomassHigh          20.457685 1.0000913 3175.683 2804.351
## StatusInvaded:Dead_BiomassLow           -2.800056 0.9996917 3734.357 3176.884
## StatusInvaded:Dead_BiomassHigh          92.691033 0.9999598 3798.879 3442.759
## StatusInvaded:Litter_BiomassLow         36.517084 1.0002839 3568.959 3206.942
## StatusInvaded:Litter_BiomassHigh        77.212879 1.0001505 3647.859 3451.784
## StatusInvaded:TreeBH                   -36.802778 1.0001241 3205.257 3268.218
fixef(Crown_Fin_model_student)          # for fixed effects
##                                          Estimate Est.Error         Q2.5
## Intercept                              323.731786 27.239625   272.164991
## StatusInvaded                         -158.465461 39.601322  -234.941700
## Live_Fuel_MoistureLow                  398.757464 14.427251   370.086824
## Live_Fuel_MoistureHigh                -328.253443 12.991596  -352.596987
## Dead_Fuel_MoistureLow                  468.981713 12.194934   444.441919
## Dead_Fuel_MoistureHigh               -1473.765606 19.639166 -1511.751766
## Live_BiomassLow                        -10.538311 13.315112   -36.858094
## Live_BiomassHigh                         8.265974 13.585487   -18.167574
## Dead_BiomassLow                        -13.226853 13.263647   -39.238448
## Dead_BiomassHigh                        17.269807 13.003567    -8.582099
## Litter_BiomassLow                     -103.537338 13.165977  -129.183634
## Litter_BiomassHigh                      50.599806 13.468335    24.016404
## TreeBH                                 150.462796  2.690285   145.158032
## StatusInvaded:Live_Fuel_MoistureLow   -157.883608 20.395250  -198.274151
## StatusInvaded:Live_Fuel_MoistureHigh   153.187887 19.578621   114.830101
## StatusInvaded:Dead_Fuel_MoistureLow    246.816818 19.087881   209.247687
## StatusInvaded:Dead_Fuel_MoistureHigh   465.364632 28.403837   410.591330
## StatusInvaded:Live_BiomassLow           16.691539 20.102356   -22.068238
## StatusInvaded:Live_BiomassHigh         -19.261323 20.241216   -59.547418
## StatusInvaded:Dead_BiomassLow          -41.800715 19.707174   -80.116680
## StatusInvaded:Dead_BiomassHigh          54.816574 19.681654    15.852255
## StatusInvaded:Litter_BiomassLow         -2.312753 19.509095   -40.297207
## StatusInvaded:Litter_BiomassHigh        38.527733 20.067760    -2.174401
## StatusInvaded:TreeBH                   -44.688076  4.102727   -52.949016
##                                             Q97.5
## Intercept                              376.704695
## StatusInvaded                          -80.503518
## Live_Fuel_MoistureLow                  426.216387
## Live_Fuel_MoistureHigh                -302.785295
## Dead_Fuel_MoistureLow                  492.981846
## Dead_Fuel_MoistureHigh               -1435.097052
## Live_BiomassLow                         15.593335
## Live_BiomassHigh                        34.951798
## Dead_BiomassLow                         12.445131
## Dead_BiomassHigh                        42.743257
## Litter_BiomassLow                      -77.703022
## Litter_BiomassHigh                      77.234157
## TreeBH                                 155.750858
## StatusInvaded:Live_Fuel_MoistureLow   -118.086041
## StatusInvaded:Live_Fuel_MoistureHigh   191.598444
## StatusInvaded:Dead_Fuel_MoistureLow    283.882179
## StatusInvaded:Dead_Fuel_MoistureHigh   522.222052
## StatusInvaded:Live_BiomassLow           56.020571
## StatusInvaded:Live_BiomassHigh          20.457685
## StatusInvaded:Dead_BiomassLow           -2.800056
## StatusInvaded:Dead_BiomassHigh          92.691033
## StatusInvaded:Litter_BiomassLow         36.517084
## StatusInvaded:Litter_BiomassHigh        77.212879
## StatusInvaded:TreeBH                   -36.802778
posterior_summary(Crown_Fin_model_student, pars = "nu")  # nu parameter for tails
## Warning: Argument 'pars' is deprecated. Please use 'variable' instead.
##    Estimate Est.Error     Q2.5    Q97.5
## nu 1.822566 0.1565685 1.551806 2.164106
# residuals for normality
mcmc_areas(as.matrix(Crown_Fin_model_student), pars = "nu", prob = 0.95) +
  labs(title = "Posterior Distribution of nu for Crown Fire Intensity")