[Analogue-commits] r343 - pkg/tests/Examples

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jul 20 22:31:01 CEST 2013


Author: gsimpson
Date: 2013-07-20 22:31:00 +0200 (Sat, 20 Jul 2013)
New Revision: 343

Modified:
   pkg/tests/Examples/analogue-Ex.Rout.save
Log:
Update example test output

Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save	2013-07-20 20:30:28 UTC (rev 342)
+++ pkg/tests/Examples/analogue-Ex.Rout.save	2013-07-20 20:31:00 UTC (rev 343)
@@ -1,7 +1,7 @@
 
-R version 3.0.1 (2013-05-16) -- "Good Sport"
+R version 3.0.1 RC (2013-05-11 r62732) -- "Good Sport"
 Copyright (C) 2013 The R Foundation for Statistical Computing
-Platform: x86_64-pc-linux-gnu (64-bit)
+Platform: x86_64-unknown-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -23,10 +23,11 @@
 > library('analogue')
 Loading required package: vegan
 Loading required package: permute
-This is vegan 2.0-7
+This is vegan 2.1-29
 Loading required package: princurve
 Loading required package: lattice
-This is analogue 0.11-3
+Loading required package: rgl
+This is analogue 0.11-4
 > 
 > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
 > cleanEx()
@@ -3441,14 +3442,14 @@
 
 Logit regression models
 
-          In Out Est.(Dij) Std.Err Z-value    p-value Dij(p=0.9) Std.Err(Dij)
-1         46 121     -15.8    2.80   -5.63 1.8454e-08      0.338       0.0332
-2         35 132     -32.2    6.87   -4.68 2.8597e-06      0.409       0.0200
-3         22 145     -34.1   10.19   -3.35 0.00081417      0.366       0.0264
-4         24 143     -27.2    6.74   -4.03 5.6098e-05      0.495       0.0274
-5         25 142     -16.2    3.93   -4.12 3.7464e-05      0.461       0.0494
-6         15 152     -11.0    2.71   -4.06 4.8045e-05      0.283       0.0794
-Combined 167 835     -16.2    1.41  -11.51 < 2.22e-16      0.359       0.0166
+          In Out E[Dij]    SE      Z    p-value Dij(p=0.9) SE (Dij)
+1         46 121  -15.8  2.80  -5.63 1.8454e-08      0.338   0.0332
+2         35 132  -32.2  6.87  -4.68 2.8597e-06      0.409   0.0200
+3         22 145  -34.1 10.19  -3.35 0.00081417      0.366   0.0264
+4         24 143  -27.2  6.74  -4.03 5.6098e-05      0.495   0.0274
+5         25 142  -16.2  3.93  -4.12 3.7464e-05      0.461   0.0494
+6         15 152  -11.0  2.71  -4.06 4.8045e-05      0.283   0.0794
+Combined 167 835  -16.2  1.41 -11.51 < 2.22e-16      0.359   0.0166
 
 > 
 > ## plot the fitted logit curves
@@ -3480,8 +3481,25 @@
 002.3 0.9372000 0.02182155 0.3034852 0.031319684 1.133939e-05 0.01383880
 002.8 0.9732644 0.05464832 0.5834611 0.027163318 4.119295e-05 0.03144971
 > 
+> ## Bias reduction
+> ## fit the logit models to the analog object
+> swap.brlrm <- logitreg(swap.ana, grps, biasReduced = TRUE)
+> summary(swap.brlrm)
+
+Logit regression models
+
+          In Out E[Dij]   SE      Z    p-value Dij(p=0.9) SE (Dij)
+1         46 121  -15.1 2.68  -5.63 1.7690e-08      0.331   0.0346
+2         35 132  -29.5 6.08  -4.85 1.2174e-06      0.403   0.0212
+3         22 145  -28.5 7.82  -3.65 0.00026651      0.353   0.0287
+4         24 143  -24.2 5.73  -4.22 2.4163e-05      0.485   0.0298
+5         25 142  -14.5 3.34  -4.33 1.4819e-05      0.442   0.0530
+6         15 152  -10.1 2.44  -4.15 3.3636e-05      0.260   0.0858
+Combined 167 835  -16.0 1.38 -11.55 < 2.22e-16      0.357   0.0167
+
 > 
 > 
+> 
 > cleanEx()
 > nameEx("mat")
 > ### * mat
@@ -5101,7 +5119,7 @@
 > ## the model performance statistics
 > performance(mod)
       RMSE         R2   Avg.Bias   Max.Bias 
- 2.019e+00  9.173e-01  2.854e-15 -3.815e+00 
+ 2.019e+00  9.173e-01  2.228e-14 -3.815e+00 
 > 
 > 
 > 
@@ -5953,17 +5971,97 @@
 > ## for each species
 > aber.pc <- prcurve(abernethy2, method = "ca", trace = TRUE,
 +                    vary = TRUE, penalty = 1.4)
---------------------------------------------------------------------------------
-Initial curve: d.sq: 103233.4502
-Iteration   1: d.sq: 4283.4308
-Iteration   2: d.sq: 4312.2976
-Iteration   3: d.sq: 4340.6911
-Iteration   4: d.sq: 4355.3876
-Iteration   5: d.sq: 4366.4975
-Iteration   6: d.sq: 4369.9444
---------------------------------------------------------------------------------
+
+   Determining initial DFs for each variable...
+
+  |                                                                            
+  |                                                                      |   0%
+  |                                                                            
+  |==                                                                    |   3%
+  |                                                                            
+  |====                                                                  |   6%
+  |                                                                            
+  |======                                                                |   8%
+  |                                                                            
+  |========                                                              |  11%
+  |                                                                            
+  |==========                                                            |  14%
+  |                                                                            
+  |============                                                          |  17%
+  |                                                                            
+  |==============                                                        |  19%
+  |                                                                            
+  |================                                                      |  22%
+  |                                                                            
+  |==================                                                    |  25%
+  |                                                                            
+  |===================                                                   |  28%
+  |                                                                            
+  |=====================                                                 |  31%
+  |                                                                            
+  |=======================                                               |  33%
+  |                                                                            
+  |=========================                                             |  36%
+  |                                                                            
+  |===========================                                           |  39%
+  |                                                                            
+  |=============================                                         |  42%
+  |                                                                            
+  |===============================                                       |  44%
+  |                                                                            
+  |=================================                                     |  47%
+  |                                                                            
+  |===================================                                   |  50%
+  |                                                                            
+  |=====================================                                 |  53%
+  |                                                                            
+  |=======================================                               |  56%
+  |                                                                            
+  |=========================================                             |  58%
+  |                                                                            
+  |===========================================                           |  61%
+  |                                                                            
+  |=============================================                         |  64%
+  |                                                                            
+  |===============================================                       |  67%
+  |                                                                            
+  |=================================================                     |  69%
+  |                                                                            
+  |===================================================                   |  72%
+  |                                                                            
+  |====================================================                  |  75%
+  |                                                                            
+  |======================================================                |  78%
+  |                                                                            
+  |========================================================              |  81%
+  |                                                                            
+  |==========================================================            |  83%
+  |                                                                            
+  |============================================================          |  86%
+  |                                                                            
+  |==============================================================        |  89%
+  |                                                                            
+  |================================================================      |  92%
+  |                                                                            
+  |==================================================================    |  94%
+  |                                                                            
+  |====================================================================  |  97%
+  |                                                                            
+  |======================================================================| 100%
+
+
+Fitting Principal Curve:
+
+Initial curve: d.sq: 103233.450
+Iteration   1: d.sq: 4283.431
+Iteration   2: d.sq: 4312.298
+Iteration   3: d.sq: 4340.691
+Iteration   4: d.sq: 4355.388
+Iteration   5: d.sq: 4366.497
+Iteration   6: d.sq: 4369.944
+
 PC Converged in 6 iterations.
---------------------------------------------------------------------------------
+
 > 
 > ## Plot the curve
 > plot(aber.pc, abernethy2)
@@ -6033,6 +6131,125 @@
 > 
 > 
 > cleanEx()
+> nameEx("plot3d.prcurve")
+> ### * plot3d.prcurve
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot3d.prcurve
+> ### Title: Interactive 3D plof of a principal curve in principal coordinate
+> ###   space
+> ### Aliases: plot3d.prcurve
+> ### Keywords: dynamic graphics
+> 
+> ### ** Examples
+> 
+> data(abernethy)
+> 
+> ## Remove the Depth and Age variables
+> abernethy2 <- abernethy[, -(37:38)]
+> 
+> ## Fit the principal curve using the median complexity over
+> ## all species
+> aber.pc <- prcurve(abernethy2, method = "ca", trace = TRUE,
++                    vary = FALSE, penalty = 1.4)
+
+   Determining initial DFs for each variable...
+
+  |                                                                            
+  |                                                                      |   0%
+  |                                                                            
+  |==                                                                    |   3%
+  |                                                                            
+  |====                                                                  |   6%
+  |                                                                            
+  |======                                                                |   8%
+  |                                                                            
+  |========                                                              |  11%
+  |                                                                            
+  |==========                                                            |  14%
+  |                                                                            
+  |============                                                          |  17%
+  |                                                                            
+  |==============                                                        |  19%
+  |                                                                            
+  |================                                                      |  22%
+  |                                                                            
+  |==================                                                    |  25%
+  |                                                                            
+  |===================                                                   |  28%
+  |                                                                            
+  |=====================                                                 |  31%
+  |                                                                            
+  |=======================                                               |  33%
+  |                                                                            
+  |=========================                                             |  36%
+  |                                                                            
+  |===========================                                           |  39%
+  |                                                                            
+  |=============================                                         |  42%
+  |                                                                            
+  |===============================                                       |  44%
+  |                                                                            
+  |=================================                                     |  47%
+  |                                                                            
+  |===================================                                   |  50%
+  |                                                                            
+  |=====================================                                 |  53%
+  |                                                                            
+  |=======================================                               |  56%
+  |                                                                            
+  |=========================================                             |  58%
+  |                                                                            
+  |===========================================                           |  61%
+  |                                                                            
+  |=============================================                         |  64%
+  |                                                                            
+  |===============================================                       |  67%
+  |                                                                            
+  |=================================================                     |  69%
+  |                                                                            
+  |===================================================                   |  72%
+  |                                                                            
+  |====================================================                  |  75%
+  |                                                                            
+  |======================================================                |  78%
+  |                                                                            
+  |========================================================              |  81%
+  |                                                                            
+  |==========================================================            |  83%
+  |                                                                            
+  |============================================================          |  86%
+  |                                                                            
+  |==============================================================        |  89%
+  |                                                                            
+  |================================================================      |  92%
+  |                                                                            
+  |==================================================================    |  94%
+  |                                                                            
+  |====================================================================  |  97%
+  |                                                                            
+  |======================================================================| 100%
+
+
+Fitting Principal Curve:
+
+Initial curve: d.sq: 103233.450
+Iteration   1: d.sq: 4853.791
+Iteration   2: d.sq: 5013.497
+Iteration   3: d.sq: 5109.973
+Iteration   4: d.sq: 5135.654
+Iteration   5: d.sq: 5137.944
+
+PC Converged in 5 iterations.
+
+> 
+> ## 3D plot of data with curve superimposed
+> plot3d(aber.pc, abernethy2)
+> 
+> 
+> 
+> cleanEx()
 > nameEx("prcurve")
 > ### * prcurve
 > 
@@ -6040,58 +6257,304 @@
 > 
 > ### Name: prcurve
 > ### Title: Fits a principal curve to m-dimensional data
-> ### Aliases: prcurve initCurve smoothSpline print.prcurve
+> ### Aliases: prcurve initCurve print.prcurve
 > ### Keywords: multivariate nonparametric smooth
 > 
 > ### ** Examples
 > 
+> ## Load Abernethy Forest data set
 > data(abernethy)
 > 
-> ## Plot the most common taxa
-> Stratiplot(Age ~ . - Depth, data =
-+            chooseTaxa(abernethy, max.abun = 15, n.occ = 10),
-+            type = c("g","poly"), sort = "wa")
-> 
 > ## Remove the Depth and Age variables
 > abernethy2 <- abernethy[, -(37:38)]
 > 
-> ## Fit PCA and CA
-> aber.pca <- rda(abernethy2)
-> aber.ca <- cca(abernethy2)
-> 
 > ## Fit the principal curve using the median complexity over
 > ## all species
 > aber.pc <- prcurve(abernethy2, method = "ca", trace = TRUE,
 +                    vary = FALSE, penalty = 1.4)
---------------------------------------------------------------------------------
-Initial curve: d.sq: 103233.4502
-Iteration   1: d.sq: 4853.7911
-Iteration   2: d.sq: 5013.4971
-Iteration   3: d.sq: 5109.9732
-Iteration   4: d.sq: 5135.6541
-Iteration   5: d.sq: 5137.9439
---------------------------------------------------------------------------------
+
+   Determining initial DFs for each variable...
+
+  |                                                                            
+  |                                                                      |   0%
+  |                                                                            
+  |==                                                                    |   3%
+  |                                                                            
+  |====                                                                  |   6%
+  |                                                                            
+  |======                                                                |   8%
+  |                                                                            
+  |========                                                              |  11%
+  |                                                                            
+  |==========                                                            |  14%
+  |                                                                            
+  |============                                                          |  17%
+  |                                                                            
+  |==============                                                        |  19%
+  |                                                                            
+  |================                                                      |  22%
+  |                                                                            
+  |==================                                                    |  25%
+  |                                                                            
+  |===================                                                   |  28%
+  |                                                                            
+  |=====================                                                 |  31%
+  |                                                                            
+  |=======================                                               |  33%
+  |                                                                            
+  |=========================                                             |  36%
+  |                                                                            
+  |===========================                                           |  39%
+  |                                                                            
+  |=============================                                         |  42%
+  |                                                                            
+  |===============================                                       |  44%
+  |                                                                            
+  |=================================                                     |  47%
+  |                                                                            
+  |===================================                                   |  50%
+  |                                                                            
+  |=====================================                                 |  53%
+  |                                                                            
+  |=======================================                               |  56%
+  |                                                                            
+  |=========================================                             |  58%
+  |                                                                            
+  |===========================================                           |  61%
+  |                                                                            
+  |=============================================                         |  64%
+  |                                                                            
+  |===============================================                       |  67%
+  |                                                                            
+  |=================================================                     |  69%
+  |                                                                            
+  |===================================================                   |  72%
+  |                                                                            
+  |====================================================                  |  75%
+  |                                                                            
+  |======================================================                |  78%
+  |                                                                            
+  |========================================================              |  81%
+  |                                                                            
+  |==========================================================            |  83%
+  |                                                                            
+  |============================================================          |  86%
+  |                                                                            
+  |==============================================================        |  89%
+  |                                                                            
+  |================================================================      |  92%
+  |                                                                            
+  |==================================================================    |  94%
+  |                                                                            
+  |====================================================================  |  97%
+  |                                                                            
+  |======================================================================| 100%
+
+
+Fitting Principal Curve:
+
+Initial curve: d.sq: 103233.450
+Iteration   1: d.sq: 4853.791
+Iteration   2: d.sq: 5013.497
+Iteration   3: d.sq: 5109.973
+Iteration   4: d.sq: 5135.654
+Iteration   5: d.sq: 5137.944
+
 PC Converged in 5 iterations.
---------------------------------------------------------------------------------
+
 > 
 > ## Fit the principal curve using varying complexity of smoothers
 > ## for each species
 > aber.pc2 <- prcurve(abernethy2, method = "ca", trace = TRUE,
 +                     vary = TRUE, penalty = 1.4)
---------------------------------------------------------------------------------
-Initial curve: d.sq: 103233.4502
-Iteration   1: d.sq: 4283.4308
-Iteration   2: d.sq: 4312.2976
-Iteration   3: d.sq: 4340.6911
-Iteration   4: d.sq: 4355.3876
-Iteration   5: d.sq: 4366.4975
-Iteration   6: d.sq: 4369.9444
---------------------------------------------------------------------------------
+
+   Determining initial DFs for each variable...
+
+  |                                                                            
+  |                                                                      |   0%
+  |                                                                            
+  |==                                                                    |   3%
+  |                                                                            
+  |====                                                                  |   6%
+  |                                                                            
+  |======                                                                |   8%
+  |                                                                            
+  |========                                                              |  11%
+  |                                                                            
+  |==========                                                            |  14%
+  |                                                                            
+  |============                                                          |  17%
+  |                                                                            
+  |==============                                                        |  19%
+  |                                                                            
+  |================                                                      |  22%
+  |                                                                            
+  |==================                                                    |  25%
+  |                                                                            
+  |===================                                                   |  28%
+  |                                                                            
+  |=====================                                                 |  31%
+  |                                                                            
+  |=======================                                               |  33%
+  |                                                                            
+  |=========================                                             |  36%
+  |                                                                            
+  |===========================                                           |  39%
+  |                                                                            
+  |=============================                                         |  42%
+  |                                                                            
+  |===============================                                       |  44%
+  |                                                                            
+  |=================================                                     |  47%
+  |                                                                            
+  |===================================                                   |  50%
+  |                                                                            
+  |=====================================                                 |  53%
+  |                                                                            
+  |=======================================                               |  56%
+  |                                                                            
+  |=========================================                             |  58%
+  |                                                                            
+  |===========================================                           |  61%
+  |                                                                            
+  |=============================================                         |  64%
+  |                                                                            
+  |===============================================                       |  67%
+  |                                                                            
+  |=================================================                     |  69%
+  |                                                                            
+  |===================================================                   |  72%
+  |                                                                            
+  |====================================================                  |  75%
+  |                                                                            
+  |======================================================                |  78%
+  |                                                                            
+  |========================================================              |  81%
+  |                                                                            
+  |==========================================================            |  83%
+  |                                                                            
+  |============================================================          |  86%
+  |                                                                            
+  |==============================================================        |  89%
+  |                                                                            
+  |================================================================      |  92%
+  |                                                                            
+  |==================================================================    |  94%
+  |                                                                            
+  |====================================================================  |  97%
+  |                                                                            
+  |======================================================================| 100%
+
+
+Fitting Principal Curve:
+
+Initial curve: d.sq: 103233.450
+Iteration   1: d.sq: 4283.431
+Iteration   2: d.sq: 4312.298
+Iteration   3: d.sq: 4340.691
+Iteration   4: d.sq: 4355.388
+Iteration   5: d.sq: 4366.497
+Iteration   6: d.sq: 4369.944
+
 PC Converged in 6 iterations.
---------------------------------------------------------------------------------
+
 > 
+> ## Fit principal curve using a GAM - currently slow ~10secs
+> aber.pc3 <- prcurve(abernethy2, method = "ca", trace = TRUE,
++                     vary = TRUE, smoother = smoothGAM, bs = "cr")
+
+   Determining initial DFs for each variable...
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/analogue -r 343


More information about the Analogue-commits mailing list