[Analogue-commits] r266 - in pkg: . R inst man tests/Examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 20 16:13:14 CEST 2012
Author: gsimpson
Date: 2012-04-20 16:13:14 +0200 (Fri, 20 Apr 2012)
New Revision: 266
Modified:
pkg/DESCRIPTION
pkg/R/deshrink.R
pkg/R/deshrinkPred.R
pkg/R/wa.R
pkg/R/wa.formula.R
pkg/inst/ChangeLog
pkg/man/deshrink.Rd
pkg/man/wa.Rd
pkg/tests/Examples/analogue-Ex.Rout.save
Log:
add monotonic deshrinking to wa()
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/DESCRIPTION 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,10 +1,10 @@
Package: analogue
Type: Package
Title: Analogue and weighted averaging methods for palaeoecology
-Version: 0.9-2
+Version: 0.9-3
Date: $Date$
Depends: R (>= 2.15.0), stats, graphics, vegan (>= 1.17-12), lattice, grid,
- MASS, princurve
+ MASS, princurve, mgcv
Author: Gavin L. Simpson, Jari Oksanen
Maintainer: Gavin L. Simpson <gavin.simpson at ucl.ac.uk>
Description: Fits Modern Analogue Technique and Weighted Averaging transfer
Modified: pkg/R/deshrink.R
===================================================================
--- pkg/R/deshrink.R 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/R/deshrink.R 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,6 +1,6 @@
`deshrink` <- function(env, wa.env,
type = c("inverse", "classical",
- "expanded", "none")) {
+ "expanded", "none","monotonic")) {
### Inline Functions ############################################
## inverse deshrinking
`inverse` <- function(env, wa.env) {
@@ -37,6 +37,28 @@
`none` <- function(env, wa.env) {
return(list(coefficients = c(0, 1), env = wa.env))
}
+ ## Monotonic deshrinking via pcls() in mgcv
+ ## Use a spline fit to deshrink instead of the linear inverse
+ ## or classical deshrinking methods
+ ## Needs to be constrained to be monotonic so ?mono.con
+ `monotonic` <- function(env, wa.env) {
+ df <- data.frame(env = env, wa.env = drop(wa.env))
+ mod <- gam(env ~ s(wa.env, k = 10, bs = "cr"), data = df)
+ ## grab bits for setting up a monotonic spline, see ?pcls
+ sm <- smoothCon(s(wa.env, k = 10, bs = "cr"), data = df,
+ knots = NULL)[[1]]
+ ## Fm are the constraints to enforce monotonicity
+ Fm <- mono.con(sm$xp)
+ G <- list(X = sm$X, C = matrix(0,0,0), sp = mod$sp, p = sm$xp,
+ y = env, w = env*0+1, Ain = Fm$A, bin = Fm$b, S = sm$S,
+ off = 0)
+ p <- pcls(G)
+ ## predict for the current data
+ pred <- Predict.matrix(sm, data = data.frame(wa.env = wa.env)) %*% p
+ pred <- drop(pred)
+ ## return
+ list(coefficients = list(sm = sm, p = p), env = pred)
+ }
### End Inline Functions #########################################
if(missing(type))
type <- "inverse"
@@ -45,7 +67,8 @@
inverse = inverse(env, wa.env),
classical = classical(env, wa.env),
expanded = expanded(env, wa.env),
- none = none(env, wa.env))
+ none = none(env, wa.env),
+ monotonic = monotonic(env, wa.env))
class(res) <- c("deshrink","list")
attr(res, "type") <- type
return(res)
Modified: pkg/R/deshrinkPred.R
===================================================================
--- pkg/R/deshrinkPred.R 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/R/deshrinkPred.R 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,6 +1,6 @@
`deshrinkPred` <- function(x, coef,
type = c("inverse", "classical",
- "expanded", "none")) {
+ "expanded", "none","monotonic")) {
if(missing(type))
type <- "inverse"
type <- match.arg(type)
@@ -8,6 +8,8 @@
inverse = coef[1] + (coef[2] * x),
classical = (x - coef[1]) / coef[2],
expanded = coef[1] + (coef[2] * x),
- none = coef[1] + (coef[2] * x))
+ none = coef[1] + (coef[2] * x),
+ monotonic = drop(Predict.matrix(coef$sm,
+ data.frame(wa.env = x)) %*% coef$p))
return(res)
}
Modified: pkg/R/wa.R
===================================================================
--- pkg/R/wa.R 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/R/wa.R 2012-04-20 14:13:14 UTC (rev 266)
@@ -2,7 +2,7 @@
`wa.default` <-
function(x, env,
- deshrink = c("inverse", "classical", "expanded", "none"),
+ deshrink = c("inverse", "classical", "expanded", "none", "monotonic"),
tol.dw = FALSE, useN2 = TRUE,
na.tol = c("min","mean","max"),
small.tol = c("min","mean","fraction","absolute"),
Modified: pkg/R/wa.formula.R
===================================================================
--- pkg/R/wa.formula.R 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/R/wa.formula.R 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,5 +1,5 @@
`wa.formula` <- function(formula, data, subset, na.action,
- deshrink = c("inverse", "classical", "expanded", "none"),
+ deshrink = c("inverse", "classical", "expanded", "none", "monotonic"),
tol.dw = FALSE, useN2 = TRUE,
na.tol = c("min","mean","max"),
small.tol = c("min","mean","fraction","absolute"),
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/inst/ChangeLog 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,5 +1,24 @@
analogue Change Log
+Version 0.9-3
+
+ * wa: deshrinking via a monotonic cubic regression spline
+ is now available via `deshrink = "monotonic"`. This uses
+ functions from the *mgcv* package of Simon Wood and as a
+ result, *analogue* now Depends on that package too. The
+ exact nature of the dependency may change before 0.10 is
+ released.
+
+ This idea goes back to ter Braak & Juggins (1993; Hydrobiologia
+ *269/270*, 485--502) and Marchetto (1994; Journal of
+ Paleolimnology *12*, 155--162), but the implementation here
+ uses monotonic constraints after Wood (1994; SIAM Journal on
+ Scientific Computing *15*(5), 1126--1133 and follows Steve
+ Juggins' implementation borrowing code from `?pcls` in *mgcv*.
+
+ * predict.wa: example was enclosed in \dontrun{} without
+ reason. This example is now run.
+
Version 0.9-2
* wa: small tolerances can now be replaced by the mean
Modified: pkg/man/deshrink.Rd
===================================================================
--- pkg/man/deshrink.Rd 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/man/deshrink.Rd 2012-04-20 14:13:14 UTC (rev 266)
@@ -13,11 +13,13 @@
new samples given a set of deshrinking coefficients.
}
\usage{
-deshrink(env, wa.env, type = c("inverse", "classical",
- "expanded", "none"))
+deshrink(env, wa.env,
+ type = c("inverse", "classical", "expanded", "none",
+ "monotonic"))
-deshrinkPred(x, coef, type = c("inverse", "classical",
- "expanded", "none"))
+deshrinkPred(x, coef,
+ type = c("inverse", "classical", "expanded", "none",
+ "monotonic"))
}
\arguments{
\item{env}{numeric; original environmental values.}
Modified: pkg/man/wa.Rd
===================================================================
--- pkg/man/wa.Rd 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/man/wa.Rd 2012-04-20 14:13:14 UTC (rev 266)
@@ -17,14 +17,14 @@
wa(x, \dots)
\method{wa}{default}(x, env,
- deshrink = c("inverse", "classical", "expanded", "none"),
+ deshrink = c("inverse", "classical", "expanded", "none", "monotonic"),
tol.dw = FALSE, useN2 = TRUE,
na.tol = c("min","mean","max"),
small.tol = c("min","mean","fraction","absolute"),
min.tol = NULL, f = 0.1, ...)
\method{wa}{formula}(formula, data, subset, na.action,
- deshrink = c("inverse", "classical", "expanded", "none"),
+ deshrink = c("inverse", "classical", "expanded", "none", "monotonic"),
tol.dw = FALSE, useN2 = TRUE, na.tol = c("min","mean","max"),
small.tol = c("min","mean","fraction","absolute"), min.tol = NULL,
f = 0.1,..., model = FALSE)
@@ -43,8 +43,8 @@
\item{x}{The species training set data}
\item{env, y}{The response vector}
\item{deshrink}{Which deshrinking method to use? One of
- \code{"inverse"} or \code{"classical"}, \code{"expanded"} or
- \code{"none"}}
+ \code{"inverse"} or \code{"classical"}, \code{"expanded"},
+ \code{"none"}, or \code{"monotonic"}.}
\item{tol.dw}{logical; should species with wider tolerances be given
lower weight?}
\item{useN2}{logical; should Hill's N2 values be used to produce
@@ -134,7 +134,12 @@
\item{fitted.values}{The fitted values of the response for each of the
training set samples.}
\item{residuals}{Model residuals.}
- \item{coefficients}{Deshrinking coefficients.}
+ \item{coefficients}{Deshrinking coefficients. Note that in the case of
+ \code{deshrink = "monotonic"} this is a list with components \code{sm}
+ (the representation of the smooth term as returned by
+ \code{\link{smoothCon}}) and \code{p} (solutions to the least squares
+ fit with monotonic constraints, the result of a call to
+ \code{\link{pcls}}).}
\item{rmse}{The RMSE of the model.}
\item{r.squared}{The coefficient of determination of the observed and
fitted values of the response.}
@@ -195,6 +200,16 @@
min.tol = 2, small.tol = "mean")
mod3
+## fit a WA model with monotonic deshrinking
+mod4 <- wa(SumSST ~., data = ImbrieKipp, deshrink = "monotonic")
+mod4
+
+## extract the fitted values
+fitted(mod4)
+
+## residuals for the training set
+residuals(mod4)
+
}
\keyword{methods}
\keyword{models}
Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save 2012-04-20 14:12:38 UTC (rev 265)
+++ pkg/tests/Examples/analogue-Ex.Rout.save 2012-04-20 14:13:14 UTC (rev 266)
@@ -1,5 +1,5 @@
-R version 2.15.0 Patched (2012-04-14 r59019) -- "Easter Beagle"
+R version 2.15.0 Patched (2012-04-16 r59049) -- "Easter Beagle"
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
@@ -29,7 +29,9 @@
Loading required package: grid
Loading required package: MASS
Loading required package: princurve
-This is analogue 0.9-2
+Loading required package: mgcv
+This is mgcv 1.7-13. For overview type 'help("mgcv-package")'.
+This is analogue 0.9-3
>
> assign(".oldSearch", search(), pos = 'CheckExEnv')
> cleanEx()
@@ -4856,6 +4858,70 @@
RMSE R-squared Avg. Bias Max. Bias
1.9924 0.9194 0.0000 -2.5992
+
+wa> ## fit a WA model with monotonic deshrinking
+wa> mod4 <- wa(SumSST ~., data = ImbrieKipp, deshrink = "monotonic")
+
+wa> mod4
+
+ Weighted Averaging Transfer Function
+
+Call:
+wa(formula = SumSST ~ ., data = ImbrieKipp, deshrink = "monotonic")
+
+Deshrinking : Monotonic
+Tolerance DW : No
+No. samples : 61
+No. species : 27
+
+Performance:
+ RMSE R-squared Avg. Bias Max. Bias
+ 1.6107 0.9474 0.0000 -3.8985
+
+
+wa> ## extract the fitted values
+wa> fitted(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
+ 5.898451 5.959142 6.075776 6.163532 8.126549 8.641443 6.060926 11.563327
+ V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
+11.970987 14.010916 13.276208 16.803976 16.168939 16.404646 15.002783 19.397640
+ A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+18.706537 18.292346 16.869999 22.940318 22.427838 20.008273 22.491527 22.112760
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
+21.211500 23.637275 23.665250 23.012758 24.659931 26.099307 25.975387 23.686165
+ V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
+24.126195 23.356724 24.980999 25.862528 26.266124 26.716472 24.597292 25.941735
+ V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+26.698566 26.292611 27.127317 26.849545 26.553215 26.190434 26.330267 26.794756
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
+27.236962 27.145893 27.268262 26.451803 27.327863 27.351207 26.967878 26.530415
+ V20.230 V20.7 V20.234 V18.21 V12.122
+27.059522 27.670385 27.213081 27.390149 27.279387
+
+wa> ## residuals for the training set
+wa> residuals(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22
+-3.89845110 -0.95914237 -0.57577610 0.83646773 -1.12654866 1.85855684
+ V2.12 V23.29 V12.43 R9.7 A157.3 V23.81
+ 4.93907447 -1.56332718 1.02901346 -2.01091600 0.72379238 -2.30397581
+ V23.82 V12.53 V23.83 V12.56 A152.84 V16.50
+-1.16893885 -1.90464620 0.99721686 -1.39764003 1.29346295 -0.29234573
+ V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+ 2.13000056 -4.44031822 -0.92783840 0.99172654 -1.49152689 1.88724026
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189
+ 2.78850048 -0.63727536 0.33475037 -0.01275751 -1.65993109 -2.09930701
+ V12.18 V7.67 V17.165 V19.310 V16.190 A153.154
+-0.97538682 2.31383514 1.87380535 2.64327583 0.01900071 0.13747169
+ V19.308 V22.172 V10.98 V22.219 V16.33 V22.204
+-0.26612390 -2.21647192 2.40270758 0.25826513 -1.69856608 0.20738893
+ V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+-0.92731700 -0.84954530 -0.55321548 0.80956624 0.66973330 0.70524398
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128
+-0.23696237 -0.14589252 -0.26826158 0.54819699 -0.32786314 1.64879299
+ A179.13 V9.31 V20.230 V20.7 V20.234 V18.21
+ 1.53212230 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014885
+ V12.122
+ 0.72061292
>
> ## the model performance statistics
> performance(mod)
@@ -5927,6 +5993,70 @@
RMSE R-squared Avg. Bias Max. Bias
1.9924 0.9194 0.0000 -2.5992
+
+wa> ## fit a WA model with monotonic deshrinking
+wa> mod4 <- wa(SumSST ~., data = ImbrieKipp, deshrink = "monotonic")
+
+wa> mod4
+
+ Weighted Averaging Transfer Function
+
+Call:
+wa(formula = SumSST ~ ., data = ImbrieKipp, deshrink = "monotonic")
+
+Deshrinking : Monotonic
+Tolerance DW : No
+No. samples : 61
+No. species : 27
+
+Performance:
+ RMSE R-squared Avg. Bias Max. Bias
+ 1.6107 0.9474 0.0000 -3.8985
+
+
+wa> ## extract the fitted values
+wa> fitted(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
+ 5.898451 5.959142 6.075776 6.163532 8.126549 8.641443 6.060926 11.563327
+ V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
+11.970987 14.010916 13.276208 16.803976 16.168939 16.404646 15.002783 19.397640
+ A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+18.706537 18.292346 16.869999 22.940318 22.427838 20.008273 22.491527 22.112760
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
+21.211500 23.637275 23.665250 23.012758 24.659931 26.099307 25.975387 23.686165
+ V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
+24.126195 23.356724 24.980999 25.862528 26.266124 26.716472 24.597292 25.941735
+ V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+26.698566 26.292611 27.127317 26.849545 26.553215 26.190434 26.330267 26.794756
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
+27.236962 27.145893 27.268262 26.451803 27.327863 27.351207 26.967878 26.530415
+ V20.230 V20.7 V20.234 V18.21 V12.122
+27.059522 27.670385 27.213081 27.390149 27.279387
+
+wa> ## residuals for the training set
+wa> residuals(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22
+-3.89845110 -0.95914237 -0.57577610 0.83646773 -1.12654866 1.85855684
+ V2.12 V23.29 V12.43 R9.7 A157.3 V23.81
+ 4.93907447 -1.56332718 1.02901346 -2.01091600 0.72379238 -2.30397581
+ V23.82 V12.53 V23.83 V12.56 A152.84 V16.50
+-1.16893885 -1.90464620 0.99721686 -1.39764003 1.29346295 -0.29234573
+ V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+ 2.13000056 -4.44031822 -0.92783840 0.99172654 -1.49152689 1.88724026
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189
+ 2.78850048 -0.63727536 0.33475037 -0.01275751 -1.65993109 -2.09930701
+ V12.18 V7.67 V17.165 V19.310 V16.190 A153.154
+-0.97538682 2.31383514 1.87380535 2.64327583 0.01900071 0.13747169
+ V19.308 V22.172 V10.98 V22.219 V16.33 V22.204
+-0.26612390 -2.21647192 2.40270758 0.25826513 -1.69856608 0.20738893
+ V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+-0.92731700 -0.84954530 -0.55321548 0.80956624 0.66973330 0.70524398
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128
+-0.23696237 -0.14589252 -0.26826158 0.54819699 -0.32786314 1.64879299
+ A179.13 V9.31 V20.230 V20.7 V20.234 V18.21
+ 1.53212230 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014885
+ V12.122
+ 0.72061292
>
> ## diagnostics for the WA model
> par(mfrow = c(1,2))
@@ -6123,31 +6253,49 @@
>
> ### ** Examples
>
-> ## Not run:
-> ##D ## Imbrie and Kipp
-> ##D data(ImbrieKipp)
-> ##D data(SumSST)
-> ##D ik.wa <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
-> ##D min.tol = 2, small.tol = "min")
-> ##D ik.wa
-> ##D
-> ##D ## load V12.122 core data
-> ##D data(V12.122)
-> ##D V12.122 <- V12.122 / 100
-> ##D
-> ##D ## predict summer sea-surface temperature for V12.122 core
-> ##D v12.pred <- predict(ik.wa, V12.122, CV = "bootstrap", n.boot = 100)
-> ##D
-> ##D ## draw the fitted reconstruction
-> ##D reconPlot(v12.pred, use.labels = TRUE, display = "bars")
-> ##D
-> ##D ## extract the model performance stats
-> ##D performance(v12.pred)
-> ## End(Not run)
+> ## Imbrie and Kipp
+> data(ImbrieKipp)
+> data(SumSST)
+> ik.wa <- wa(SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE,
++ min.tol = 2, small.tol = "min")
+> ik.wa
+
+ Weighted Averaging Transfer Function
+
+Call:
+wa(formula = SumSST ~ ., data = ImbrieKipp, tol.dw = TRUE, small.tol = "min",
+
+ min.tol = 2)
+
+Deshrinking : Inverse
+Tolerance DW : Yes
+No. samples : 61
+No. species : 27
+
+Performance:
+ RMSE R-squared Avg. Bias Max. Bias
+ 2.0268 0.9166 0.0000 -2.4507
+
>
+> ## load V12.122 core data
+> data(V12.122)
+> V12.122 <- V12.122 / 100
>
+> ## predict summer sea-surface temperature for V12.122 core
+> set.seed(2)
+> v12.pred <- predict(ik.wa, V12.122, CV = "bootstrap", n.boot = 100)
>
+> ## draw the fitted reconstruction
+> reconPlot(v12.pred, use.labels = TRUE, display = "bars")
>
+> ## extract the model performance stats
+> performance(v12.pred)
+ RMSEP R2 Avg.Bias Max.Bias
+ 2.3617 0.8989 -0.1483 -3.2158
+>
+>
+>
+>
> cleanEx()
> nameEx("reconPlot")
> ### * reconPlot
@@ -7055,9 +7203,72 @@
1.9924 0.9194 0.0000 -2.5992
>
+> ## fit a WA model with monotonic deshrinking
+> mod4 <- wa(SumSST ~., data = ImbrieKipp, deshrink = "monotonic")
+> mod4
+
+ Weighted Averaging Transfer Function
+
+Call:
+wa(formula = SumSST ~ ., data = ImbrieKipp, deshrink = "monotonic")
+
+Deshrinking : Monotonic
+Tolerance DW : No
+No. samples : 61
+No. species : 27
+
+Performance:
+ RMSE R-squared Avg. Bias Max. Bias
+ 1.6107 0.9474 0.0000 -3.8985
+
>
+> ## extract the fitted values
+> fitted(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22 V2.12 V23.29
+ 5.898451 5.959142 6.075776 6.163532 8.126549 8.641443 6.060926 11.563327
+ V12.43 R9.7 A157.3 V23.81 V23.82 V12.53 V23.83 V12.56
+11.970987 14.010916 13.276208 16.803976 16.168939 16.404646 15.002783 19.397640
+ A152.84 V16.50 V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+18.706537 18.292346 16.869999 22.940318 22.427838 20.008273 22.491527 22.112760
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189 V12.18 V7.67
+21.211500 23.637275 23.665250 23.012758 24.659931 26.099307 25.975387 23.686165
+ V17.165 V19.310 V16.190 A153.154 V19.308 V22.172 V10.98 V22.219
+24.126195 23.356724 24.980999 25.862528 26.266124 26.716472 24.597292 25.941735
+ V16.33 V22.204 V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+26.698566 26.292611 27.127317 26.849545 26.553215 26.190434 26.330267 26.794756
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128 A179.13 V9.31
+27.236962 27.145893 27.268262 26.451803 27.327863 27.351207 26.967878 26.530415
+ V20.230 V20.7 V20.234 V18.21 V12.122
+27.059522 27.670385 27.213081 27.390149 27.279387
>
+> ## residuals for the training set
+> residuals(mod4)
+ V14.61 V17.196 V18.110 V16.227 V14.47 V23.22
+-3.89845110 -0.95914237 -0.57577610 0.83646773 -1.12654866 1.85855684
+ V2.12 V23.29 V12.43 R9.7 A157.3 V23.81
+ 4.93907447 -1.56332718 1.02901346 -2.01091600 0.72379238 -2.30397581
+ V23.82 V12.53 V23.83 V12.56 A152.84 V16.50
+-1.16893885 -1.90464620 0.99721686 -1.39764003 1.29346295 -0.29234573
+ V22.122 V16.41 V4.32 V12.66 V19.245 V4.8
+ 2.13000056 -4.44031822 -0.92783840 0.99172654 -1.49152689 1.88724026
+ A180.15 V18.34 V20.213 V19.222 A180.39 V16.189
+ 2.78850048 -0.63727536 0.33475037 -0.01275751 -1.65993109 -2.09930701
+ V12.18 V7.67 V17.165 V19.310 V16.190 A153.154
+-0.97538682 2.31383514 1.87380535 2.64327583 0.01900071 0.13747169
+ V19.308 V22.172 V10.98 V22.219 V16.33 V22.204
+-0.26612390 -2.21647192 2.40270758 0.25826513 -1.69856608 0.20738893
+ V20.167 V10.89 V12.79 V19.216 V14.90 A180.72
+-0.92731700 -0.84954530 -0.55321548 0.80956624 0.66973330 0.70524398
+ V16.21 A180.76 V15.164 A180.78 V14.5 V3.128
+-0.23696237 -0.14589252 -0.26826158 0.54819699 -0.32786314 1.64879299
+ A179.13 V9.31 V20.230 V20.7 V20.234 V18.21
+ 1.53212230 0.96958483 0.44047759 -0.17038549 -0.21308146 -0.39014885
+ V12.122
+ 0.72061292
>
+>
+>
+>
> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
> cleanEx()
> nameEx("weightedCor")
@@ -7201,7 +7412,7 @@
> ### * <FOOTER>
> ###
> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed: 15.256 0.187 16.245 0 0
+Time elapsed: 16.957 0.457 17.764 0 0
> grDevices::dev.off()
null device
1
More information about the Analogue-commits
mailing list