Skip to content

Commit

Permalink
use fewer digits in reference output for wa()
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinsimpson committed Feb 27, 2016
1 parent 6cece0a commit 11d0197
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion man/wa.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ waFit(x, y, tol.dw, useN2, deshrink, na.tol, small.tol,
\author{Gavin L. Simpson and Jari Oksanen}
\seealso{\code{\link{mat}} for an alternative transfer function method.}
\examples{
\testonly{od <- options(digits = 5)}
\testonly{od <- options(digits = 4)}
data(ImbrieKipp)
data(SumSST)
Expand Down
122 changes: 61 additions & 61 deletions tests/Examples/analogue-Ex.Rout.save
Original file line number Diff line number Diff line change
Expand Up @@ -7212,7 +7212,7 @@ Eigenvalues for unconstrained axes:
> ### ** Examples
>
> ## Don't show:
> od <- options(digits = 5)
> od <- options(digits = 4)
> ## End(Don't show)
> data(ImbrieKipp)
> data(SumSST)
Expand All @@ -7239,44 +7239,44 @@ Performance:
> ## extract the fitted values
> fitted(mod)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
3.7310 3.8599 4.1077 4.2939 8.2876 9.2444 4.0761 13.8155
3.731 3.860 4.108 4.294 8.288 9.244 4.076 13.815
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
14.3345 16.5213 15.8044 18.7365 18.2896 18.4587 17.3886 20.4020
14.335 16.521 15.804 18.737 18.290 18.459 17.389 20.402
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
19.9694 19.7086 18.7815 22.7892 22.4079 20.7855 22.4544 22.1814
19.969 19.709 18.782 22.789 22.408 20.785 22.454 22.181
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
21.5623 23.3379 23.3608 22.8445 24.2193 25.6257 25.4988 23.3779
21.562 23.338 23.361 22.845 24.219 25.626 25.499 23.378
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
23.7472 23.1125 24.5166 25.3837 25.7968 26.2585 24.1625 25.4644
23.747 23.112 24.517 25.384 25.797 26.258 24.162 25.464
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
26.2402 25.8240 26.6780 26.3945 26.0913 25.7191 25.8627 26.3385
26.240 25.824 26.678 26.395 26.091 25.719 25.863 26.339
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
26.7898 26.6969 26.8217 25.9874 26.8824 26.9062 26.5153 26.0680
26.790 26.697 26.822 25.987 26.882 26.906 26.515 26.068
V20.230 V20.7 V20.234 V18.21 V12.122
26.6088 27.2316 26.7654 26.9459 26.8330
26.609 27.232 26.765 26.946 26.833
>
> ## residuals for the training set
> residuals(mod)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
-1.730960 1.140079 1.392336 2.706094 -1.287580 1.255591 6.923869 -3.815481
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
-1.334514 -4.521301 -1.804396 -4.236542 -3.289596 -3.958708 -1.388560 -2.401983
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
0.030579 -1.708591 0.218460 -4.289225 -0.907882 0.214508 -1.454368 1.818595
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
2.437667 -0.337938 0.639214 0.155458 -1.219277 -1.625657 -0.498810 2.622087
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
2.252766 2.887535 0.483422 0.616261 0.203160 -1.758495 2.837538 0.735556
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-1.240175 0.675969 -0.477965 -0.394526 -0.091336 1.280861 1.137318 1.161456
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
0.210242 0.303094 0.178331 1.012626 0.117565 2.093765 1.984665 1.432030
V20.230 V20.7 V20.234 V18.21 V12.122
0.891171 0.268358 0.234590 0.054063 1.166988
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
-1.73096 1.14008 1.39234 2.70609 -1.28758 1.25559 6.92387 -3.81548
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
-1.33451 -4.52130 -1.80440 -4.23654 -3.28960 -3.95871 -1.38856 -2.40198
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
0.03058 -1.70859 0.21846 -4.28923 -0.90788 0.21451 -1.45437 1.81859
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
2.43767 -0.33794 0.63921 0.15546 -1.21928 -1.62566 -0.49881 2.62209
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
2.25277 2.88753 0.48342 0.61626 0.20316 -1.75849 2.83754 0.73556
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-1.24017 0.67597 -0.47797 -0.39453 -0.09134 1.28086 1.13732 1.16146
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
0.21024 0.30309 0.17833 1.01263 0.11757 2.09377 1.98466 1.43203
V20.230 V20.7 V20.234 V18.21 V12.122
0.89117 0.26836 0.23459 0.05406 1.16699
>
> ## deshrinking coefficients
> coef(mod)
[1] -5.6876 1.2659
[1] -5.688 1.266
>
> ## diagnostics plots
> par(mfrow = c(1,2))
Expand Down Expand Up @@ -7317,17 +7317,17 @@ Performance:
> ## compare actual tolerances to working values
> with(mod2, rbind(tolerances, model.tol))
O.univ G.cglob G.ruber G.tenel G.saccu G.rubes G.pacL G.pacR G.bullo
tolerances 3.7464 1.8956 1.9096 2.1248 1.9797 1.9683 3.9414 5.1812 5.828
model.tol 3.7464 2.1248 2.1248 2.1248 2.1248 2.1248 3.9414 5.1812 5.828
tolerances 3.746 1.896 1.910 2.125 1.980 1.968 3.941 5.181 5.828
model.tol 3.746 2.125 2.125 2.125 2.125 2.125 3.941 5.181 5.828
G.falco G.calid G.aequi G.gluti G.duter G.infla G.trnL G.trnR
tolerances 3.1092 2.9731 2.5617 5.8983 1.9983 4.7239 4.1617 3.4349
model.tol 3.1092 2.9731 2.5617 5.8983 2.1248 4.7239 4.1617 3.4349
G.crasf G.scitu G.mentu P.obliq C.nitid S.dehis G.digit Other
tolerances 3.354 3.9907 2.3866 1.5548 1.4617 3.8447 3.1089 5.1125
model.tol 3.354 3.9907 2.3866 2.1248 2.1248 3.8447 3.1089 5.1125
G.quin G.hirsu
tolerances 4.2688 3.9421
model.tol 4.2688 3.9421
tolerances 3.109 2.973 2.562 5.898 1.998 4.724 4.162 3.435
model.tol 3.109 2.973 2.562 5.898 2.125 4.724 4.162 3.435
G.crasf G.scitu G.mentu P.obliq C.nitid S.dehis G.digit Other G.quin
tolerances 3.354 3.991 2.387 1.555 1.462 3.845 3.109 5.112 4.269
model.tol 3.354 3.991 2.387 2.125 2.125 3.845 3.109 5.112 4.269
G.hirsu
tolerances 3.942
model.tol 3.942
>
> ## tolerance DW
> mod3 <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
Expand Down Expand Up @@ -7373,40 +7373,40 @@ Performance:
> ## extract the fitted values
> fitted(mod4)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
5.8985 5.9591 6.0758 6.1635 8.1265 8.6414 6.0609 11.5633
5.898 5.959 6.076 6.164 8.127 8.641 6.061 11.563
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
11.9710 14.0109 13.2762 16.8040 16.1689 16.4046 15.0028 19.3976
11.971 14.011 13.276 16.804 16.169 16.405 15.003 19.398
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
18.7065 18.2923 16.8700 22.9403 22.4278 20.0083 22.4915 22.1128
18.707 18.292 16.870 22.940 22.428 20.008 22.492 22.113
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
21.2115 23.6373 23.6652 23.0128 24.6599 26.0993 25.9754 23.6862
21.211 23.637 23.665 23.013 24.660 26.099 25.975 23.686
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
24.1262 23.3567 24.9810 25.8625 26.2661 26.7165 24.5973 25.9417
24.126 23.357 24.981 25.863 26.266 26.716 24.597 25.942
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
26.6986 26.2926 27.1273 26.8495 26.5532 26.1904 26.3303 26.7948
26.699 26.293 27.127 26.850 26.553 26.190 26.330 26.795
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
27.2370 27.1459 27.2683 26.4518 27.3279 27.3512 26.9679 26.5304
27.237 27.146 27.268 26.452 27.328 27.351 26.968 26.530
V20.230 V20.7 V20.234 V18.21 V12.122
27.0595 27.6704 27.2131 27.3901 27.2794
27.060 27.670 27.213 27.390 27.279
>
> ## residuals for the training set
> residuals(mod4)
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
-3.898451 -0.959142 -0.575776 0.836468 -1.126549 1.858557 4.939074 -1.563327
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
1.029013 -2.010916 0.723792 -2.303976 -1.168939 -1.904646 0.997217 -1.397640
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
1.293463 -0.292346 2.130001 -4.440318 -0.927838 0.991727 -1.491527 1.887240
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
2.788500 -0.637275 0.334750 -0.012758 -1.659931 -2.099307 -0.975387 2.313835
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
1.873805 2.643276 0.019001 0.137472 -0.266124 -2.216472 2.402708 0.258265
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-1.698566 0.207389 -0.927317 -0.849545 -0.553215 0.809566 0.669733 0.705244
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
-0.236962 -0.145893 -0.268262 0.548197 -0.327863 1.648793 1.532122 0.969585
V20.230 V20.7 V20.234 V18.21 V12.122
0.440478 -0.170385 -0.213081 -0.390149 0.720613
V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
-3.89845 -0.95914 -0.57578 0.83647 -1.12655 1.85856 4.93907 -1.56333
V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
1.02901 -2.01092 0.72379 -2.30398 -1.16894 -1.90465 0.99722 -1.39764
A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
1.29346 -0.29235 2.13000 -4.44032 -0.92784 0.99173 -1.49153 1.88724
A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
2.78850 -0.63728 0.33475 -0.01276 -1.65993 -2.09931 -0.97539 2.31384
V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
1.87381 2.64328 0.01900 0.13747 -0.26612 -2.21647 2.40271 0.25827
V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
-1.69857 0.20739 -0.92732 -0.84955 -0.55322 0.80957 0.66973 0.70524
V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
-0.23696 -0.14589 -0.26826 0.54820 -0.32786 1.64879 1.53212 0.96958
V20.230 V20.7 V20.234 V18.21 V12.122
0.44048 -0.17039 -0.21308 -0.39015 0.72061
>
> ## Don't show:
> options(od)
Expand Down Expand Up @@ -7458,7 +7458,7 @@ Correlation : 0.437 (p = < 2.22e-16)
> ###
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 21.898 0.295 22.177 0 0
Time elapsed: 20.623 0.279 20.886 0 0
> grDevices::dev.off()
null device
1
Expand Down

0 comments on commit 11d0197

Please sign in to comment.