################################################## # FinalInteractiveModelSelection.R # Sean Connolly # Model selection procedure to find optimal models for # models with an interactive effect of latitude and # distance from coast on richness ######################################################### ################################################################################ # Synthetic pSEM with CDI removed. # ---------------------------------------------------------------------------- Div2DDclSEM <- psem( lm(cvpop ~ latitude+CrossShelfPos+mHC+sdHC+estRichness+estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+mHC+sdHC+estRichness+estUnevenness+DD.cublog, ecol.table.new), lm(estUnevenness ~ latitude+CrossShelfPos+mHC+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC+sdHC), lm(DD.cublog ~ latitude+CrossShelfPos+mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(Div2DDclSEM) #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # phi ~ cvpop + ... coef 30 -1.8509 0.0740 # estUnevenness ~ estRichness + ... coef 32 -0.9600 0.3442 # DD.cublog ~ estRichness + ... coef 32 -0.4588 0.6495 # DD.cublog ~ estUnevenness + ... coef 33 1.3542 0.1849 # #-- #Global goodness-of-fit: # #Chi-Squared = 8.664 with P-value = 0.193 and on 6 degrees of freedom #Fisher's C = 11.578 with P-value = 0.171 and on 8 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop latitude 0.0033 0.0130 31 0.2526 0.8023 0.0605 # cvpop CrossShelfPos -0.0093 0.0982 31 -0.0947 0.9252 -0.0181 # cvpop mHC -0.0322 0.0675 31 -0.4768 0.6368 -0.0816 # cvpop sdHC 0.0574 0.0568 31 1.0104 0.3201 0.2017 # cvpop estRichness -0.0513 0.1759 31 -0.2914 0.7727 -0.0642 # cvpop estUnevenness 0.5050 0.3937 31 1.2826 0.2092 0.3133 # cvpop DD.cublog 0.0055 0.0023 31 2.3933 0.0229 0.4284 * # phi latitude 0.0696 0.0343 31 2.0315 0.0508 0.4641 # phi CrossShelfPos -0.6955 0.2594 31 -2.6808 0.0117 -0.4886 * # phi mHC -0.0092 0.1784 31 -0.0514 0.9594 -0.0084 # phi sdHC -0.1497 0.1501 31 -0.9976 0.3262 -0.1899 # phi estRichness -0.1609 0.4646 31 -0.3463 0.7315 -0.0728 # phi estUnevenness 2.4953 1.0398 31 2.3998 0.0226 0.5589 * # phi DD.cublog -0.0030 0.0061 31 -0.4904 0.6273 -0.0837 # estUnevenness latitude -0.0245 0.0036 34 -6.7870 0.0000 -0.7288 *** # estUnevenness CrossShelfPos -0.0107 0.0327 34 -0.3271 0.7456 -0.0335 # estUnevenness mHC 0.0196 0.0270 34 0.7237 0.4742 0.0798 # estUnevenness sdHC 0.0281 0.0196 34 1.4336 0.1608 0.1590 # estRichness latitude 0.0869 0.0250 33 3.4823 0.0014 1.2810 ** # estRichness CrossShelfPos -1.0259 0.5508 33 -1.8625 0.0715 -1.5927 # estRichness mHC -0.1350 0.0551 33 -2.4504 0.0197 -0.2728 * # estRichness sdHC 0.0657 0.0407 33 1.6132 0.1162 0.1841 # estRichness latitude:CrossShelfPos -0.0769 0.0299 33 -2.5730 0.0148 -2.5233 * # DD.cublog latitude 0.6698 0.6071 34 1.1034 0.2776 0.1588 # DD.cublog CrossShelfPos 4.6898 5.4975 34 0.8531 0.3996 0.1171 # DD.cublog mHC -7.2873 4.5514 34 -1.6011 0.1186 -0.2368 # DD.cublog sdHC 14.6458 3.2967 34 4.4426 0.0001 0.6606 *** ############################################################################### AIC(Div2DDclSEM,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 85.578 2897.578 37 39 # OK try dropping terms with p>0.8 DivDDclSEM2.trim1 <- psem( lm(cvpop ~ mHC+sdHC+estRichness+estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+sdHC+estRichness+estUnevenness+DD.cublog, ecol.table.new), lm(estUnevenness ~ latitude+CrossShelfPos+mHC+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC+sdHC), lm(DD.cublog ~ latitude+CrossShelfPos+mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim1) # --- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # phi ~ mHC + ... coef 31 -0.0514 0.9594 # cvpop ~ latitude + ... coef 32 0.2905 0.7733 # cvpop ~ CrossShelfPos + ... coef 32 -0.1666 0.8687 # phi ~ cvpop + ... coef 30 -1.8509 0.0740 # estUnevenness ~ estRichness + ... coef 32 -0.9600 0.3442 # DD.cublog ~ estRichness + ... coef 32 -0.4588 0.6495 # DD.cublog ~ estUnevenness + ... coef 33 1.3542 0.1849 # #-- #Global goodness-of-fit: # #Chi-Squared = 8.782 with P-value = 0.458 and on 9 degrees of freedom #Fisher's C = 12.457 with P-value = 0.57 and on 14 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop mHC -0.0329 0.0640 33 -0.5138 0.6108 -0.0833 # cvpop sdHC 0.0560 0.0542 33 1.0339 0.3087 0.1968 # cvpop estRichness -0.0607 0.1263 33 -0.4810 0.6337 -0.0761 # cvpop estUnevenness 0.4188 0.2539 33 1.6494 0.1085 0.2599 # cvpop DD.cublog 0.0056 0.0021 33 2.6418 0.0125 0.4401 * # phi latitude 0.0694 0.0336 32 2.0674 0.0469 0.4630 * # phi CrossShelfPos -0.6983 0.2495 32 -2.7990 0.0086 -0.4906 ** # phi sdHC -0.1532 0.1315 32 -1.1649 0.2527 -0.1943 # phi estRichness -0.1519 0.4236 32 -0.3585 0.7223 -0.0687 # phi estUnevenness 2.4902 1.0188 32 2.4442 0.0202 0.5577 * # phi DD.cublog -0.0029 0.0058 32 -0.5024 0.6188 -0.0814 # estUnevenness latitude -0.0245 0.0036 34 -6.7870 0.0000 -0.7288 *** # estUnevenness CrossShelfPos -0.0107 0.0327 34 -0.3271 0.7456 -0.0335 # estUnevenness mHC 0.0196 0.0270 34 0.7237 0.4742 0.0798 # estUnevenness sdHC 0.0281 0.0196 34 1.4336 0.1608 0.1590 # estRichness latitude 0.0869 0.0250 33 3.4823 0.0014 1.2810 ** # estRichness CrossShelfPos -1.0259 0.5508 33 -1.8625 0.0715 -1.5927 # estRichness mHC -0.1350 0.0551 33 -2.4504 0.0197 -0.2728 * # estRichness sdHC 0.0657 0.0407 33 1.6132 0.1162 0.1841 # estRichness latitude:CrossShelfPos -0.0769 0.0299 33 -2.5730 0.0148 -2.5233 * # DD.cublog latitude 0.6698 0.6071 34 1.1034 0.2776 0.1588 # DD.cublog CrossShelfPos 4.6898 5.4975 34 0.8531 0.3996 0.1171 # DD.cublog mHC -7.2873 4.5514 34 -1.6011 0.1186 -0.2368 # DD.cublog sdHC 14.6458 3.2967 34 4.4426 0.0001 0.6606 *** # -------------------------------- AIC(DivDDclSEM2.trim1,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 80.457 675.457 34 39 DivDDclSEM2.trim2 <- psem( lm(cvpop ~ sdHC+estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+sdHC+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude+mHC+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC+sdHC), lm(DD.cublog ~ latitude+CrossShelfPos+mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim2) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # cvpop ~ latitude + ... coef 34 0.2665 0.7915 # cvpop ~ CrossShelfPos + ... coef 34 -0.4239 0.6743 # estUnevenness ~ CrossShelfPos + ... coef 34 -0.3271 0.7456 # cvpop ~ mHC + ... coef 34 -0.3837 0.7036 # phi ~ mHC + ... coef 33 0.2494 0.8046 # phi ~ cvpop + ... coef 32 -1.8848 0.0686 # estRichness ~ cvpop + ... coef 30 -0.0628 0.9503 # DD.cublog ~ estUnevenness + ... coef 33 1.3542 0.1849 # estRichness ~ estUnevenness + ... coef 32 -0.9600 0.3442 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 31 -1.0355 0.3085 # #-- #Global goodness-of-fit: # #Chi-Squared = 9.984 with P-value = 0.617 and on 12 degrees of freedom #Fisher's C = 18.132 with P-value = 0.797 and on 24 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop sdHC 0.0410 0.0468 35 0.8755 0.3873 0.1439 # cvpop estUnevenness 0.4374 0.2235 35 1.9570 0.0584 0.2714 # cvpop DD.cublog 0.0058 0.0020 35 2.9344 0.0059 0.4484 ** # phi latitude 0.0617 0.0307 34 2.0064 0.0528 0.4112 # phi CrossShelfPos -0.7764 0.1811 34 -4.2877 0.0001 -0.5455 *** # phi sdHC -0.1986 0.1080 34 -1.8393 0.0746 -0.2520 # phi estUnevenness 2.4761 0.9484 34 2.6108 0.0133 0.5546 * # estUnevenness latitude -0.0243 0.0035 35 -6.8857 0.0000 -0.7245 *** # estUnevenness mHC 0.0206 0.0265 35 0.7787 0.4414 0.0842 # estUnevenness sdHC 0.0266 0.0188 35 1.4139 0.1662 0.1506 # estRichness latitude 0.0869 0.0250 33 3.4823 0.0014 1.2810 ** # estRichness CrossShelfPos -1.0259 0.5508 33 -1.8625 0.0715 -1.5927 # estRichness mHC -0.1350 0.0551 33 -2.4504 0.0197 -0.2728 * # estRichness sdHC 0.0657 0.0407 33 1.6132 0.1162 0.1841 # estRichness latitude:CrossShelfPos -0.0769 0.0299 33 -2.5730 0.0148 -2.5233 * # DD.cublog latitude 0.6698 0.6071 34 1.1034 0.2776 0.1588 # DD.cublog CrossShelfPos 4.6898 5.4975 34 0.8531 0.3996 0.1171 # DD.cublog mHC -7.2873 4.5514 34 -1.6011 0.1186 -0.2368 # DD.cublog sdHC 14.6458 3.2967 34 4.4426 0.0001 0.6606 *** # ------------------------------------------- AIC(DivDDclSEM2.trim2,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 76.132 269.465 29 39 # Try dropping terms with P> 0.3 DivDDclSEM2.trim3 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+sdHC+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC+sdHC), lm(DD.cublog ~ latitude+mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim3) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ CrossShelfPos + ... coef 35 -0.4203 0.6769 # DD.cublog ~ CrossShelfPos + ... coef 34 0.8531 0.3996 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # estUnevenness ~ mHC + ... coef 35 0.7787 0.4414 # phi ~ mHC + ... coef 33 0.2494 0.8046 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 32 -0.9600 0.3442 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 31 -1.0355 0.3085 # cvpop ~ phi + ... coef 32 -1.8848 0.0686 # cvpop ~ estRichness + ... coef 30 -0.0628 0.9503 # #-- #Global goodness-of-fit: # #Chi-Squared = 12.344 with P-value = 0.72 and on 16 degrees of freedom #Fisher's C = 22.475 with P-value = 0.836 and on 30 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi latitude 0.0617 0.0307 34 2.0064 0.0528 0.4112 # phi CrossShelfPos -0.7764 0.1811 34 -4.2877 0.0001 -0.5455 *** # phi sdHC -0.1986 0.1080 34 -1.8393 0.0746 -0.2520 # phi estUnevenness 2.4761 0.9484 34 2.6108 0.0133 0.5546 * # estUnevenness latitude -0.0250 0.0034 36 -7.3770 0.0000 -0.7457 *** # estUnevenness sdHC 0.0310 0.0178 36 1.7359 0.0911 0.1755 # estRichness latitude 0.0869 0.0250 33 3.4823 0.0014 1.2810 ** # estRichness CrossShelfPos -1.0259 0.5508 33 -1.8625 0.0715 -1.5927 # estRichness mHC -0.1350 0.0551 33 -2.4504 0.0197 -0.2728 * # estRichness sdHC 0.0657 0.0407 33 1.6132 0.1162 0.1841 # estRichness latitude:CrossShelfPos -0.0769 0.0299 33 -2.5730 0.0148 -2.5233 * # DD.cublog latitude 0.6072 0.6003 35 1.0115 0.3187 0.1440 # DD.cublog mHC -7.7552 4.5006 35 -1.7231 0.0937 -0.2520 # DD.cublog sdHC 15.2948 3.1952 35 4.7868 0.0000 0.6899 *** # # ---------------------------------- # Now effect of unevenness on cvpop is significant. AIC(DivDDclSEM2.trim3,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 74.475 191.475 26 39 # Remove latitude effect on DD: DivDDclSEM2.trim4 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+sdHC+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC+sdHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim4) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ CrossShelfPos + ... coef 35 -0.4203 0.6769 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # estUnevenness ~ mHC + ... coef 35 0.7787 0.4414 # phi ~ mHC + ... coef 33 0.2494 0.8046 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 32 -0.9600 0.3442 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 31 -1.0355 0.3085 # cvpop ~ phi + ... coef 32 -1.8848 0.0686 # cvpop ~ estRichness + ... coef 30 -0.0628 0.9503 # #-- #Global goodness-of-fit: # #Chi-Squared = 13.468 with P-value = 0.704 and on 17 degrees of freedom #Fisher's C = 24.417 with P-value = 0.829 and on 32 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi latitude 0.0617 0.0307 34 2.0064 0.0528 0.4112 # phi CrossShelfPos -0.7764 0.1811 34 -4.2877 0.0001 -0.5455 *** # phi sdHC -0.1986 0.1080 34 -1.8393 0.0746 -0.2520 # phi estUnevenness 2.4761 0.9484 34 2.6108 0.0133 0.5546 * # estUnevenness latitude -0.0250 0.0034 36 -7.3770 0.0000 -0.7457 *** # estUnevenness sdHC 0.0310 0.0178 36 1.7359 0.0911 0.1755 # estRichness latitude 0.0869 0.0250 33 3.4823 0.0014 1.2810 ** # estRichness CrossShelfPos -1.0259 0.5508 33 -1.8625 0.0715 -1.5927 # estRichness mHC -0.1350 0.0551 33 -2.4504 0.0197 -0.2728 * # estRichness sdHC 0.0657 0.0407 33 1.6132 0.1162 0.1841 # estRichness latitude:CrossShelfPos -0.0769 0.0299 33 -2.5730 0.0148 -2.5233 * # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 ***# --------------------------------- AIC(DivDDclSEM2.trim4,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 74.417 174.417 25 39 # Now try dropping the sdHC effect on richness: DivDDclSEM2.trim5 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+sdHC+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude+sdHC,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim5) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ CrossShelfPos + ... coef 35 -0.4203 0.6769 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # estRichness ~ sdHC + ... coef 33 1.6132 0.1162 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # estUnevenness ~ mHC + ... coef 35 0.7787 0.4414 # phi ~ mHC + ... coef 33 0.2494 0.8046 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 32 -0.9600 0.3442 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 31 -1.0355 0.3085 # cvpop ~ phi + ... coef 32 -1.8848 0.0686 # cvpop ~ estRichness + ... coef 31 0.2242 0.8240 # #-- #Global goodness-of-fit: # #Chi-Squared = 16.429 with P-value = 0.563 and on 18 degrees of freedom #Fisher's C = 29.007 with P-value = 0.711 and on 34 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi latitude 0.0617 0.0307 34 2.0064 0.0528 0.4112 # phi CrossShelfPos -0.7764 0.1811 34 -4.2877 0.0001 -0.5455 *** # phi sdHC -0.1986 0.1080 34 -1.8393 0.0746 -0.2520 # phi estUnevenness 2.4761 0.9484 34 2.6108 0.0133 0.5546 * # estUnevenness latitude -0.0250 0.0034 36 -7.3770 0.0000 -0.7457 *** # estUnevenness sdHC 0.0310 0.0178 36 1.7359 0.0911 0.1755 # estRichness latitude 0.0942 0.0251 34 3.7531 0.0007 1.3891 *** # estRichness CrossShelfPos -1.2125 0.5510 34 -2.2003 0.0347 -1.8824 * # estRichness mHC -0.1050 0.0531 34 -1.9780 0.0561 -0.2120 # estRichness latitude:CrossShelfPos -0.0883 0.0297 34 -2.9764 0.0053 -2.9006 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** # ------------------- AIC(DivDDclSEM2.trim5,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 77.007 162.721 24 39 # Now drop sdHC effect on evenness DivDDclSEM2.trim6 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+estUnevenness+sdHC, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim6) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # estRichness ~ sdHC + ... coef 33 1.6132 0.1162 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # estUnevenness ~ mHC + ... coef 36 1.2429 0.2219 # phi ~ mHC + ... coef 33 0.2494 0.8046 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 33 -0.5054 0.6167 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 31 -1.0355 0.3085 # cvpop ~ phi + ... coef 32 -1.8848 0.0686 # cvpop ~ estRichness + ... coef 31 0.2242 0.8240 # #-- #Global goodness-of-fit: # #Chi-Squared = 19.564 with P-value = 0.421 and on 19 degrees of freedom #Fisher's C = 33.321 with P-value = 0.597 and on 36 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi latitude 0.0617 0.0307 34 2.0064 0.0528 0.4112 # phi CrossShelfPos -0.7764 0.1811 34 -4.2877 0.0001 -0.5455 *** # phi estUnevenness 2.4761 0.9484 34 2.6108 0.0133 0.5546 * # phi sdHC -0.1986 0.1080 34 -1.8393 0.0746 -0.2520 # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.0942 0.0251 34 3.7531 0.0007 1.3891 *** # estRichness CrossShelfPos -1.2125 0.5510 34 -2.2003 0.0347 -1.8824 * # estRichness mHC -0.1050 0.0531 34 -1.9780 0.0561 -0.2120 # estRichness latitude:CrossShelfPos -0.0883 0.0297 34 -2.9764 0.0053 -2.9006 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** AIC(DivDDclSEM2.trim6,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 79.321 152.921 23 39 # # Let's drop the effect of sdHC on phi DivDDclSEM2.trim7 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ latitude+CrossShelfPos+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim7) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # estUnevenness ~ mHC + ... coef 36 1.2429 0.2219 # phi ~ mHC + ... coef 34 -0.2529 0.8019 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # phi ~ sdHC + ... coef 34 -1.8393 0.0746 # estRichness ~ sdHC + ... coef 33 1.6132 0.1162 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 33 -0.5054 0.6167 # phi ~ DD.cublog + ... coef 32 -0.5048 0.6172 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 32 -1.5891 0.1219 # cvpop ~ phi + ... coef 33 -2.0655 0.0468 * # cvpop ~ estRichness + ... coef 31 0.2242 0.8240 # #-- #Global goodness-of-fit: # #Chi-Squared = 23.263 with P-value = 0.276 and on 20 degrees of freedom #Fisher's C = 41.14 with P-value = 0.335 and on 38 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi latitude 0.0584 0.0317 35 1.8404 0.0742 0.3892 # phi CrossShelfPos -0.8483 0.1827 35 -4.6421 0.0000 -0.5959 *** # phi estUnevenness 1.9772 0.9392 35 2.1052 0.0425 0.4428 * # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.0942 0.0251 34 3.7531 0.0007 1.3891 *** # estRichness CrossShelfPos -1.2125 0.5510 34 -2.2003 0.0347 -1.8824 * # estRichness mHC -0.1050 0.0531 34 -1.9780 0.0561 -0.2120 # estRichness latitude:CrossShelfPos -0.0883 0.0297 34 -2.9764 0.0053 -2.9006 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** AIC(DivDDclSEM2.trim7,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 85.14 148.39 22 39 # OK still improving so now try dropping the effect of latitude on phi: DivDDclSEM2.trim8 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ CrossShelfPos+estUnevenness, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim8) # Independ.Claim Test.Type DF Crit.Value P.Value # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # phi ~ latitude + ... coef 35 1.8404 0.0742 # estUnevenness ~ mHC + ... coef 36 1.2429 0.2219 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # phi ~ mHC + ... coef 35 -0.3534 0.7259 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # estRichness ~ sdHC + ... coef 33 1.6132 0.1162 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # phi ~ sdHC + ... coef 35 -1.6549 0.1069 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # estRichness ~ estUnevenness + ... coef 33 -0.5054 0.6167 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # phi ~ DD.cublog + ... coef 33 0.0886 0.9300 # cvpop ~ estRichness + ... coef 31 0.2242 0.8240 # phi ~ estRichness + ... coef 32 -1.5891 0.1219 # phi ~ cvpop + ... coef 34 -1.9055 0.0652 # #-- #Global goodness-of-fit: # #Chi-Squared = 29.665 with P-value = 0.127 and on 22 degrees of freedom #Fisher's C = 44.339 with P-value = 0.294 and on 40 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi CrossShelfPos -0.8830 0.1877 36 -4.7044 0.0000 -0.6203 *** # phi estUnevenness 0.6036 0.5887 36 1.0252 0.3121 0.1352 # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.0942 0.0251 34 3.7531 0.0007 1.3891 *** # estRichness CrossShelfPos -1.2125 0.5510 34 -2.2003 0.0347 -1.8824 * # estRichness mHC -0.1050 0.0531 34 -1.9780 0.0561 -0.2120 # estRichness latitude:CrossShelfPos -0.0883 0.0297 34 -2.9764 0.0053 -2.9006 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** AIC(DivDDclSEM2.trim8,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 86.339 140.692 21 39 # Model is still improving. Now try to drop the evenness effect on phi: DivDDclSEM2.trim9 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ CrossShelfPos, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos+mHC), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim9) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # phi ~ latitude + ... coef 36 0.2637 0.7935 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ mHC + ... coef 36 1.2429 0.2219 # phi ~ mHC + ... coef 36 0.0671 0.9469 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # phi ~ sdHC + ... coef 36 -1.1034 0.2772 # estRichness ~ sdHC + ... coef 33 1.6132 0.1162 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # phi ~ estUnevenness + ... coef 35 2.1052 0.0425 * # estRichness ~ estUnevenness + ... coef 33 -0.5054 0.6167 # phi ~ DD.cublog + ... coef 34 0.0956 0.9244 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 33 -1.6958 0.0993 # cvpop ~ phi + ... coef 34 -1.9055 0.0652 # cvpop ~ estRichness + ... coef 31 0.2242 0.8240 # #-- #Global goodness-of-fit: # #Chi-Squared = 27.988 with P-value = 0.176 and on 22 degrees of freedom #Fisher's C = 43.899 with P-value = 0.391 and on 42 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi CrossShelfPos -0.8600 0.1865 37 -4.6118 0.0000 -0.6042 *** # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.0942 0.0251 34 3.7531 0.0007 1.3891 *** # estRichness CrossShelfPos -1.2125 0.5510 34 -2.2003 0.0347 -1.8824 * # estRichness mHC -0.1050 0.0531 34 -1.9780 0.0561 -0.2120 # estRichness latitude:CrossShelfPos -0.0883 0.0297 34 -2.9764 0.0053 -2.9006 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** AIC(DivDDclSEM2.trim9,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 83.899 130.566 20 39 # Model is STILL improving. Drop mean coral cover effect on richness DivDDclSEM2.trim10 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ CrossShelfPos, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos), lm(DD.cublog ~ mHC+sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim10) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 35 0.7227 0.4747 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # DD.cublog ~ latitude + ... coef 35 1.0115 0.3187 # phi ~ latitude + ... coef 36 0.2637 0.7935 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ mHC + ... coef 36 1.2429 0.2219 # phi ~ mHC + ... coef 36 0.0671 0.9469 # estRichness ~ mHC + ... coef 34 -1.9780 0.0561 # cvpop ~ mHC + ... coef 35 -0.0235 0.9814 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # phi ~ sdHC + ... coef 36 -1.1034 0.2772 # estRichness ~ sdHC + ... coef 34 0.7782 0.4419 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # DD.cublog ~ estUnevenness + ... coef 34 1.3060 0.2003 # phi ~ estUnevenness + ... coef 35 2.1052 0.0425 * # estRichness ~ estUnevenness + ... coef 34 -0.8591 0.3963 # phi ~ DD.cublog + ... coef 34 0.0956 0.9244 # estRichness ~ DD.cublog + ... coef 32 -0.4588 0.6495 # estRichness ~ phi + ... coef 34 -1.6992 0.0984 # cvpop ~ phi + ... coef 34 -1.9055 0.0652 # cvpop ~ estRichness + ... coef 32 0.2296 0.8198 # #-- #Global goodness-of-fit: # #Chi-Squared = 32.236 with P-value = 0.095 and on 23 degrees of freedom #Fisher's C = 47.903 with P-value = 0.317 and on 44 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi CrossShelfPos -0.8600 0.1865 37 -4.6118 0.0000 -0.6042 *** # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.1023 0.0258 35 3.9662 0.0003 1.5077 *** # estRichness CrossShelfPos -1.2758 0.5725 35 -2.2283 0.0324 -1.9807 * # estRichness latitude:CrossShelfPos -0.0921 0.0308 35 -2.9890 0.0051 -3.0253 ** # DD.cublog mHC -8.9323 4.3489 36 -2.0539 0.0473 -0.2903 * # DD.cublog sdHC 14.6581 3.1336 36 4.6777 0.0000 0.6611 *** AIC(DivDDclSEM2.trim10,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 85.903 125.903 19 39 # Model is STILL better. OK now drop the effect of mHC on DD DivDDclSEM2.trim11 <- psem( lm(cvpop ~ estUnevenness+DD.cublog, ecol.table.new), lm(phi ~ CrossShelfPos, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos), lm(DD.cublog ~ sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim11) # Independ.Claim Test.Type DF Crit.Value P.Value # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # DD.cublog ~ CrossShelfPos + ... coef 36 0.8733 0.3883 # cvpop ~ CrossShelfPos + ... coef 35 -0.3338 0.7405 # DD.cublog ~ latitude + ... coef 36 1.4688 0.1506 # phi ~ latitude + ... coef 36 0.2637 0.7935 # cvpop ~ latitude + ... coef 35 0.1558 0.8771 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # phi ~ sdHC + ... coef 36 -1.1034 0.2772 # estRichness ~ sdHC + ... coef 34 0.7782 0.4419 # cvpop ~ sdHC + ... coef 35 0.8755 0.3873 # DD.cublog ~ estUnevenness + ... coef 35 1.0302 0.3100 # phi ~ estUnevenness + ... coef 35 2.1052 0.0425 * # estRichness ~ estUnevenness + ... coef 34 -0.8591 0.3963 # phi ~ DD.cublog + ... coef 35 -0.0720 0.9430 # estRichness ~ DD.cublog + ... coef 33 0.1467 0.8843 # estRichness ~ phi + ... coef 34 -1.6992 0.0984 # cvpop ~ phi + ... coef 34 -1.9055 0.0652 # cvpop ~ estRichness + ... coef 32 0.2296 0.8198 # #-- #Global goodness-of-fit: # #Chi-Squared = 26.074 with P-value = 0.128 and on 19 degrees of freedom #Fisher's C = 39.354 with P-value = 0.322 and on 36 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop estUnevenness 0.5111 0.2064 36 2.4755 0.0181 0.3171 * # cvpop DD.cublog 0.0067 0.0016 36 4.0666 0.0002 0.5208 *** # phi CrossShelfPos -0.8600 0.1865 37 -4.6118 0.0000 -0.6042 *** # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.1023 0.0258 35 3.9662 0.0003 1.5077 *** # estRichness CrossShelfPos -1.2758 0.5725 35 -2.2283 0.0324 -1.9807 * # estRichness latitude:CrossShelfPos -0.0921 0.0308 35 -2.9890 0.0051 -3.0253 ** # DD.cublog sdHC 12.2766 3.0352 37 4.0448 0.0003 0.5537 *** AIC(DivDDclSEM2.trim11,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 75.354 109.554 18 39 # Model keeps getting better. Drop effect of evenness on cvpop DivDDclSEM2.trim12 <- psem( lm(cvpop ~ DD.cublog, ecol.table.new), lm(phi ~ CrossShelfPos, ecol.table.new), lm(estUnevenness ~ latitude,ecol.table.new), lm(estRichness ~ latitude*CrossShelfPos), lm(DD.cublog ~ sdHC,ecol.table.new), data=ecol.table.new ) summary(DivDDclSEM2.trim12) #--- #Tests of directed separation: # # Independ.Claim Test.Type DF Crit.Value P.Value # DD.cublog ~ CrossShelfPos + ... coef 36 0.8733 0.3883 # estUnevenness ~ CrossShelfPos + ... coef 36 -0.0587 0.9535 # cvpop ~ CrossShelfPos + ... coef 36 -0.1203 0.9049 # DD.cublog ~ latitude + ... coef 36 1.4688 0.1506 # phi ~ latitude + ... coef 36 0.2637 0.7935 # cvpop ~ latitude + ... coef 36 -1.8571 0.0715 # phi ~ sdHC + ... coef 36 -1.1034 0.2772 # estUnevenness ~ sdHC + ... coef 36 1.7359 0.0911 # estRichness ~ sdHC + ... coef 34 0.7782 0.4419 # cvpop ~ sdHC + ... coef 36 1.6747 0.1027 # phi ~ DD.cublog + ... coef 35 -0.0720 0.9430 # estUnevenness ~ DD.cublog + ... coef 35 1.0302 0.3100 # estRichness ~ DD.cublog + ... coef 33 0.1467 0.8843 # estUnevenness ~ phi + ... coef 35 2.1052 0.0425 * # estRichness ~ phi + ... coef 34 -1.6992 0.0984 # cvpop ~ phi + ... coef 35 -1.2740 0.2111 # estRichness ~ estUnevenness + ... coef 34 -0.8591 0.3963 # cvpop ~ estUnevenness + ... coef 35 1.5503 0.1301 # cvpop ~ estRichness + ... coef 33 -0.0346 0.9726 # #-- #Global goodness-of-fit: # #Chi-Squared = 32.205 with P-value = 0.041 and on 20 degrees of freedom #Fisher's C = 48.011 with P-value = 0.128 and on 38 degrees of freedom # #--- #Coefficients: # # Response Predictor Estimate Std.Error DF Crit.Value P.Value Std.Estimate # cvpop DD.cublog 0.0073 0.0017 37 4.2353 0.0001 0.5714 *** # phi CrossShelfPos -0.8600 0.1865 37 -4.6118 0.0000 -0.6042 *** # estUnevenness latitude -0.0268 0.0033 37 -8.0529 0.0000 -0.7979 *** # estRichness latitude 0.1023 0.0258 35 3.9662 0.0003 1.5077 *** # estRichness CrossShelfPos -1.2758 0.5725 35 -2.2283 0.0324 -1.9807 * # estRichness latitude:CrossShelfPos -0.0921 0.0308 35 -2.9890 0.0051 -3.0253 ** # DD.cublog sdHC 12.2766 3.0352 37 4.0448 0.0003 0.5537 *** AIC(DivDDclSEM2.trim12,AIC.type="dsep",aicc=TRUE) # AIC AICc K n #1 82.011 111.154 17 39 # OK now the fit is worse ################ # So the best AIC model by d-separation tests is trim 11 #####################