[Vegan-commits] r1582 - pkg/vegan/tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Apr 9 10:09:31 CEST 2011


Author: jarioksa
Date: 2011-04-09 10:09:31 +0200 (Sat, 09 Apr 2011)
New Revision: 1582

Modified:
   pkg/vegan/tests/Examples/vegan-Ex.Rout.save
Log:
update

Modified: pkg/vegan/tests/Examples/vegan-Ex.Rout.save
===================================================================
--- pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-04-09 08:08:07 UTC (rev 1581)
+++ pkg/vegan/tests/Examples/vegan-Ex.Rout.save	2011-04-09 08:09:31 UTC (rev 1582)
@@ -631,16 +631,10 @@
 > 
 > Y <- data.frame(Agropyron, Schizachyrium)
 > mod <- metaMDS(Y)
-Run 0 stress 0.1560545 
-Run 1 stress 0.08556612 
-... New best solution
-... procrustes: rmse 0.2476582  max resid 0.4167042 
-Run 2 stress 0.1560554 
-Run 3 stress 0.2162345 
-Run 4 stress 0.2062595 
-Run 5 stress 0.08556601 
-... New best solution
-... procrustes: rmse 0.0001113815  max resid 0.0001929155 
+Run 0 stress 0.08556588 
+Run 1 stress 0.1560545 
+Run 2 stress 0.08556612 
+... procrustes: rmse 0.0001630123  max resid 0.0003642025 
 *** Solution reached
 
 > plot(mod)
@@ -2417,54 +2411,46 @@
 > ord <- metaMDS(varespec)
 Square root transformation
 Wisconsin double standardization
-Run 0 stress 0.2455937 
-Run 1 stress 0.2169416 
+Run 0 stress 0.1843204 
+Run 1 stress 0.2455937 
+Run 2 stress 0.2169416 
+Run 3 stress 0.2313238 
+Run 4 stress 0.1974421 
+Run 5 stress 0.1858424 
+Run 6 stress 0.1948436 
+Run 7 stress 0.2265718 
+Run 8 stress 0.2225085 
+Run 9 stress 0.2023228 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976154 
+Run 12 stress 0.1852405 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955872 
+Run 15 stress 0.2137414 
+Run 16 stress 0.2109643 
+Run 17 stress 0.1825664 
 ... New best solution
-... procrustes: rmse 0.1701481  max resid 0.3710944 
-Run 2 stress 0.2313238 
-Run 3 stress 0.1974421 
-... New best solution
-... procrustes: rmse 0.1031564  max resid 0.2251109 
-Run 4 stress 0.1858424 
-... New best solution
-... procrustes: rmse 0.1299653  max resid 0.5189456 
-Run 5 stress 0.1948436 
-Run 6 stress 0.2265718 
-Run 7 stress 0.2225085 
-Run 8 stress 0.2023228 
-Run 9 stress 0.2673177 
-Run 10 stress 0.1976154 
-Run 11 stress 0.1852405 
-... New best solution
-... procrustes: rmse 0.06229216  max resid 0.150469 
-Run 12 stress 0.2341085 
-Run 13 stress 0.1955872 
-Run 14 stress 0.2137414 
-Run 15 stress 0.2109643 
-Run 16 stress 0.1825664 
-... New best solution
-... procrustes: rmse 0.03764707  max resid 0.1441352 
-Run 17 stress 0.1843199 
-Run 18 stress 0.2570123 
-Run 19 stress 0.3760596 
-Run 20 stress 0.202883 
+... procrustes: rmse 0.0421789  max resid 0.1544029 
+Run 18 stress 0.1843199 
+Run 19 stress 0.2570123 
+Run 20 stress 0.3760596 
 > (fit <- envfit(ord, varechem, perm = 999))
 
 ***VECTORS
 
              NMDS1     NMDS2     r2 Pr(>r)    
 N         0.056188  0.998420 0.2542  0.046 *  
-P        -0.618628 -0.785684 0.1936  0.102    
-K        -0.765142 -0.643862 0.1809  0.142    
+P        -0.618628 -0.785684 0.1936  0.103    
+K        -0.765142 -0.643862 0.1809  0.143    
 Ca       -0.683985 -0.729496 0.4120  0.008 ** 
 Mg       -0.631457 -0.775411 0.4273  0.004 ** 
-S        -0.190091 -0.981767 0.1754  0.139    
+S        -0.190091 -0.981767 0.1754  0.140    
 Al        0.872443 -0.488715 0.5270  0.001 ***
 Fe        0.937013 -0.349294 0.4452  0.002 ** 
 Mn       -0.799058  0.601253 0.5228  0.001 ***
-Zn       -0.616932 -0.787017 0.1878  0.124    
+Zn       -0.616932 -0.787017 0.1878  0.125    
 Mo        0.903112 -0.429406 0.0609  0.539    
-Baresoil -0.926090  0.377302 0.2509  0.039 *  
+Baresoil -0.926090  0.377302 0.2509  0.038 *  
 Humdepth -0.933540  0.358473 0.5198  0.002 ** 
 pH        0.648970 -0.760814 0.2306  0.060 .  
 ---
@@ -2839,64 +2825,52 @@
 > ### Name: goodness.metaMDS
 > ### Title: Goodness of Fit and Shepard Plot for Nonmetric Multidimensional
 > ###   Scaling
-> ### Aliases: goodness.metaMDS stressplot
+> ### Aliases: goodness.metaMDS goodness.monoMDS stressplot
+> ###   stressplot.default stressplot.monoMDS
 > ### Keywords: multivariate
 > 
 > ### ** Examples
 > 
 > data(varespec)
-> mod <- metaMDS(varespec, engine = "isoMDS")
+> mod <- metaMDS(varespec)
 Square root transformation
 Wisconsin double standardization
-Loading required package: MASS
-Run 0 stress 18.44915 
-Run 1 stress 18.458 
-... procrustes: rmse 0.05246287  max resid 0.1748373 
-Run 2 stress 24.19514 
-Run 3 stress 19.69805 
-Run 4 stress 19.74406 
-Run 5 stress 18.43204 
+Run 0 stress 0.1843204 
+Run 1 stress 0.2455937 
+Run 2 stress 0.2169416 
+Run 3 stress 0.2313238 
+Run 4 stress 0.1974421 
+Run 5 stress 0.1858424 
+Run 6 stress 0.1948436 
+Run 7 stress 0.2265718 
+Run 8 stress 0.2225085 
+Run 9 stress 0.2023228 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976154 
+Run 12 stress 0.1852405 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955872 
+Run 15 stress 0.2137414 
+Run 16 stress 0.2109643 
+Run 17 stress 0.1825664 
 ... New best solution
-... procrustes: rmse 0.00448445  max resid 0.01722444 
-Run 6 stress 19.48415 
-Run 7 stress 19.48414 
-Run 8 stress 20.57245 
-Run 9 stress 21.00656 
-Run 10 stress 20.06893 
-Run 11 stress 18.52397 
-Run 12 stress 21.37384 
-Run 13 stress 19.5049 
-Run 14 stress 21.6715 
-Run 15 stress 22.65719 
-Run 16 stress 21.0961 
-Run 17 stress 18.25659 
-... New best solution
-... procrustes: rmse 0.04191616  max resid 0.1532558 
-Run 18 stress 19.48413 
-Run 19 stress 21.77541 
-Run 20 stress 22.24925 
+... procrustes: rmse 0.0421789  max resid 0.1544029 
+Run 18 stress 0.1843199 
+Run 19 stress 0.2570123 
+Run 20 stress 0.3760596 
 > stressplot(mod)
-Square root transformation
-Wisconsin double standardization
 > gof <- goodness(mod)
-Square root transformation
-Wisconsin double standardization
 > gof
-      18       15       24       27       23       19       22       16 
-2.984496 3.514129 4.188692 4.598210 4.002773 3.441293 3.294609 3.051738 
-      28       13       14       20       25        7        5        6 
-3.060659 2.993482 3.526967 2.621578 3.829350 2.982187 3.370348 2.226679 
-       3        4        2        9       12       10       11       21 
-3.561311 3.506032 6.577579 3.268019 3.502878 2.957059 5.167546 4.601390 
+ [1] 0.02985151 0.03513602 0.04181211 0.04601046 0.04005199 0.03443943
+ [7] 0.03290447 0.03048909 0.03058684 0.02992410 0.03531117 0.02620375
+[13] 0.03833499 0.02979202 0.03376558 0.02225449 0.03559163 0.03504082
+[19] 0.06578666 0.03269039 0.03507122 0.02956140 0.05162094 0.04604686
 > plot(mod, display = "sites", type = "n")
-> points(mod, display = "sites", cex = gof/2)
+> points(mod, display = "sites", cex = 2*gof/mean(gof))
 > 
 > 
 > 
 > cleanEx()
-
-detaching ‘package:MASS’
-
 > nameEx("humpfit")
 > ### * humpfit
 > 
@@ -3416,10 +3390,13 @@
 > library(MASS) ## isoMDS
 > # NMDS
 > sol <- metaMDS(dune)
-Run 0 stress 0.1808932 
-Run 1 stress 0.1808918 
-... New best solution
-... procrustes: rmse 0.001095961  max resid 0.003218655 
+Run 0 stress 0.1192691 
+Run 1 stress 0.1808932 
+Run 2 stress 0.1808918 
+Run 3 stress 0.1808912 
+Run 4 stress 0.2035431 
+Run 5 stress 0.1192719 
+... procrustes: rmse 0.001450932  max resid 0.004117039 
 *** Solution reached
 
 > sol
@@ -3427,14 +3404,14 @@
 Call:
 metaMDS(comm = dune) 
 
-Nonmetric Multidimensional Scaling using monoMDS
+global Multidimensional Scaling using monoMDS
 
 Data:     dune 
 Distance: bray 
 
 Dimensions: 2 
-Stress:     0.1808918 
-Two convergent solutions found after 1 tries
+Stress:     0.1192691 
+Two convergent solutions found after 5 tries
 Scaling: centring, PC rotation, halfchange scaling 
 Species: expanded scores based on ‘dune’ 
 
@@ -3442,11 +3419,12 @@
 > 
 > ## Start from previous best solution
 > sol2 <- metaMDS(dune, previous.best = sol)
-Starting from a previous solution
-Run 0 stress 0.1808918 
-Run 1 stress 0.1808912 
+Starting from 2-dimensional configuration
+Run 0 stress 0.1192691 
+Run 1 stress 0.1939205 
+Run 2 stress 0.1192685 
 ... New best solution
-... procrustes: rmse 0.0005388664  max resid 0.001425574 
+... procrustes: rmse 0.000737655  max resid 0.001867068 
 *** Solution reached
 
 > 
@@ -3630,9 +3608,10 @@
 > layout(matrix(1:2,nr=1))
 > 
 > plot(dune.ord <- metaMDS(dune), type="text", display="sites" )
-Run 0 stress 0.1192689 
-Run 1 stress 0.1192718 
-... procrustes: rmse 0.001708735  max resid 0.005233673 
+Run 0 stress 0.1192691 
+Run 1 stress 0.1192689 
+... New best solution
+... procrustes: rmse 0.0006819572  max resid 0.001730883 
 *** Solution reached
 
 > ordihull(dune.ord, dune.env$Management)
@@ -4684,7 +4663,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x103d3b988>
+<environment: 0x1036f60a0>
 
 Estimated degrees of freedom:
 6.2955  total = 7.295494 
@@ -4700,7 +4679,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x10593c430>
+<environment: 0x1060bec30>
 
 Estimated degrees of freedom:
 4.9207  total = 5.920718 
@@ -4856,7 +4835,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x105cd3148>
+<environment: 0x106c72e68>
 
 Estimated degrees of freedom:
 8.9275  total = 9.927492 
@@ -4869,7 +4848,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x106f35800>
+<environment: 0x10707ca38>
 
 Estimated degrees of freedom:
 7.7529  total = 8.75294 
@@ -4882,7 +4861,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x106fb1678>
+<environment: 0x10704a200>
 
 Estimated degrees of freedom:
 8.8962  total = 9.89616 
@@ -7383,37 +7362,29 @@
 > ord <- metaMDS(varespec)
 Square root transformation
 Wisconsin double standardization
-Run 0 stress 0.2455937 
-Run 1 stress 0.2169416 
+Run 0 stress 0.1843204 
+Run 1 stress 0.2455937 
+Run 2 stress 0.2169416 
+Run 3 stress 0.2313238 
+Run 4 stress 0.1974421 
+Run 5 stress 0.1858424 
+Run 6 stress 0.1948436 
+Run 7 stress 0.2265718 
+Run 8 stress 0.2225085 
+Run 9 stress 0.2023228 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976154 
+Run 12 stress 0.1852405 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955872 
+Run 15 stress 0.2137414 
+Run 16 stress 0.2109643 
+Run 17 stress 0.1825664 
 ... New best solution
-... procrustes: rmse 0.1701481  max resid 0.3710944 
-Run 2 stress 0.2313238 
-Run 3 stress 0.1974421 
-... New best solution
-... procrustes: rmse 0.1031564  max resid 0.2251109 
-Run 4 stress 0.1858424 
-... New best solution
-... procrustes: rmse 0.1299653  max resid 0.5189456 
-Run 5 stress 0.1948436 
-Run 6 stress 0.2265718 
-Run 7 stress 0.2225085 
-Run 8 stress 0.2023228 
-Run 9 stress 0.2673177 
-Run 10 stress 0.1976154 
-Run 11 stress 0.1852405 
-... New best solution
-... procrustes: rmse 0.06229216  max resid 0.150469 
-Run 12 stress 0.2341085 
-Run 13 stress 0.1955872 
-Run 14 stress 0.2137414 
-Run 15 stress 0.2109643 
-Run 16 stress 0.1825664 
-... New best solution
-... procrustes: rmse 0.03764707  max resid 0.1441352 
-Run 17 stress 0.1843199 
-Run 18 stress 0.2570123 
-Run 19 stress 0.3760596 
-Run 20 stress 0.202883 
+... procrustes: rmse 0.0421789  max resid 0.1544029 
+Run 18 stress 0.1843199 
+Run 19 stress 0.2570123 
+Run 20 stress 0.3760596 
 > plot(ord, type = "t")
 > ## Fit environmental variables
 > ef <- envfit(ord, varechem)
@@ -7423,17 +7394,17 @@
 
              NMDS1     NMDS2     r2 Pr(>r)    
 N         0.056188  0.998420 0.2542  0.046 *  
-P        -0.618628 -0.785684 0.1936  0.102    
-K        -0.765142 -0.643862 0.1809  0.142    
+P        -0.618628 -0.785684 0.1936  0.103    
+K        -0.765142 -0.643862 0.1809  0.143    
 Ca       -0.683985 -0.729496 0.4120  0.008 ** 
 Mg       -0.631457 -0.775411 0.4273  0.004 ** 
-S        -0.190091 -0.981767 0.1754  0.139    
+S        -0.190091 -0.981767 0.1754  0.140    
 Al        0.872443 -0.488715 0.5270  0.001 ***
 Fe        0.937013 -0.349294 0.4452  0.002 ** 
 Mn       -0.799058  0.601253 0.5228  0.001 ***
-Zn       -0.616932 -0.787017 0.1878  0.124    
+Zn       -0.616932 -0.787017 0.1878  0.125    
 Mo        0.903112 -0.429406 0.0609  0.539    
-Baresoil -0.926090  0.377302 0.2509  0.039 *  
+Baresoil -0.926090  0.377302 0.2509  0.038 *  
 Humdepth -0.933540  0.358473 0.5198  0.002 ** 
 pH        0.648970 -0.760814 0.2306  0.060 .  
 ---
@@ -7491,9 +7462,9 @@
 Permutation test for rda under reduced model
 
 Model: rda(formula = dune ~ A1 + Moisture + Management + Use + Manure, data = dune.env)
-         Df    Var      F N.Perm Pr(>F)  
-Model    12 63.206 1.7627    199  0.015 *
-Residual  7 20.917                       
+         Df    Var      F N.Perm Pr(>F)   
+Model    12 63.206 1.7627    199  0.005 **
+Residual  7 20.917                        
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 > ## Permutation test for terms added sequentially
@@ -7506,8 +7477,8 @@
 A1          1  8.1148 2.7156     99   0.01 **
 Moisture    3 21.6497 2.4150     99   0.01 **
 Management  3 19.1153 2.1323     99   0.02 * 
-Use         2  4.7007 0.7865     99   0.78   
-Manure      3  9.6257 1.0737     99   0.35   
+Use         2  4.7007 0.7865     99   0.70   
+Manure      3  9.6257 1.0737     99   0.40   
 Residual    7 20.9175                        
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
@@ -7520,8 +7491,8 @@
 + Management  3 87.082 2.8400    199  0.005 **
 + Moisture    3 87.707 2.5883    199  0.005 **
 + Manure      4 89.232 1.9539    199  0.005 **
-+ A1          1 89.591 1.9217    999  0.043 * 
-+ Use         2 91.032 1.1741     99  0.300   
++ A1          1 89.591 1.9217    999  0.040 * 
++ Use         2 91.032 1.1741     99  0.250   
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 
@@ -7534,24 +7505,24 @@
 
            Df    AIC      F N.Perm Pr(>F)   
 + Moisture  3 85.567 1.9764    199   0.01 **
-+ Manure    3 87.517 1.3902    399   0.09 . 
-+ A1        1 87.424 1.2965     99   0.18   
-+ Use       2 88.284 1.0510     99   0.39   
++ Manure    3 87.517 1.3902     99   0.18   
++ A1        1 87.424 1.2965     99   0.24   
++ Use       2 88.284 1.0510     99   0.37   
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 
 Step: dune ~ Management + Moisture 
 
              Df    AIC      F N.Perm Pr(>F)   
-- Moisture    3 87.082 1.9764     99   0.02 * 
+- Moisture    3 87.082 1.9764     99   0.01 **
 - Management  3 87.707 2.1769     99   0.01 **
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 
          Df    AIC      F N.Perm Pr(>F)
-+ Manure  3 85.762 1.1225     99   0.32
-+ A1      1 86.220 0.8359     99   0.64
-+ Use     2 86.842 0.8027     99   0.75
++ Manure  3 85.762 1.1225     99   0.27
++ A1      1 86.220 0.8359     99   0.70
++ Use     2 86.842 0.8027     99   0.77
 
 > mod
 Call: rda(formula = dune ~ Management + Moisture, data = dune.env)
@@ -7582,7 +7553,7 @@
 Model: rda(formula = dune ~ Management + Moisture, data = dune.env)
            Df    Var      F N.Perm Pr(>F)   
 Management  3 18.938 2.1769    199  0.005 **
-Moisture    3 17.194 1.9764    199  0.010 **
+Moisture    3 17.194 1.9764    199  0.005 **
 Residual   13 37.699                        
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
@@ -7603,7 +7574,7 @@
 
 Formula:
 y ~ s(x1, x2, k = knots)
-<environment: 0x10802f698>
+<environment: 0x1080d9440>
 
 Estimated degrees of freedom:
 2  total = 3 
@@ -7616,14 +7587,14 @@
 Call:
 adonis(formula = dune ~ ., data = dune.env) 
 
-           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)   
-A1          1    0.7230 0.72295  5.2038 0.16817  0.003 **
-Moisture    3    1.1871 0.39569  2.8482 0.27613  0.007 **
-Management  3    0.9036 0.30121  2.1681 0.21019  0.045 * 
-Use         2    0.0921 0.04606  0.3315 0.02143  0.971   
-Manure      3    0.4208 0.14026  1.0096 0.09787  0.468   
-Residuals   7    0.9725 0.13893         0.22621          
-Total      19    4.2990                 1.00000          
+           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
+A1          1    0.7230 0.72295  5.2038 0.16817  0.001 ***
+Moisture    3    1.1871 0.39569  2.8482 0.27613  0.004 ** 
+Management  3    0.9036 0.30121  2.1681 0.21019  0.028 *  
+Use         2    0.0921 0.04606  0.3315 0.02143  0.973    
+Manure      3    0.4208 0.14026  1.0096 0.09787  0.489    
+Residuals   7    0.9725 0.13893         0.22621           
+Total      19    4.2990                 1.00000           
 ---
 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 
 > adonis(dune ~ Management + Moisture, dune.env)
@@ -8080,7 +8051,7 @@
 > ### * <FOOTER>
 > ###
 > cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  111.852 1.255 113.956 0 0 
+Time elapsed:  108.803 1.165 111.255 0 0 
 > grDevices::dev.off()
 null device 
           1 



More information about the Vegan-commits mailing list