We fitted a model relating species richness of shallow water ostracods to seven environmental predictors: water depth, bottom water temperature, salinity, productivity (particulate organic carbon flux to ocean floor), productivity squared (because of commonly observed hump-shaped relationships between richness and productivity in marine systems), seasonal variation in productivity, and the annual number of ice-free days; n = 129). To be consistent with Yasuhara et al’s original analysis, water depth and seasonal variation in productivity were both positively skewed and were log-transformed, although the same argument could have been used for temperature. Additionally, all predictors were centered; note that centering does not affect the recommended measures of relative importance.
Ostracod. Anna Syme, CC Attribution 2.5 Generic
The paper is here
Yasuhara, M., Hunt, G., van Dijken, G., Arrigo, K. R., Cronin, T. M. & Wollenburg, J. E. (2012). Patterns and controlling factors of species diversity in the Arctic Ocean. Journal of Biogeography, 39, 2081-88.
First, load the required packages (relaimpo, car, hier.part, MuMIn, lm.beta)
Import yasuhara data file (yasuhara.csv)
Note that yasuhara_salmod is actually the file that’s imported for now; it is a subset of the full data set, with some low sal values removed. This is the data used for analysis in the paper.
Note. The yasuhara file associated with the paper is the full data set. The analyses of shallow-water ostracods used a subset of that data. Four deep sites (depth >200m) were excluded, as were three with a freshwater influence (salinity <21)
yasuhara <- read.csv("../data/yasuhara.csv")
yasuhara <- subset(yasuhara, salinity>21 & depth <= 200)
head(yasuhara,10)
Note: have changed original csv file names to match those in code below
scatterplotMatrix(~sprich+depth+temp+salinity+prod+seasprod+icefree, data=yasuhara, cex=.5, regLine=FALSE, diagonal=list(method='boxplot'))
Transform variables as needed, including quadratic for productivity
Center predictors as well
yasuhara$prod2 <- (yasuhara$prod)^2
yasuhara$ldepth <- log10(yasuhara$depth)
yasuhara$lseasprod <- log10(yasuhara$seasprod)
yasuhara$cldepth <- scale(yasuhara$ldepth, center=TRUE, scale=FALSE)
yasuhara$ctemp <- scale(yasuhara$temp, center=TRUE, scale=FALSE)
yasuhara$csalinity <- scale(yasuhara$salinity, center=TRUE, scale=FALSE)
yasuhara$cprod <- scale(yasuhara$prod, center=TRUE, scale=FALSE)
yasuhara$cprod2 <- scale(yasuhara$prod2, center=TRUE, scale=FALSE)
yasuhara$clseasprod <- scale(yasuhara$lseasprod, center=TRUE, scale=FALSE)
yasuhara$cicefree <- scale(yasuhara$icefree, center=TRUE, scale=FALSE)
Get VIFs to check for collinearity issues; also look at correlations Fit regression model to get influence measures
vif(lm(sprich~cldepth+ctemp+csalinity+cprod+cprod2+clseasprod+cicefree, data=yasuhara))
cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
4.352417 3.543887 4.992620 27.660590 20.767683 15.523035 20.760021
cor(yasuhara[,c('cldepth','ctemp','csalinity','cprod','cprod2','clseasprod','cicefree')])
cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
cldepth 1.00000000 0.3891785 0.84784714 -0.09488397 0.01871298 -0.08130645 -0.2781119
ctemp 0.38917848 1.0000000 0.34629660 0.22755053 0.22625504 -0.52110033 -0.7319989
csalinity 0.84784714 0.3462966 1.00000000 -0.32989442 -0.22711552 0.05660052 -0.1560640
cprod -0.09488397 0.2275505 -0.32989442 1.00000000 0.95956750 -0.72386615 -0.6336593
cprod2 0.01871298 0.2262550 -0.22711552 0.95956750 1.00000000 -0.63201614 -0.5939684
clseasprod -0.08130645 -0.5211003 0.05660052 -0.72386615 -0.63201614 1.00000000 0.9210498
cicefree -0.27811191 -0.7319989 -0.15606404 -0.63365926 -0.59396839 0.92104981 1.0000000
scatterplotMatrix(~sprich+cldepth+ctemp+csalinity+cprod+cprod2+clseasprod+cicefree, data=yasuhara, cex=.5, regLine=FALSE, diagonal=list(method='boxplot'))
yasuhara.lm <- lm(sprich~cldepth+ctemp+csalinity+cprod+cprod2+clseasprod+cicefree, data=yasuhara)
plot(yasuhara.lm)
augment(yasuhara.lm)
NA
Examine model output
tidy(yasuhara.lm, conf.int=TRUE)
lm.beta.yasuhara <- lm.beta(yasuhara.lm)
lm.beta.yasuhara
Call:
lm(formula = sprich ~ cldepth + ctemp + csalinity + cprod + cprod2 +
clseasprod + cicefree, data = yasuhara)
Standardized Coefficients::
(Intercept) cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
NA 0.1690832 -0.4625760 0.2826530 -0.5191710 0.1263809 -0.7765347 0.2955774
std.coef(yasuhara.lm, partial.sd=FALSE)
Estimate* Std. Error* df
(Intercept) 0.00000 0.00000 121
cldepth 0.16908 0.15651 121
ctemp -0.46258 0.14122 121
csalinity 0.28265 0.16762 121
cprod -0.51917 0.39455 121
cprod2 0.12638 0.34187 121
clseasprod -0.77653 0.29557 121
cicefree 0.29558 0.34181 121
std.coef(yasuhara.lm, partial.sd=TRUE)
Estimate* Std. Error* df
(Intercept) 0.00000 0.00000 121
cldepth 0.52569 0.48659 121
ctemp -1.59381 0.48659 121
csalinity 0.82051 0.48659 121
cprod -0.64028 0.48659 121
cprod2 0.17988 0.48659 121
clseasprod -1.27840 0.48659 121
cicefree 0.42078 0.48659 121
calc.relimp(yasuhara.lm, type = c("lmg", "pmvd", "last", "first", "betasq", "pratt"), rela=FALSE)
Response variable: sprich
Total response variance: 42.40007
Analysis based on 129 observations
7 Regressors:
cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
Proportion of variance explained by model: 31.9%
Metrics are not normalized (rela=FALSE).
Relative importance metrics:
lmg pmvd last first betasq pratt
cldepth 0.04585922 0.028074571 0.0065685629 0.068259277 0.02858913 0.04417548
ctemp 0.08247454 0.088397149 0.0603790501 0.040057552 0.21397655 0.09258173
csalinity 0.06431606 0.097053096 0.0160021617 0.101320302 0.07989271 0.08997085
cprod 0.03329101 0.047321887 0.0097444976 0.056471134 0.26953855 0.12337402
cprod2 0.02508002 0.003789243 0.0007690854 0.049404358 0.01597212 -0.02809079
clseasprod 0.04138893 0.046455138 0.0388458895 0.001220917 0.60300611 -0.02713338
cicefree 0.02662583 0.007944537 0.0042083759 0.006679892 0.08736597 0.02415772
Average coefficients for different model sizes:
1X 2Xs 3Xs 4Xs 5Xs 6Xs 7Xs
cldepth 3.4063617807 3.148954e+00 3.127298e+00 3.026922e+00 2.929623e+00 2.667016e+00 2.204501e+00
ctemp -0.6187634981 -8.102006e-01 -1.206430e+00 -1.513119e+00 -1.610497e+00 -1.576792e+00 -1.430097e+00
csalinity 1.0166022108 1.060860e+00 1.097903e+00 1.146328e+00 1.080044e+00 9.772467e-01 9.027269e-01
cprod -0.0261160393 -2.985905e-02 -3.049686e-02 -3.221847e-02 -3.832766e-02 -4.901019e-02 -5.705642e-02
cprod2 -0.0001128541 -9.316944e-05 -8.384049e-05 -7.733780e-05 -4.832558e-05 8.742253e-06 6.416765e-05
clseasprod 1.6030832095 -5.744933e+00 -1.606088e+01 -2.573282e+01 -3.230270e+01 -3.526878e+01 -3.562656e+01
cicefree 0.0115496083 6.981186e-03 1.077312e-02 2.013563e-02 3.047528e-02 3.673742e-02 4.176896e-02
yasuhara.boot <- boot.relimp(yasuhara.lm, b=1000, type = c("lmg", "pmvd"))
booteval.relimp(yasuhara.boot)
Response variable: sprich
Total response variance: 42.40007
Analysis based on 129 observations
7 Regressors:
cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
Proportion of variance explained by model: 31.9%
Metrics are not normalized (rela=FALSE).
Relative importance metrics:
lmg pmvd
cldepth 0.04585922 0.028074571
ctemp 0.08247454 0.088397149
csalinity 0.06431606 0.097053096
cprod 0.03329101 0.047321887
cprod2 0.02508002 0.003789243
clseasprod 0.04138893 0.046455138
cicefree 0.02662583 0.007944537
Average coefficients for different model sizes:
1X 2Xs 3Xs 4Xs 5Xs 6Xs 7Xs
cldepth 3.4063617807 3.148954e+00 3.127298e+00 3.026922e+00 2.929623e+00 2.667016e+00 2.204501e+00
ctemp -0.6187634981 -8.102006e-01 -1.206430e+00 -1.513119e+00 -1.610497e+00 -1.576792e+00 -1.430097e+00
csalinity 1.0166022108 1.060860e+00 1.097903e+00 1.146328e+00 1.080044e+00 9.772467e-01 9.027269e-01
cprod -0.0261160393 -2.985905e-02 -3.049686e-02 -3.221847e-02 -3.832766e-02 -4.901019e-02 -5.705642e-02
cprod2 -0.0001128541 -9.316944e-05 -8.384049e-05 -7.733780e-05 -4.832558e-05 8.742253e-06 6.416765e-05
clseasprod 1.6030832095 -5.744933e+00 -1.606088e+01 -2.573282e+01 -3.230270e+01 -3.526878e+01 -3.562656e+01
cicefree 0.0115496083 6.981186e-03 1.077312e-02 2.013563e-02 3.047528e-02 3.673742e-02 4.176896e-02
Confidence interval information ( 1000 bootstrap replicates, bty= perc ):
Relative Contributions with confidence intervals:
Lower Upper
percentage 0.95 0.95 0.95
cldepth.lmg 0.0459 ABCDEFG 0.0154 0.1130
ctemp.lmg 0.0825 ABCDEFG 0.0241 0.1712
csalinity.lmg 0.0643 ABCDEF_ 0.0258 0.1247
cprod.lmg 0.0333 ABCDEFG 0.0127 0.0917
cprod2.lmg 0.0251 _BCDEFG 0.0095 0.0752
clseasprod.lmg 0.0414 ABCDEFG 0.0219 0.0809
cicefree.lmg 0.0266 __CDEFG 0.0175 0.0510
cldepth.pmvd 0.0281 ABCDEFG 0.0000 0.1662
ctemp.pmvd 0.0884 ABCDEF_ 0.0113 0.1673
csalinity.pmvd 0.0971 ABCDEFG 0.0005 0.1996
cprod.pmvd 0.0473 ABCDEFG 0.0002 0.1401
cprod2.pmvd 0.0038 ABCDEFG 0.0000 0.0970
clseasprod.pmvd 0.0465 _BCDEF_ 0.0181 0.0934
cicefree.pmvd 0.0079 __CDEFG 0.0000 0.0629
Letters indicate the ranks covered by bootstrap CIs.
(Rank bootstrap confidence intervals always obtained by percentile method)
CAUTION: Bootstrap confidence intervals can be somewhat liberal.
Differences between Relative Contributions:
Lower Upper
difference 0.95 0.95 0.95
cldepth-ctemp.lmg -0.0366 -0.1300 0.0656
cldepth-csalinity.lmg -0.0185 -0.0686 0.0400
cldepth-cprod.lmg 0.0126 -0.0532 0.0877
cldepth-cprod2.lmg 0.0208 -0.0441 0.0922
cldepth-clseasprod.lmg 0.0045 -0.0501 0.0831
cldepth-cicefree.lmg 0.0192 -0.0259 0.0911
ctemp-csalinity.lmg 0.0182 -0.0773 0.1154
ctemp-cprod.lmg 0.0492 -0.0474 0.1357
ctemp-cprod2.lmg 0.0574 -0.0357 0.1487
ctemp-clseasprod.lmg 0.0411 -0.0406 0.1324
ctemp-cicefree.lmg 0.0558 -0.0082 0.1289
csalinity-cprod.lmg 0.0310 -0.0363 0.0894
csalinity-cprod2.lmg 0.0392 -0.0320 0.0996
csalinity-clseasprod.lmg 0.0229 -0.0287 0.0822
csalinity-cicefree.lmg 0.0377 -0.0120 0.0979
cprod-cprod2.lmg 0.0082 -0.0152 0.0293
cprod-clseasprod.lmg -0.0081 -0.0468 0.0464
cprod-cicefree.lmg 0.0067 -0.0242 0.0605
cprod2-clseasprod.lmg -0.0163 -0.0505 0.0335
cprod2-cicefree.lmg -0.0015 -0.0282 0.0458
clseasprod-cicefree.lmg 0.0148 -0.0087 0.0405
cldepth-ctemp.pmvd -0.0603 -0.1547 0.1068
cldepth-csalinity.pmvd -0.0690 -0.1904 0.1454
cldepth-cprod.pmvd -0.0192 -0.1170 0.1428
cldepth-cprod2.pmvd 0.0243 -0.0649 0.1486
cldepth-clseasprod.pmvd -0.0184 -0.0861 0.1287
cldepth-cicefree.pmvd 0.0201 -0.0508 0.1518
ctemp-csalinity.pmvd -0.0087 -0.1329 0.1249
ctemp-cprod.pmvd 0.0411 -0.0765 0.1403
ctemp-cprod2.pmvd 0.0846 -0.0418 0.1571
ctemp-clseasprod.pmvd 0.0419 -0.0545 0.1278
ctemp-cicefree.pmvd 0.0805 -0.0380 0.1564
csalinity-cprod.pmvd 0.0497 -0.1081 0.1712
csalinity-cprod2.pmvd 0.0933 -0.0686 0.1912
csalinity-clseasprod.pmvd 0.0506 -0.0586 0.1530
csalinity-cicefree.pmvd 0.0891 -0.0367 0.1894
cprod-cprod2.pmvd 0.0435 -0.0874 0.1276
cprod-clseasprod.pmvd 0.0009 -0.0643 0.0829
cprod-cicefree.pmvd 0.0394 -0.0368 0.1235
cprod2-clseasprod.pmvd -0.0427 -0.0833 0.0476
cprod2-cicefree.pmvd -0.0042 -0.0495 0.0857
clseasprod-cicefree.pmvd 0.0385 -0.0272 0.0843
* indicates that CI for difference does not include 0.
CAUTION: Bootstrap confidence intervals can be somewhat liberal.
yasuhara.lm1 <- lm(sprich~ldepth+temp+salinity+prod+lseasprod+icefree, data=yasuhara)
vif(lm(sprich~ldepth+temp+salinity+prod+lseasprod+icefree, data=yasuhara))
ldepth temp salinity prod lseasprod icefree
4.187101 3.451081 4.989499 2.979970 12.260591 19.008007
summary(yasuhara.lm1)
Call:
lm(formula = sprich ~ ldepth + temp + salinity + prod + lseasprod +
icefree, data = yasuhara)
Residuals:
Min 1Q Median 3Q Max
-9.2653 -4.1493 -0.6728 3.4358 21.5077
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -12.37608 20.03901 -0.618 0.537990
ldepth 2.35151 1.99432 1.179 0.240650
temp -1.45622 0.42933 -3.392 0.000936 ***
salinity 0.90767 0.53328 1.702 0.091293 .
prod -0.04192 0.01418 -2.956 0.003747 **
lseasprod -33.32844 12.00870 -2.775 0.006383 **
icefree 0.03658 0.04606 0.794 0.428562
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.507 on 122 degrees of freedom
Multiple R-squared: 0.3183, Adjusted R-squared: 0.2847
F-statistic: 9.493 on 6 and 122 DF, p-value: 1.502e-08
calc.relimp(yasuhara.lm, type = c("lmg", "pmvd", "last", "first", "betasq", "pratt"), rela=FALSE)
Response variable: sprich
Total response variance: 42.40007
Analysis based on 129 observations
7 Regressors:
cldepth ctemp csalinity cprod cprod2 clseasprod cicefree
Proportion of variance explained by model: 31.9%
Metrics are not normalized (rela=FALSE).
Relative importance metrics:
lmg pmvd last first betasq pratt
cldepth 0.04585922 0.028074571 0.0065685629 0.068259277 0.02858913 0.04417548
ctemp 0.08247454 0.088397149 0.0603790501 0.040057552 0.21397655 0.09258173
csalinity 0.06431606 0.097053096 0.0160021617 0.101320302 0.07989271 0.08997085
cprod 0.03329101 0.047321887 0.0097444976 0.056471134 0.26953855 0.12337402
cprod2 0.02508002 0.003789243 0.0007690854 0.049404358 0.01597212 -0.02809079
clseasprod 0.04138893 0.046455138 0.0388458895 0.001220917 0.60300611 -0.02713338
cicefree 0.02662583 0.007944537 0.0042083759 0.006679892 0.08736597 0.02415772
Average coefficients for different model sizes:
1X 2Xs 3Xs 4Xs 5Xs 6Xs 7Xs
cldepth 3.4063617807 3.148954e+00 3.127298e+00 3.026922e+00 2.929623e+00 2.667016e+00 2.204501e+00
ctemp -0.6187634981 -8.102006e-01 -1.206430e+00 -1.513119e+00 -1.610497e+00 -1.576792e+00 -1.430097e+00
csalinity 1.0166022108 1.060860e+00 1.097903e+00 1.146328e+00 1.080044e+00 9.772467e-01 9.027269e-01
cprod -0.0261160393 -2.985905e-02 -3.049686e-02 -3.221847e-02 -3.832766e-02 -4.901019e-02 -5.705642e-02
cprod2 -0.0001128541 -9.316944e-05 -8.384049e-05 -7.733780e-05 -4.832558e-05 8.742253e-06 6.416765e-05
clseasprod 1.6030832095 -5.744933e+00 -1.606088e+01 -2.573282e+01 -3.230270e+01 -3.526878e+01 -3.562656e+01
cicefree 0.0115496083 6.981186e-03 1.077312e-02 2.013563e-02 3.047528e-02 3.673742e-02 4.176896e-02
This step uses the subsets of the original dataframe into response and predictors.
yasuhara_sprich<-yasuhara$sprich
yasuhara_pred<-subset(yasuhara, select = c("cldepth","ctemp","csalinity","clseasprod","cicefree","cprod", "cprod2"))
hier.part(yasuhara_sprich, yasuhara_pred, family="gaussian", gof="Rsqu")
Error in hier.part(yasuhara_sprich, yasuhara_pred, family = "gaussian", :
could not find function "hier.part"
The package hier.part was removed from CRAN in March 2023. The code above will work if you have hier.part installed already. An alternative is to use the package glmm.hp, which is done in the next code chunk.
Hier.part can also be installed from Github, though there may be issues with M1/M2 Macs. The quick way from Github is using devtools: devtools::install_github(“cjbwalsh/hier.part”)
library (glmm.hp)
Loading required package: vegan
Loading required package: permute
This is vegan 2.6-4
Attaching package: ‘vegan’
The following object is masked from ‘package:survey’:
calibrate
glmm.hp(yasuhara.lm, type="R2")
Warning: 'r.squaredGLMM' now calculates a revised statistic. See the help page.
$Total.R2
[1] 0.3190356
$hierarchical.partitioning
Unique Average.share Individual I.perc(%)
cldepth 0.0066 0.0393 0.0459 14.38
ctemp 0.0604 0.0221 0.0825 25.85
csalinity 0.0160 0.0483 0.0643 20.15
cprod 0.0097 0.0236 0.0333 10.44
cprod2 0.0008 0.0243 0.0251 7.87
clseasprod 0.0388 0.0026 0.0414 12.97
cicefree 0.0042 0.0224 0.0266 8.34
$variables
[1] "cldepth" "ctemp" "csalinity" "cprod" "cprod2" "clseasprod" "cicefree"
$type
[1] "hierarchical.partitioning"
attr(,"class")
[1] "glmmhp"
options(na.action = "na.fail")
yasuhara.dredge <-dredge(yasuhara.lm, beta="none", evaluate=TRUE)
Fixed term is "(Intercept)"
yasuhara.dredge
Global model call: lm(formula = sprich ~ cldepth + ctemp + csalinity + cprod + cprod2 +
clseasprod + cicefree, data = yasuhara)
---
Model selection table
(Intrc) cicfr cldpt clssp cprod cprd2 cslnt ctemp df logLik AICc delta weight
109 14.3 -24.4200 -0.039950 1.3250 -1.6650 6 -400.517 813.7 0.00 0.175
111 14.3 2.2380 -25.0200 -0.044560 0.8302 -1.6970 7 -399.854 814.6 0.91 0.111
79 14.3 4.8830 -25.9700 -0.054010 -1.6350 6 -401.159 815.0 1.29 0.092
117 14.3 -20.2300 -1.403e-04 1.4800 -1.6320 6 -401.306 815.3 1.58 0.079
110 14.3 0.032700 -31.8200 -0.037380 1.4170 -1.4480 7 -400.252 815.4 1.71 0.074
125 14.3 -25.4600 -0.054120 5.737e-05 1.2790 -1.6740 7 -400.451 815.8 2.11 0.061
119 14.3 2.4260 -20.6300 -1.625e-04 0.9571 -1.6640 7 -400.562 816.0 2.33 0.055
112 14.3 0.036580 2.3520 -33.3300 -0.041920 0.9077 -1.4560 8 -399.521 816.2 2.52 0.050
127 14.3 2.1860 -25.3800 -0.049530 2.056e-05 0.8251 -1.6990 8 -399.846 816.9 3.17 0.036
80 14.3 0.022240 5.1010 -31.0800 -0.052940 -1.4860 7 -401.035 817.0 3.27 0.034
95 14.3 4.7460 -26.6700 -0.063770 4.086e-05 -1.6410 7 -401.128 817.2 3.46 0.031
118 14.3 0.027250 -26.4400 -1.297e-04 1.5510 -1.4520 7 -401.134 817.2 3.47 0.031
126 14.3 0.041230 -35.5800 -0.061590 1.007e-04 1.3590 -1.4080 8 -400.068 817.3 3.61 0.029
87 14.3 5.6230 -20.5400 -2.019e-04 -1.5810 6 -402.343 817.4 3.65 0.028
120 14.3 0.029010 2.4640 -27.2500 -1.516e-04 1.0250 -1.4730 8 -400.365 817.9 4.21 0.021
128 14.3 0.041770 2.2050 -35.6300 -0.057060 6.417e-05 0.9027 -1.4300 9 -399.448 818.4 4.69 0.017
96 14.3 0.028110 4.9210 -33.6500 -0.069740 7.149e-05 -1.4560 8 -400.947 819.1 5.37 0.012
88 14.3 0.009695 5.7120 -22.7500 -1.992e-04 -1.5150 7 -402.321 819.6 5.85 0.009
114 14.3 -0.067080 -1.384e-04 1.2720 -1.9290 6 -403.626 819.9 6.22 0.008
106 14.3 -0.073910 -0.033720 1.1360 -1.9670 6 -403.862 820.4 6.69 0.006
101 14.3 -12.0000 1.6320 -1.5870 5 -405.141 820.8 7.05 0.005
102 14.3 0.065960 -28.5400 1.7770 -1.1600 6 -404.058 820.8 7.08 0.005
116 14.3 -0.068080 2.2080 -1.583e-04 0.7932 -1.9610 7 -403.031 821.0 7.27 0.005
84 14.3 -0.070730 4.8530 -1.956e-04 -1.9300 6 -404.206 821.1 7.38 0.004
76 14.3 -0.080430 4.0800 -0.046420 -1.9860 6 -404.444 821.6 7.85 0.003
108 14.3 -0.074780 1.7630 -0.036990 0.7445 -1.9920 7 -403.470 821.9 8.14 0.003
122 14.3 -0.069540 -0.008138 -1.084e-04 1.2340 -1.9450 7 -403.603 822.1 8.41 0.003
104 14.3 0.068490 0.7526 -28.8900 1.6280 -1.1510 7 -403.982 822.9 9.17 0.002
103 14.3 0.3288 -11.8700 1.5640 -1.5900 6 -405.126 822.9 9.22 0.002
92 14.3 -0.075690 4.5560 -0.017220 -1.284e-04 -1.9640 7 -404.099 823.1 9.40 0.002
124 14.3 -0.069150 2.1870 -0.003569 -1.449e-04 0.7811 -1.9670 8 -403.027 823.3 9.53 0.001
98 14.3 -0.033560 1.4910 -1.6560 5 -406.840 824.2 10.45 0.001
46 14.3 0.142600 -50.1000 -0.026090 1.4670 6 -405.944 824.6 10.85 0.001
48 14.3 0.146800 2.2460 -51.6400 -0.030360 0.9805 7 -405.334 825.6 11.87 0.000
62 14.3 0.152700 -56.1100 -0.071480 1.864e-04 1.3570 7 -405.349 825.6 11.90 0.000
54 14.3 0.140500 -46.2100 -7.921e-05 1.5810 6 -406.676 826.0 12.32 0.000
38 14.3 0.151000 -44.9600 1.7260 5 -407.777 826.0 12.32 0.000
97 14.3 1.4070 -1.0900 4 -408.965 826.3 12.53 0.000
100 14.3 -0.032870 0.3998 1.4100 -1.6550 6 -406.819 826.3 12.61 0.000
16 14.3 0.133700 5.2190 -49.6000 -0.042040 6 -406.949 826.6 12.87 0.000
64 14.3 0.154700 1.8920 -56.4300 -0.067720 1.562e-04 0.9653 8 -404.928 827.1 13.33 0.000
56 14.3 0.143500 2.1910 -47.1800 -9.803e-05 1.1130 7 -406.118 827.2 13.44 0.000
32 14.3 0.142200 4.7950 -54.7200 -0.081510 1.658e-04 7 -406.503 827.9 14.21 0.000
40 14.3 0.153600 1.0330 -45.2800 1.5220 6 -407.642 828.0 14.25 0.000
99 14.3 1.2080 1.1670 -1.1210 5 -408.774 828.0 14.31 0.000
113 14.3 -2.557e-05 1.3510 -1.0360 5 -408.790 828.1 14.35 0.000
105 14.3 -0.001752 1.3830 -1.0710 5 -408.949 828.4 14.66 0.000
121 14.3 0.047130 -2.235e-04 1.5550 -1.1340 6 -407.852 828.4 14.67 0.000
24 14.3 0.126000 5.7200 -42.9000 -1.482e-04 6 -408.232 829.2 15.43 0.000
115 14.3 1.9050 -4.126e-05 0.9384 -1.0520 6 -408.380 829.4 15.73 0.000
123 14.3 2.2800 0.051570 -2.610e-04 1.0800 -1.1620 7 -407.264 829.5 15.73 0.000
93 14.3 -31.5300 -0.139600 3.336e-04 -1.2920 6 -408.580 829.8 16.13 0.000
107 14.3 1.4790 -0.004179 1.0570 -1.0830 6 -408.694 830.1 16.35 0.000
83 14.3 5.0430 -8.036e-05 -0.9734 5 -409.901 830.3 16.57 0.000
71 14.3 5.5210 -7.6080 -1.3950 5 -410.228 830.9 17.22 0.000
91 14.3 5.6930 0.039470 -2.530e-04 -1.0480 6 -409.244 831.2 17.46 0.000
75 14.3 4.8430 -0.014370 -0.9737 5 -410.550 831.6 17.87 0.000
72 14.3 0.055020 6.0310 -21.1400 -1.0370 6 -409.543 831.8 18.05 0.000
67 14.3 5.2110 -1.1000 4 -411.776 831.9 18.15 0.000
94 14.3 -0.016050 -27.4400 -0.134600 3.100e-04 -1.4050 7 -408.524 832.0 18.25 0.000
74 14.3 -0.096230 -0.059130 -1.7810 5 -410.838 832.2 18.44 0.000
77 14.3 -25.7500 -0.061630 -1.1280 5 -410.902 832.3 18.57 0.000
68 14.3 -0.020550 5.2260 -1.4300 5 -411.004 832.5 18.77 0.000
78 14.3 -0.053040 -13.5900 -0.063370 -1.5400 6 -410.187 833.1 19.34 0.000
90 14.3 -0.099160 -0.087220 1.301e-04 -1.8280 6 -410.432 833.6 19.83 0.000
8 14.3 0.133000 5.9760 -36.4400 5 -412.301 835.1 21.37 0.000
82 14.3 -0.075500 -2.172e-04 -1.5290 5 -413.722 837.9 24.21 0.000
30 14.3 0.095220 -47.9300 -0.144400 3.951e-04 6 -413.157 839.0 25.28 0.000
49 14.3 -8.029e-05 0.9019 4 -415.617 839.6 25.83 0.000
45 14.3 -9.2040 -0.033800 0.7288 5 -414.600 839.7 25.97 0.000
15 14.3 2.7010 -10.2200 -0.041670 5 -414.770 840.0 26.31 0.000
53 14.3 -6.2700 -1.256e-04 0.8619 5 -414.796 840.1 26.36 0.000
86 14.3 -0.073960 -0.4398 -2.173e-04 -1.5190 6 -413.721 840.1 26.41 0.000
41 14.3 -0.016360 0.8598 4 -415.909 840.1 26.42 0.000
19 14.3 3.4620 -1.154e-04 4 -415.996 840.3 26.59 0.000
85 14.3 -16.8500 -1.958e-04 -0.9408 5 -414.969 840.4 26.71 0.000
[ reached getOption("max.print") -- omitted 52 rows ]
Models ranked by AICc(x)
above results match table 1 in paper
yasuhara.ma<-model.avg(yasuhara.dredge)
summary(yasuhara.ma)
Call:
model.avg(object = yasuhara.dredge)
Component model call:
lm(formula = sprich ~ <128 unique rhs>, data = yasuhara)
Component models:
df logLik AICc delta weight
3467 6 -400.52 813.72 0.00 0.17
23467 7 -399.85 814.63 0.91 0.11
2347 6 -401.16 815.01 1.29 0.09
3567 6 -401.31 815.30 1.58 0.08
13467 7 -400.25 815.43 1.71 0.07
34567 7 -400.45 815.83 2.11 0.06
23567 7 -400.56 816.05 2.33 0.05
123467 8 -399.52 816.24 2.52 0.05
234567 8 -399.85 816.89 3.17 0.04
12347 7 -401.03 817.00 3.27 0.03
23457 7 -401.13 817.18 3.46 0.03
13567 7 -401.13 817.19 3.47 0.03
134567 8 -400.07 817.34 3.61 0.03
2357 6 -402.34 817.38 3.65 0.03
123567 8 -400.36 817.93 4.21 0.02
1234567 9 -399.45 818.41 4.69 0.02
123457 8 -400.95 819.09 5.37 0.01
12357 7 -402.32 819.57 5.85 0.01
1567 6 -403.63 819.94 6.22 0.01
1467 6 -403.86 820.41 6.69 0.01
367 5 -405.14 820.77 7.05 0.01
1367 6 -404.06 820.80 7.08 0.01
12567 7 -403.03 820.99 7.27 0.00
1257 6 -404.21 821.10 7.38 0.00
1247 6 -404.44 821.58 7.85 0.00
12467 7 -403.47 821.87 8.14 0.00
14567 7 -403.60 822.13 8.41 0.00
12367 7 -403.98 822.89 9.17 0.00
2367 6 -405.13 822.94 9.22 0.00
12457 7 -404.10 823.12 9.40 0.00
124567 8 -403.03 823.25 9.53 0.00
167 5 -406.84 824.17 10.45 0.00
1346 6 -405.94 824.58 10.85 0.00
12346 7 -405.33 825.59 11.87 0.00
13456 7 -405.35 825.62 11.90 0.00
1356 6 -406.68 826.04 12.32 0.00
136 5 -407.78 826.04 12.32 0.00
67 4 -408.96 826.25 12.53 0.00
1267 6 -406.82 826.33 12.61 0.00
1234 6 -406.95 826.59 12.87 0.00
123456 8 -404.93 827.06 13.33 0.00
12356 7 -406.12 827.16 13.44 0.00
12345 7 -406.50 827.93 14.21 0.00
1236 6 -407.64 827.97 14.25 0.00
267 5 -408.77 828.04 14.31 0.00
567 5 -408.79 828.07 14.35 0.00
467 5 -408.95 828.39 14.66 0.00
4567 6 -407.85 828.39 14.67 0.00
1235 6 -408.23 829.15 15.43 0.00
2567 6 -408.38 829.45 15.73 0.00
24567 7 -407.26 829.45 15.73 0.00
3457 6 -408.58 829.85 16.13 0.00
2467 6 -408.69 830.08 16.35 0.00
257 5 -409.90 830.29 16.57 0.00
237 5 -410.23 830.94 17.22 0.00
2457 6 -409.24 831.18 17.46 0.00
247 5 -410.55 831.59 17.87 0.00
1237 6 -409.54 831.77 18.05 0.00
27 4 -411.78 831.87 18.15 0.00
13457 7 -408.52 831.97 18.25 0.00
147 5 -410.84 832.16 18.44 0.00
347 5 -410.90 832.29 18.57 0.00
127 5 -411.00 832.50 18.77 0.00
1347 6 -410.19 833.06 19.34 0.00
1457 6 -410.43 833.55 19.83 0.00
123 5 -412.30 835.09 21.37 0.00
157 5 -413.72 837.93 24.21 0.00
1345 6 -413.16 839.00 25.28 0.00
56 4 -415.62 839.56 25.83 0.00
346 5 -414.60 839.69 25.97 0.00
234 5 -414.77 840.03 26.31 0.00
356 5 -414.80 840.08 26.36 0.00
1357 6 -413.72 840.13 26.41 0.00
46 4 -415.91 840.14 26.42 0.00
25 4 -416.00 840.31 26.59 0.00
357 5 -414.97 840.43 26.71 0.00
16 4 -416.06 840.44 26.72 0.00
235 5 -415.06 840.60 26.88 0.00
6 3 -417.34 840.88 27.15 0.00
24 4 -416.43 841.18 27.46 0.00
256 5 -415.42 841.33 27.61 0.00
156 5 -415.48 841.45 27.73 0.00
2346 6 -414.45 841.58 27.86 0.00
456 5 -415.56 841.60 27.88 0.00
2356 6 -414.58 841.85 28.13 0.00
3456 6 -414.59 841.88 28.16 0.00
134 5 -415.72 841.93 28.21 0.00
146 5 -415.77 842.02 28.30 0.00
246 5 -415.80 842.09 28.37 0.00
2345 6 -414.76 842.20 28.48 0.00
125 5 -415.94 842.37 28.65 0.00
245 5 -415.96 842.41 28.69 0.00
126 5 -416.02 842.54 28.82 0.00
36 4 -417.32 842.97 29.24 0.00
26 4 -417.32 842.97 29.25 0.00
1456 6 -415.23 843.15 29.43 0.00
1256 6 -415.28 843.25 29.53 0.00
124 5 -416.40 843.29 29.57 0.00
2456 6 -415.34 843.37 29.65 0.00
23456 7 -414.42 843.76 30.04 0.00
34 4 -417.73 843.78 30.05 0.00
1246 6 -415.66 844.00 30.28 0.00
12 4 -417.86 844.04 30.32 0.00
1245 6 -415.83 844.34 30.62 0.00
345 5 -417.16 844.80 31.08 0.00
12456 7 -414.97 844.86 31.14 0.00
236 5 -417.31 845.11 31.39 0.00
2 3 -419.67 845.54 31.81 0.00
47 4 -418.93 846.17 32.45 0.00
57 4 -419.34 847.00 33.28 0.00
4 3 -420.48 847.16 33.44 0.00
23 4 -419.45 847.23 33.50 0.00
35 4 -419.69 847.71 33.99 0.00
135 5 -418.74 847.96 34.24 0.00
5 3 -420.96 848.12 34.40 0.00
14 4 -419.94 848.20 34.48 0.00
457 5 -418.88 848.25 34.53 0.00
45 4 -420.45 849.23 35.51 0.00
7 3 -421.60 849.38 35.66 0.00
15 4 -420.70 849.72 36.00 0.00
145 5 -419.89 850.27 36.55 0.00
17 4 -420.99 850.29 36.57 0.00
37 4 -421.15 850.62 36.90 0.00
137 5 -420.96 852.41 38.69 0.00
(Null) 2 -424.23 852.56 38.84 0.00
1 3 -423.80 853.79 40.07 0.00
3 3 -424.15 854.50 40.78 0.00
13 4 -423.10 854.52 40.80 0.00
Term codes:
cicefree cldepth clseasprod cprod cprod2 csalinity ctemp
1 2 3 4 5 6 7
Model-averaged coefficients:
(full average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 1.430e+01 4.872e-01 4.920e-01 29.070 < 2e-16 ***
clseasprod -2.521e+01 1.057e+01 1.063e+01 2.371 0.0178 *
cprod -3.482e-02 3.043e-02 3.058e-02 1.139 0.2548
csalinity 9.334e-01 6.475e-01 6.494e-01 1.437 0.1506
ctemp -1.603e+00 3.812e-01 3.844e-01 4.170 3.04e-05 ***
cldepth 1.776e+00 2.326e+00 2.332e+00 0.761 0.4465
cprod2 -2.781e-05 1.097e-04 1.102e-04 0.252 0.8009
cicefree 7.191e-03 3.419e-02 3.438e-02 0.209 0.8343
(conditional average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 1.430e+01 4.872e-01 4.920e-01 29.070 < 2e-16 ***
clseasprod -2.619e+01 9.507e+00 9.579e+00 2.734 0.00625 **
cprod -4.690e-02 2.610e-02 2.633e-02 1.782 0.07481 .
csalinity 1.192e+00 4.769e-01 4.803e-01 2.481 0.01309 *
ctemp -1.609e+00 3.698e-01 3.731e-01 4.312 1.62e-05 ***
cldepth 3.414e+00 2.193e+00 2.206e+00 1.548 0.12165
cprod2 -6.413e-05 1.594e-04 1.603e-04 0.400 0.68915
cicefree 2.220e-02 5.723e-02 5.757e-02 0.386 0.69979
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
confint(yasuhara.ma)
2.5 % 97.5 %
(Intercept) 1.333804e+01 15.2666114702
clseasprod -4.496777e+01 -7.4179250862
cprod -9.849705e-02 0.0046952091
csalinity 2.503839e-01 2.1330064474
ctemp -2.339799e+00 -0.8774189158
cldepth -9.089778e-01 7.7378031678
cprod2 -3.783339e-04 0.0002500826
cicefree -9.064154e-02 0.1350423590
yasuhara.ma1<-model.avg(yasuhara.dredge, beta="sd") #Code not running at moment
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': incorrect number of dimensions
summary(yasuhara.ma1)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'object' in selecting a method for function 'summary': object 'yasuhara.ma1' not found
confint(yasuhara.ma1)
Error: object 'yasuhara.ma1' not found
yasuhara.ma2<-model.avg(yasuhara.dredge, beta="partial.sd")
summary(yasuhara.ma2)
Call:
model.avg(object = get.models(object = yasuhara.dredge, subset = NA),
beta = "partial.sd")
Component model call:
lm(formula = sprich ~ <128 unique rhs>, data = yasuhara)
Component models:
df logLik AICc delta weight
3467 6 -400.52 813.72 0.00 0.17
23467 7 -399.85 814.63 0.91 0.11
2347 6 -401.16 815.01 1.29 0.09
3567 6 -401.31 815.30 1.58 0.08
13467 7 -400.25 815.43 1.71 0.07
34567 7 -400.45 815.83 2.11 0.06
23567 7 -400.56 816.05 2.33 0.05
123467 8 -399.52 816.24 2.52 0.05
234567 8 -399.85 816.89 3.17 0.04
12347 7 -401.03 817.00 3.27 0.03
23457 7 -401.13 817.18 3.46 0.03
13567 7 -401.13 817.19 3.47 0.03
134567 8 -400.07 817.34 3.61 0.03
2357 6 -402.34 817.38 3.65 0.03
123567 8 -400.36 817.93 4.21 0.02
1234567 9 -399.45 818.41 4.69 0.02
123457 8 -400.95 819.09 5.37 0.01
12357 7 -402.32 819.57 5.85 0.01
1567 6 -403.63 819.94 6.22 0.01
1467 6 -403.86 820.41 6.69 0.01
367 5 -405.14 820.77 7.05 0.01
1367 6 -404.06 820.80 7.08 0.01
12567 7 -403.03 820.99 7.27 0.00
1257 6 -404.21 821.10 7.38 0.00
1247 6 -404.44 821.58 7.85 0.00
12467 7 -403.47 821.87 8.14 0.00
14567 7 -403.60 822.13 8.41 0.00
12367 7 -403.98 822.89 9.17 0.00
2367 6 -405.13 822.94 9.22 0.00
12457 7 -404.10 823.12 9.40 0.00
124567 8 -403.03 823.25 9.53 0.00
167 5 -406.84 824.17 10.45 0.00
1346 6 -405.94 824.58 10.85 0.00
12346 7 -405.33 825.59 11.87 0.00
13456 7 -405.35 825.62 11.90 0.00
1356 6 -406.68 826.04 12.32 0.00
136 5 -407.78 826.04 12.32 0.00
67 4 -408.96 826.25 12.53 0.00
1267 6 -406.82 826.33 12.61 0.00
1234 6 -406.95 826.59 12.87 0.00
123456 8 -404.93 827.06 13.33 0.00
12356 7 -406.12 827.16 13.44 0.00
12345 7 -406.50 827.93 14.21 0.00
1236 6 -407.64 827.97 14.25 0.00
267 5 -408.77 828.04 14.31 0.00
567 5 -408.79 828.07 14.35 0.00
467 5 -408.95 828.39 14.66 0.00
4567 6 -407.85 828.39 14.67 0.00
1235 6 -408.23 829.15 15.43 0.00
2567 6 -408.38 829.45 15.73 0.00
24567 7 -407.26 829.45 15.73 0.00
3457 6 -408.58 829.85 16.13 0.00
2467 6 -408.69 830.08 16.35 0.00
257 5 -409.90 830.29 16.57 0.00
237 5 -410.23 830.94 17.22 0.00
2457 6 -409.24 831.18 17.46 0.00
247 5 -410.55 831.59 17.87 0.00
1237 6 -409.54 831.77 18.05 0.00
27 4 -411.78 831.87 18.15 0.00
13457 7 -408.52 831.97 18.25 0.00
147 5 -410.84 832.16 18.44 0.00
347 5 -410.90 832.29 18.57 0.00
127 5 -411.00 832.50 18.77 0.00
1347 6 -410.19 833.06 19.34 0.00
1457 6 -410.43 833.55 19.83 0.00
123 5 -412.30 835.09 21.37 0.00
157 5 -413.72 837.93 24.21 0.00
1345 6 -413.16 839.00 25.28 0.00
56 4 -415.62 839.56 25.83 0.00
346 5 -414.60 839.69 25.97 0.00
234 5 -414.77 840.03 26.31 0.00
356 5 -414.80 840.08 26.36 0.00
1357 6 -413.72 840.13 26.41 0.00
46 4 -415.91 840.14 26.42 0.00
25 4 -416.00 840.31 26.59 0.00
357 5 -414.97 840.43 26.71 0.00
16 4 -416.06 840.44 26.72 0.00
235 5 -415.06 840.60 26.88 0.00
6 3 -417.34 840.88 27.15 0.00
24 4 -416.43 841.18 27.46 0.00
256 5 -415.42 841.33 27.61 0.00
156 5 -415.48 841.45 27.73 0.00
2346 6 -414.45 841.58 27.86 0.00
456 5 -415.56 841.60 27.88 0.00
2356 6 -414.58 841.85 28.13 0.00
3456 6 -414.59 841.88 28.16 0.00
134 5 -415.72 841.93 28.21 0.00
146 5 -415.77 842.02 28.30 0.00
246 5 -415.80 842.09 28.37 0.00
2345 6 -414.76 842.20 28.48 0.00
125 5 -415.94 842.37 28.65 0.00
245 5 -415.96 842.41 28.69 0.00
126 5 -416.02 842.54 28.82 0.00
36 4 -417.32 842.97 29.24 0.00
26 4 -417.32 842.97 29.25 0.00
1456 6 -415.23 843.15 29.43 0.00
1256 6 -415.28 843.25 29.53 0.00
124 5 -416.40 843.29 29.57 0.00
2456 6 -415.34 843.37 29.65 0.00
23456 7 -414.42 843.76 30.04 0.00
34 4 -417.73 843.78 30.05 0.00
1246 6 -415.66 844.00 30.28 0.00
12 4 -417.86 844.04 30.32 0.00
1245 6 -415.83 844.34 30.62 0.00
345 5 -417.16 844.80 31.08 0.00
12456 7 -414.97 844.86 31.14 0.00
236 5 -417.31 845.11 31.39 0.00
2 3 -419.67 845.54 31.81 0.00
47 4 -418.93 846.17 32.45 0.00
57 4 -419.34 847.00 33.28 0.00
4 3 -420.48 847.16 33.44 0.00
23 4 -419.45 847.23 33.50 0.00
35 4 -419.69 847.71 33.99 0.00
135 5 -418.74 847.96 34.24 0.00
5 3 -420.96 848.12 34.40 0.00
14 4 -419.94 848.20 34.48 0.00
457 5 -418.88 848.25 34.53 0.00
45 4 -420.45 849.23 35.51 0.00
7 3 -421.60 849.38 35.66 0.00
15 4 -420.70 849.72 36.00 0.00
145 5 -419.89 850.27 36.55 0.00
17 4 -420.99 850.29 36.57 0.00
37 4 -421.15 850.62 36.90 0.00
137 5 -420.96 852.41 38.69 0.00
(Null) 2 -424.23 852.56 38.84 0.00
1 3 -423.80 853.79 40.07 0.00
3 3 -424.15 854.50 40.78 0.00
13 4 -423.10 854.52 40.80 0.00
Term codes:
cicefree cldepth clseasprod cprod cprod2 csalinity ctemp
1 2 3 4 5 6 7
Model-averaged coefficients:
(full average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 0.00000 0.00000 0.00000 NaN NaN
clseasprod -1.70344 0.68184 0.68517 2.486 0.012913 *
cprod -1.00671 0.83968 0.84176 1.196 0.231712
csalinity 1.34872 1.05693 1.05868 1.274 0.202676
ctemp -2.34779 0.68559 0.68902 3.407 0.000656 ***
cldepth 0.63605 0.91534 0.91669 0.694 0.487774
cprod2 -0.32017 0.72481 0.72623 0.441 0.659308
cicefree 0.04612 0.46789 0.46955 0.098 0.921757
(conditional average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 0.0000 0.0000 0.0000 NaN NaN
clseasprod -1.7698 0.6046 0.6085 2.909 0.003629 **
cprod -1.3560 0.6900 0.6934 1.956 0.050513 .
csalinity 1.7220 0.8852 0.8878 1.939 0.052441 .
ctemp -2.3561 0.6724 0.6760 3.486 0.000491 ***
cldepth 1.2231 0.9451 0.9476 1.291 0.196767
cprod2 -0.7384 0.9501 0.9526 0.775 0.438297
cicefree 0.1424 0.8137 0.8167 0.174 0.861597
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
confint(yasuhara.ma2)
2.5 % 97.5 %
(Intercept) 0.00000000 0.000000000
clseasprod -2.96240884 -0.577283501
cprod -2.71499484 0.003028486
csalinity -0.01817383 3.462099467
ctemp -3.68091309 -1.031230881
cldepth -0.63405782 3.080315443
cprod2 -2.60548788 1.128768004
cicefree -1.45824644 1.743001809
sw(yasuhara.dredge)
ctemp clseasprod csalinity cprod cldepth cprod2 cicefree
Sum of weights: 1.00 0.96 0.78 0.74 0.52 0.43 0.32
N containing models: 64 64 64 64 64 64 64
#importance(yasuhara.dredge) #importance is Decunct
- omit prod squared and ice-free days
vif(lm(sprich~cldepth+ctemp+csalinity+cprod+clseasprod, data=yasuhara))
cldepth ctemp csalinity cprod clseasprod
4.165738 1.731734 4.822565 2.816215 2.954188
cor(yasuhara[,c('cldepth','ctemp','csalinity','cprod','clseasprod')])
cldepth ctemp csalinity cprod clseasprod
cldepth 1.00000000 0.3891785 0.84784714 -0.09488397 -0.08130645
ctemp 0.38917848 1.0000000 0.34629660 0.22755053 -0.52110033
csalinity 0.84784714 0.3462966 1.00000000 -0.32989442 0.05660052
cprod -0.09488397 0.2275505 -0.32989442 1.00000000 -0.72386615
clseasprod -0.08130645 -0.5211003 0.05660052 -0.72386615 1.00000000
scatterplotMatrix(~sprich+cldepth+ctemp+csalinity+cprod+clseasprod, data=yasuhara, cex=0.25, regLine=FALSE, diagonal=list(method='boxplot'))
yasuhara.lm1 <- lm(sprich~cldepth+ctemp+csalinity+cprod+clseasprod, data=yasuhara)
plot(yasuhara.lm1)
influence.measures(yasuhara.lm1)
Influence measures of
lm(formula = sprich ~ cldepth + ctemp + csalinity + cprod + clseasprod, data = yasuhara) :
summary(yasuhara.lm1)
Call:
lm(formula = sprich ~ cldepth + ctemp + csalinity + cprod + clseasprod,
data = yasuhara)
Residuals:
Min 1Q Median 3Q Max
-11.0085 -4.1007 -0.5914 3.3649 21.5832
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 14.30233 0.48414 29.542 < 2e-16 ***
cldepth 2.23836 1.98624 1.127 0.26196
ctemp -1.69692 0.30367 -5.588 1.40e-07 ***
csalinity 0.83020 0.52350 1.586 0.11534
cprod -0.04456 0.01377 -3.237 0.00155 **
clseasprod -25.01814 5.88582 -4.251 4.18e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.499 on 123 degrees of freedom
Multiple R-squared: 0.3147, Adjusted R-squared: 0.2869
F-statistic: 11.3 on 5 and 123 DF, p-value: 5.588e-09
confint(yasuhara.lm1)
2.5 % 97.5 %
(Intercept) 13.34400613 15.26064504
cldepth -1.69326657 6.16999552
ctemp -2.29800759 -1.09582645
csalinity -0.20604108 1.86643110
cprod -0.07180444 -0.01730728
clseasprod -36.66875900 -13.36752083
std.coef(yasuhara.lm1, partial.sd=FALSE)
Estimate* Std. Error* df
(Intercept) 0.000000 0.000000 123
cldepth 0.171680 0.152342 123
ctemp -0.548881 0.098223 123
csalinity 0.259943 0.163913 123
cprod -0.405425 0.125259 123
clseasprod -0.545308 0.128290 123
std.coef(yasuhara.lm1, partial.sd=TRUE)
Estimate* Std. Error* df
(Intercept) 0.00000 0.00000 123
cldepth 0.54559 0.48414 123
ctemp -2.70540 0.48414 123
csalinity 0.76777 0.48414 123
cprod -1.56701 0.48414 123
clseasprod -2.05786 0.48414 123
calc.relimp(yasuhara.lm1, type = c("lmg", "pmvd", "last", "first", "betasq", "pratt"), rela=FALSE)
Response variable: sprich
Total response variance: 42.40007
Analysis based on 129 observations
5 Regressors:
cldepth ctemp csalinity cprod clseasprod
Proportion of variance explained by model: 31.47%
Metrics are not normalized (rela=FALSE).
Relative importance metrics:
lmg pmvd last first betasq pratt
cldepth 0.04438295 0.02835060 0.007075381 0.068259277 0.02947418 0.04485406
ctemp 0.10760292 0.09052456 0.173970310 0.040057552 0.30127025 0.10985512
csalinity 0.06734447 0.09635017 0.014011240 0.101320302 0.06757011 0.08274191
cprod 0.05206685 0.05101218 0.058365425 0.056471134 0.16436960 0.09634385
clseasprod 0.04334380 0.04850348 0.100657416 0.001220917 0.29736096 -0.01905395
Average coefficients for different model sizes:
1X 2Xs 3Xs 4Xs 5Xs
cldepth 3.40636178 2.85470055 2.49515403 1.97259292 2.23836447
ctemp -0.61876350 -0.85958909 -1.21281836 -1.49335017 -1.69691702
csalinity 1.01660221 1.09488127 1.10369224 1.10082495 0.83019501
cprod -0.02611604 -0.02781194 -0.02855918 -0.03358681 -0.04455586
clseasprod 1.60308321 -3.55138802 -10.68948683 -17.90736403 -25.01813992
yasuhara.boot1 <- boot.relimp(yasuhara.lm1, b=1000, type = c("lmg", "pmvd"))
booteval.relimp(yasuhara.boot1)
Response variable: sprich
Total response variance: 42.40007
Analysis based on 129 observations
5 Regressors:
cldepth ctemp csalinity cprod clseasprod
Proportion of variance explained by model: 31.47%
Metrics are not normalized (rela=FALSE).
Relative importance metrics:
lmg pmvd
cldepth 0.04438295 0.02835060
ctemp 0.10760292 0.09052456
csalinity 0.06734447 0.09635017
cprod 0.05206685 0.05101218
clseasprod 0.04334380 0.04850348
Average coefficients for different model sizes:
1X 2Xs 3Xs 4Xs 5Xs
cldepth 3.40636178 2.85470055 2.49515403 1.97259292 2.23836447
ctemp -0.61876350 -0.85958909 -1.21281836 -1.49335017 -1.69691702
csalinity 1.01660221 1.09488127 1.10369224 1.10082495 0.83019501
cprod -0.02611604 -0.02781194 -0.02855918 -0.03358681 -0.04455586
clseasprod 1.60308321 -3.55138802 -10.68948683 -17.90736403 -25.01813992
Confidence interval information ( 1000 bootstrap replicates, bty= perc ):
Relative Contributions with confidence intervals:
Lower Upper
percentage 0.95 0.95 0.95
cldepth.lmg 0.0444 ABCDE 0.0150 0.1103
ctemp.lmg 0.1076 ABCDE 0.0312 0.2066
csalinity.lmg 0.0673 ABCDE 0.0269 0.1363
cprod.lmg 0.0521 ABCDE 0.0117 0.1425
clseasprod.lmg 0.0433 _BCDE 0.0213 0.0977
cldepth.pmvd 0.0284 ABCDE 0.0001 0.1705
ctemp.pmvd 0.0905 ABCD_ 0.0367 0.1723
csalinity.pmvd 0.0964 ABCDE 0.0003 0.2023
cprod.pmvd 0.0510 ABCDE 0.0108 0.1589
clseasprod.pmvd 0.0485 _BCDE 0.0247 0.0952
Letters indicate the ranks covered by bootstrap CIs.
(Rank bootstrap confidence intervals always obtained by percentile method)
CAUTION: Bootstrap confidence intervals can be somewhat liberal.
Differences between Relative Contributions:
Lower Upper
difference 0.95 0.95 0.95
cldepth-ctemp.lmg -0.0632 -0.1655 0.0574
cldepth-csalinity.lmg -0.0230 -0.0838 0.0372
cldepth-cprod.lmg -0.0077 -0.1093 0.0846
cldepth-clseasprod.lmg 0.0010 -0.0686 0.0772
ctemp-csalinity.lmg 0.0403 -0.0779 0.1479
ctemp-cprod.lmg 0.0555 -0.0813 0.1655
ctemp-clseasprod.lmg 0.0643 -0.0369 0.1623
csalinity-cprod.lmg 0.0153 -0.0825 0.0900
csalinity-clseasprod.lmg 0.0240 -0.0469 0.0922
cprod-clseasprod.lmg 0.0087 -0.0522 0.0860
cldepth-ctemp.pmvd -0.0622 -0.1546 0.1053
cldepth-csalinity.pmvd -0.0680 -0.1897 0.1646
cldepth-cprod.pmvd -0.0227 -0.1406 0.1282
cldepth-clseasprod.pmvd -0.0202 -0.0910 0.1302
ctemp-csalinity.pmvd -0.0058 -0.1223 0.1208
ctemp-cprod.pmvd 0.0395 -0.0906 0.1334
ctemp-clseasprod.pmvd 0.0420 -0.0274 0.1197
csalinity-cprod.pmvd 0.0453 -0.1329 0.1736
csalinity-clseasprod.pmvd 0.0478 -0.0648 0.1558
cprod-clseasprod.pmvd 0.0025 -0.0461 0.0892
* indicates that CI for difference does not include 0.
CAUTION: Bootstrap confidence intervals can be somewhat liberal.
options(na.action = "na.fail")
yasuhara.dredge1 <-dredge(yasuhara.lm1, beta="none", evaluate=TRUE)
Fixed term is "(Intercept)"
yasuhara.dredge1
Global model call: lm(formula = sprich ~ cldepth + ctemp + csalinity + cprod + clseasprod,
data = yasuhara)
---
Model selection table
(Intrc) cldpt clssp cprod cslnt ctemp df logLik AICc delta weight
31 14.3 -24.4200 -0.039950 1.3250 -1.6650 6 -400.517 813.7 0.00 0.454
32 14.3 2.2380 -25.0200 -0.044560 0.8302 -1.6970 7 -399.854 814.6 0.91 0.288
24 14.3 4.8830 -25.9700 -0.054010 -1.6350 6 -401.159 815.0 1.29 0.239
27 14.3 -12.0000 1.6320 -1.5870 5 -405.141 820.8 7.05 0.013
28 14.3 0.3288 -11.8700 1.5640 -1.5900 6 -405.126 822.9 9.22 0.005
25 14.3 1.4070 -1.0900 4 -408.965 826.3 12.53 0.001
26 14.3 1.2080 1.1670 -1.1210 5 -408.774 828.0 14.31 0.000
29 14.3 -0.001752 1.3830 -1.0710 5 -408.949 828.4 14.66 0.000
30 14.3 1.4790 -0.004179 1.0570 -1.0830 6 -408.694 830.1 16.35 0.000
20 14.3 5.5210 -7.6080 -1.3950 5 -410.228 830.9 17.22 0.000
22 14.3 4.8430 -0.014370 -0.9737 5 -410.550 831.6 17.87 0.000
18 14.3 5.2110 -1.1000 4 -411.776 831.9 18.15 0.000
23 14.3 -25.7500 -0.061630 -1.1280 5 -410.902 832.3 18.57 0.000
15 14.3 -9.2040 -0.033800 0.7288 5 -414.600 839.7 25.97 0.000
8 14.3 2.7010 -10.2200 -0.041670 5 -414.770 840.0 26.31 0.000
13 14.3 -0.016360 0.8598 4 -415.909 840.1 26.42 0.000
9 14.3 1.0170 3 -417.342 840.9 27.15 0.000
6 14.3 3.1410 -0.023600 4 -416.427 841.2 27.46 0.000
16 14.3 1.2000 -9.3670 -0.036210 0.4571 6 -414.446 841.6 27.86 0.000
14 14.3 1.0140 -0.018130 0.6321 5 -415.801 842.1 28.37 0.000
11 14.3 0.7790 1.0140 4 -417.321 843.0 29.24 0.000
10 14.3 -0.3994 1.1000 4 -417.323 843.0 29.25 0.000
7 14.3 -13.2100 -0.049020 4 -417.727 843.8 30.05 0.000
12 14.3 -0.3164 0.6346 1.0800 5 -417.310 845.1 31.39 0.000
2 14.3 3.4060 3 -419.672 845.5 31.81 0.000
21 14.3 -0.022260 -0.4762 4 -418.926 846.2 32.45 0.000
5 14.3 -0.026120 3 -420.483 847.2 33.44 0.000
4 14.3 3.4660 2.5950 4 -419.452 847.2 33.50 0.000
17 14.3 -0.6188 3 -421.595 849.4 35.66 0.000
19 14.3 -4.3680 -0.7721 4 -421.150 850.6 36.90 0.000
1 14.3 2 -424.232 852.6 38.84 0.000
3 14.3 1.6030 3 -424.154 854.5 40.78 0.000
Models ranked by AICc(x)
sw(yasuhara.dredge1)
ctemp clseasprod cprod csalinity cldepth
Sum of weights: 1.00 1.00 0.98 0.76 0.53
N containing models: 16 16 16 16 16
#importance(yasuhara.dredge1)
yasuhara.ma3<-model.avg(yasuhara.dredge1, beta="sd")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 't': incorrect number of dimensions
summary(yasuhara.ma3)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'object' in selecting a method for function 'summary': object 'yasuhara.ma3' not found
confint(yasuhara.ma3)
Error: object 'yasuhara.ma3' not found
yasuhara.ma4<-model.avg(yasuhara.dredge1, beta="partial.sd")
summary(yasuhara.ma4)
Call:
model.avg(object = get.models(object = yasuhara.dredge1, subset = NA),
beta = "partial.sd")
Component model call:
lm(formula = sprich ~ <32 unique rhs>, data = yasuhara)
Component models:
df logLik AICc delta weight
2345 6 -400.52 813.72 0.00 0.45
12345 7 -399.85 814.63 0.91 0.29
1235 6 -401.16 815.01 1.29 0.24
245 5 -405.14 820.77 7.05 0.01
1245 6 -405.13 822.94 9.22 0.00
45 4 -408.96 826.25 12.53 0.00
145 5 -408.77 828.04 14.31 0.00
345 5 -408.95 828.39 14.66 0.00
1345 6 -408.69 830.08 16.35 0.00
125 5 -410.23 830.94 17.22 0.00
135 5 -410.55 831.59 17.87 0.00
15 4 -411.78 831.87 18.15 0.00
235 5 -410.90 832.29 18.57 0.00
234 5 -414.60 839.69 25.97 0.00
123 5 -414.77 840.03 26.31 0.00
34 4 -415.91 840.14 26.42 0.00
4 3 -417.34 840.88 27.15 0.00
13 4 -416.43 841.18 27.46 0.00
1234 6 -414.45 841.58 27.86 0.00
134 5 -415.80 842.09 28.37 0.00
24 4 -417.32 842.97 29.24 0.00
14 4 -417.32 842.97 29.25 0.00
23 4 -417.73 843.78 30.05 0.00
124 5 -417.31 845.11 31.39 0.00
1 3 -419.67 845.54 31.81 0.00
35 4 -418.93 846.17 32.45 0.00
3 3 -420.48 847.16 33.44 0.00
12 4 -419.45 847.23 33.50 0.00
5 3 -421.60 849.38 35.66 0.00
25 4 -421.15 850.62 36.90 0.00
(Null) 2 -424.23 852.56 38.84 0.00
2 3 -424.15 854.50 40.78 0.00
Term codes:
cldepth clseasprod cprod csalinity ctemp
1 2 3 4 5
Model-averaged coefficients:
(full average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 0.0000 0.0000 0.0000 NaN NaN
clseasprod -2.0447 0.5036 0.5082 4.023 5.74e-05 ***
cprod -1.6217 0.5915 0.5954 2.724 0.00645 **
csalinity 1.2954 1.0576 1.0593 1.223 0.22138
ctemp -2.6654 0.4872 0.4920 5.418 1.00e-07 ***
cldepth 0.6806 0.9453 0.9467 0.719 0.47217
(conditional average)
Estimate Std. Error Adjusted SE z value Pr(>|z|)
(Intercept) 0.0000 0.0000 0.0000 NaN NaN
clseasprod -2.0483 0.4967 0.5014 4.085 4.4e-05 ***
cprod -1.6536 0.5514 0.5557 2.976 0.00292 **
csalinity 1.7019 0.8819 0.8845 1.924 0.05434 .
ctemp -2.6654 0.4871 0.4919 5.418 6.0e-08 ***
cldepth 1.2805 0.9556 0.9581 1.337 0.18136
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
confint(yasuhara.ma4)
2.5 % 97.5 %
(Intercept) 0.00000000 0.0000000
clseasprod -3.03090465 -1.0656097
cprod -2.74267932 -0.5644916
csalinity -0.03169398 3.4354804
ctemp -3.62951109 -1.7012384
cldepth -0.59724609 3.1582464