R Under development (unstable) (2024-06-05 r86695 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(nlme) > is64bit <- .Machine$sizeof.pointer == 8 > > options(digits = 10)# <- see more, as we have *no* *.Rout.save file here > ## https://stat.ethz.ch/pipermail/r-help/2014-September/422123.html > nfm <- nlme(circumference ~ SSlogis(age, Asym, xmid, scal), + data = Orange, + fixed = Asym + xmid + scal ~ 1) Warning message: In (function (model, data = sys.frame(sys.parent()), fixed, random, : Iteration 1, LME step: nlminb() did not converge (code = 1). Do increase 'msMaxIter'! > (sO <- summary(nfm)) Nonlinear mixed-effects model fit by maximum likelihood Model: circumference ~ SSlogis(age, Asym, xmid, scal) Data: Orange AIC BIC logLik 279.9815533 295.5350339 -129.9907767 Random effects: Formula: list(Asym ~ 1, xmid ~ 1, scal ~ 1) Level: Tree Structure: General positive-definite, Log-Cholesky parametrization StdDev Corr Asym 27.053938288 Asym xmid xmid 24.283276969 -0.326 scal 36.588363863 -0.992 0.443 Residual 7.321369556 Fixed effects: list(Asym ~ 1, xmid ~ 1, scal ~ 1) Value Std.Error DF t-value p-value Asym 192.0945897 14.05366740 28 13.66864493 0 xmid 727.5803839 34.59147507 28 21.03351714 0 scal 356.5953751 30.49468267 28 11.69369030 0 Correlation: Asym xmid xmid 0.277 scal -0.193 0.665 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -1.8185023927 -0.5212094284 0.1743659167 0.5173856300 1.6451857866 Number of Observations: 35 Number of Groups: 5 > vc <- VarCorr(nfm, rdig = 5)# def. 3 > storage.mode(vc) <- "double" # -> (correct) NA warning Warning message: In storage.mode(vc) <- "double" : NAs introduced by coercion > cfO <- sO$tTable > if(FALSE) + dput(signif(cfO[,c("Std.Error", "t-value")], 8)) > if(FALSE) + dput(signif(as.numeric(vc[,"StdDev"]), 8)) > > cfO.Ts <- list( + stdE.T = cbind( + b64nx = ## R-devel 2016-01-11, 2017-09-18; [lynne]: + c(14.052671, 34.587947, 30.497593, 13.669776, 21.036087, 11.692943) + , b32nx = ## R-devel 2016-01-11, 2017-09-18 [florence, Fedora 24 Linux]: + c(14.053663, 34.589821, 30.49412, 13.668653, 21.034544, 11.693889) + , b32Win1 = ## R-devel 2017-09-17, i386-w64-mingw32/i386, + ## Windows Server 2008 R2 x64 (build 7601) Service Pack 1 + c(14.053047, 34.588589, 30.4963, 13.669349, 21.035542, 11.693282) + , b32Win = ## R-devel 2017-09-18, Tomas K (Win.10) + c(14.051902, 34.579819, 30.499807, 13.670797, 21.041722, 11.692694) + ), + stdDev = cbind( + b64nx = ## R-devel 2016-01-11; [lynne]: + c(27.051312, 24.258159, 36.597078, 7.321525) + , b32nx = ## R-devel 2017-09-18; [florence, Fedora 24 Linux]: + c(27.053964, 24.275286, 36.58682, 7.3213653) + , b32Win = ## R-devel 2017-09-17, i386-w64-mingw32/i386, W.Server 2008 R2.. + c(27.05234, 24.264936, 36.593554, 7.3214448) + ## for now + ) + ) > ## Average number of decimal digits agreement : > lapply(cfO.Ts, function(cc) round(-log10(apply(cc - rowMeans(cc), 1, sd)), 2)) $stdE.T [1] 3.13 2.34 2.62 3.05 2.49 3.29 $stdDev [1] 2.87 2.06 2.28 4.10 > ## $ stdE.T: num [1:6] 3.13 2.34 2.62 3.05 2.49 3.29 > ## $ stdDev: num [1:4] 2.87 2.06 2.28 4.1 > ## Pairwise distances (formatted, easier to read off): > round(dist(1000 * t(cfO.Ts[["stdE.T"]])), 1) b64nx b32nx b32Win1 b32nx 4.6 b32Win1 1.7 2.9 b32Win 10.2 13.9 11.5 > ## b64nx b32nx b32Win1 > ## b32nx 4.6 > ## b32Win1 1.7 2.9 > ## b32Win 10.2 13.9 11.5 > round(dist(1000 * t(cfO.Ts[["stdDev"]])), 1) b64nx b32nx b32nx 20.1 b32Win 7.7 12.5 > ## b64nx b32nx > ## b32nx 20.1 > ## b32Win 7.7 12.5 > > cName <- (if(is64bit) "b64nx" + else if(.Platform$OS.type == "Windows") { + if(grepl("Server 2008 R2", win.version(), fixed=TRUE)) + "b32Win1" + else + "b32Win" + } + else "b32nx" ## 32-bit, non-Windows + ) > > cfO.T <- array(cfO.Ts[["stdE.T"]][, cName], dim = 3:2, + dimnames = list(c("Asym", "xmid", "scal"), + c("Std.Error", "t-value"))) > vcSD <- setNames(cfO.Ts[["stdDev"]][, switch(cName, b64nx=, b32nx=, b32Win=cName, + b32Win1 = "b32Win")], + c("Asym", "xmid", "scal", "Residual")) > stopifnot( + identical(cfO[,"Value"], fixef(nfm)), + all.equal(cfO[,c("Std.Error", "t-value")], cfO.T, tol = 3e-4) + , + cfO[,"DF"] == 28, + all.equal(vc[,"Variance"], vc[,"StdDev"]^2, tol= 5e-7) + , + all.equal(vc[,"StdDev"], vcSD, tol = 6e-4) # 3.5e-4 (R 3.0.3, 32b) + , + all.equal(unname(vc[2:3, 3:4]), # "Corr" + rbind(c(-0.3273, NA), + c(-0.9920, 0.4430)), tol = 2e-3)# ~ 2e-4 / 8e-4 + ) > > ## Confirm predict(*, newdata=.) works > (n <- nrow(Orange)) # 35 [1] 35 > set.seed(17) > newOr <- within(Orange[sample(n, 64, replace=TRUE), ], + age <- round(jitter(age, amount = 50))) > fit.v <- predict(nfm, newdata = newOr) > resiv <- newOr$circumference - fit.v > res.T <- c(48, 115, 74, 15, 44, -94, 47, -51, 20, -52, -16, 12, -135, + -85, 136, 100, 24, 181, -88, -102, -26, 52, -148, 8, -83, 73, + -27, -34, 91, 42, 34, -8, 0, 83, 84, -90, -123, 94, -157, -11, + 56, -164, -28, 72, 15, 148, 95, -122, 169, 84, -19, -124, 45, + -66, -10, 119, -110, -43, 12, 94, -108, 45, 48, 46) > if(!all((res10 <- round(10 * as.vector(resiv))) == res.T)) { + iD <- which(res10 != res.T) + cat("Differing rounded residuals, at indices", paste(iD, collapse=", "), + "; with values:\n") + print(cbind(resiv, res10, res.T)[iD,]) + } Differing rounded residuals, at indices 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ; with values: resiv res10 res.T 5 -7.80634647061 -78 48 5 -9.88907220828 -99 115 4 5.45067557345 55 74 1 -1.17259856743 -12 15 3 3.50747913115 35 44 2 16.94485322159 169 -94 1 5.06751198184 51 47 5 -11.81714663447 -118 -51 3 4.41402966268 44 20 1 -12.27858610280 -123 -52 4 5.45116482301 55 -16 1 -0.47435810846 -5 12 3 -0.63373117990 -6 -135 3 2.42307640558 24 -85 3 -4.94408891227 -49 136 5 -0.01096450378 0 100 3 -9.67320461117 -97 24 2 2.35857448337 24 181 5 4.30092969223 43 -88 5 -6.36980282774 -64 -102 1 -2.88850937239 -29 -26 2 2.76784483120 28 52 4 -12.89030080459 -129 -148 5 0.96838786046 10 8 3 -10.75827562840 -108 -83 4 4.21832718565 42 73 5 2.42393323017 24 -27 1 -12.14163040182 -121 -34 2 3.88944117307 39 91 1 -12.14163040182 -121 42 4 -6.30145327818 -63 34 5 13.48823697249 135 -8 5 -2.85418041120 -29 0 3 0.64584879278 6 83 3 5.33136238817 53 84 2 12.77597259413 128 -90 2 -2.33566002387 -23 -123 2 6.50143816278 65 94 4 2.62582401801 26 -157 2 4.34275733612 43 -11 5 -5.50704999412 -55 56 2 9.07157696372 91 -164 2 -1.98638932503 -20 -28 3 -7.71529493574 -77 72 2 -2.18591982138 -22 15 3 6.98823468182 70 148 4 -0.75721156262 -8 95 1 0.47753923226 5 -122 3 8.12507227450 81 169 2 11.15258730031 112 84 1 2.25560800564 23 -19 5 1.62387553820 16 -124 3 -5.38628172214 -54 45 2 3.91547376144 39 -66 2 -9.73287946161 -97 -10 3 0.38183490294 4 119 1 6.26927533496 63 -110 5 -8.59811117733 -86 -43 2 -1.95818904880 -20 12 2 9.95492316270 100 94 5 -11.48961236738 -115 -108 5 14.84428929138 148 45 2 3.96819296597 40 48 1 2.34795440818 23 46 > ## -> indices 14 [64-bit] or 27 [32-bit], respectively > > > ## [Bug 16715] New: nlme: unable to use predict and augPredict .. > ## Date: 17 Feb 2016 -- part 2 -- predict(): > ## > ## Comment 4 daveauty@gmail.com 2016-03-08 -- modified by MM -- > > ## simulate density data then fit Michaelis-Menten equation of density as > ## function of ring age. TreeIDs grouped by SP (spacing) > set.seed(1) > df <- data.frame(SP = rep(LETTERS[1:5], 60), + expand.grid(TreeID = factor(1:12), + age = seq(2, 50, 2)), + stringsAsFactors = TRUE) > df[,"dens"] <- with(df, (runif(1,10,20)*age)/(runif(1,9,10)+age)) + rnorm(25, 0, 1) > str(df) 'data.frame': 300 obs. of 4 variables: $ SP : Factor w/ 5 levels "A","B","C","D",..: 1 2 3 4 5 1 2 3 4 5 ... $ TreeID: Factor w/ 12 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ... $ age : num 2 2 2 2 2 2 2 2 2 2 ... $ dens : num 2.41 1.39 3.82 2.56 1.41 ... > ## 'data.frame': 300 obs. of 4 variables: > ## $ SP : Factor w/ 5 levels "A","B","C","D",..: 1 2 3 4 5 1 2 3 4 5 ... > ## $ TreeID: Factor w/ 12 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ... > ## $ age : num 2 2 2 2 2 2 2 2 2 2 ... > ## $ dens : num 2.41 1.39 3.82 2.56 1.41 ... > > ## mixed-effects model > fit1 <- nlme(dens ~ a*age/(b+age), + fixed = a+b ~ 1, random= a ~ 1|TreeID, + start = c(a=15, b=5), data=df) > summary(fit1) Nonlinear mixed-effects model fit by maximum likelihood Model: dens ~ a * age/(b + age) Data: df AIC BIC logLik 808.4069212 823.2220511 -400.2034606 Random effects: Formula: a ~ 1 | TreeID a Residual StdDev: 2.772069114e-05 0.9185793399 Fixed effects: a + b ~ 1 Value Std.Error DF t-value p-value a 12.758125780 0.1914871881 287 66.62652426 0 b 8.921206214 0.4906380792 287 18.18286552 0 Correlation: a b 0.918 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.6420672769 -0.2833115760 0.2220191310 0.6630992085 1.6161028833 Number of Observations: 300 Number of Groups: 12 > fit1R <- update(fit1, method = "REML") > ## allow fixed effects parameters to vary by 'SP': > fit2 <- update(fit1, fixed = list(a ~ SP, b ~ SP), + start = c(a = rep(14, 5), b = rep(4, 5))) > summary(fit2) Nonlinear mixed-effects model fit by maximum likelihood Model: dens ~ a * age/(b + age) Data: df AIC BIC logLik 799.210016 843.6554057 -387.605008 Random effects: Formula: a ~ 1 | TreeID a.(Intercept) Residual StdDev: 2.877531804e-05 0.8808025132 Fixed effects: list(a ~ SP, b ~ SP) Value Std.Error DF t-value p-value a.(Intercept) 12.903085410 0.4091007732 279 31.540114945 0.0000 a.SPB -0.170084501 0.5947105414 279 -0.285995436 0.7751 a.SPC -0.643219803 0.5919816210 279 -1.086553671 0.2782 a.SPD 0.095662360 0.5731020545 279 0.166920288 0.8676 a.SPE -0.008338898 0.5812270667 279 -0.014347057 0.9886 b.(Intercept) 8.646804014 1.0165457785 279 8.506064554 0.0000 b.SPB 0.686459321 1.5205833172 279 0.451444727 0.6520 b.SPC 0.672297779 1.5446580479 279 0.435240525 0.6637 b.SPD -0.159835878 1.4178921721 279 -0.112727809 0.9103 b.SPE 0.221184123 1.4603631498 279 0.151458302 0.8797 Correlation: a.(In) a.SPB a.SPC a.SPD a.SPE b.(In) b.SPB b.SPC b.SPD a.SPB -0.688 a.SPC -0.691 0.475 a.SPD -0.714 0.491 0.493 a.SPE -0.704 0.484 0.486 0.502 b.(Intercept) 0.916 -0.630 -0.633 -0.654 -0.645 b.SPB -0.612 0.919 0.423 0.437 0.431 -0.669 b.SPC -0.603 0.415 0.918 0.430 0.424 -0.658 0.440 b.SPD -0.657 0.452 0.454 0.915 0.462 -0.717 0.479 0.472 b.SPE -0.637 0.438 0.441 0.455 0.917 -0.696 0.465 0.458 0.499 Standardized Within-Group Residuals: Min Q1 Med Q3 Max -2.39676503468 -0.45686320582 0.04081417646 0.74467663459 2.17580170105 Number of Observations: 300 Number of Groups: 12 > > ## make new data for predictions > newdat <- expand.grid(SP = LETTERS[1:5], age = seq(1, 50, 1)) > n.pred1 <- predict(fit1, newdat, level=0) # works fine > n.pred2 <- predict(fit2, newdat, level=0) > ## in nlme 3.1-124, throws the error: > ## Error in eval(expr, envir, enclos) : object 'SP' not found > > ## New data with never-yet observed levels of a random effect -- PR#16614 : > set.seed(47) > newD <- expand.grid(SP = LETTERS[2:4], age = runif(16, 1,50), + TreeID = sample(c(sample(1:12, 7), 100:102))) > n1prD0 <- predict(fit1, newD, level=0) > n2prD0 <- predict(fit2, newD, level=0) > n1prD1 <- predict(fit1, newD, level=1) # failed in nlme <= 3.1-126 > n2prD1 <- predict(fit2, newD, level=1) # ditto > (n1prD01 <- predict(fit1, newD, level=0:1))# " TreeID predict.fixed predict.TreeID 97 5 10.788697604 10.788697604 98 5 10.788697604 10.788697604 99 5 10.788697604 10.788697604 100 5 8.728189214 8.728189214 101 5 8.728189214 8.728189214 102 5 8.728189214 8.728189214 103 5 10.348507082 10.348507082 104 5 10.348507082 10.348507082 105 5 10.348507082 10.348507082 106 5 10.491889154 10.491889154 107 5 10.491889154 10.491889154 108 5 10.491889154 10.491889154 109 5 9.764878647 9.764878647 110 5 9.764878647 9.764878647 111 5 9.764878647 9.764878647 112 5 10.159568882 10.159568882 113 5 10.159568882 10.159568882 114 5 10.159568882 10.159568882 115 5 8.831372619 8.831372619 116 5 8.831372619 8.831372619 117 5 8.831372619 8.831372619 118 5 9.298569650 9.298569650 119 5 9.298569650 9.298569650 120 5 9.298569650 9.298569650 121 5 9.643529915 9.643529915 122 5 9.643529915 9.643529915 123 5 9.643529915 9.643529915 124 5 10.697735079 10.697735079 125 5 10.697735079 10.697735079 126 5 10.697735079 10.697735079 127 5 5.951768075 5.951768075 128 5 5.951768075 5.951768075 129 5 5.951768075 5.951768075 130 5 10.189950687 10.189950687 131 5 10.189950687 10.189950687 132 5 10.189950687 10.189950687 133 5 6.388445582 6.388445582 134 5 6.388445582 6.388445582 135 5 6.388445582 6.388445582 136 5 9.861056861 9.861056862 137 5 9.861056861 9.861056862 138 5 9.861056861 9.861056862 139 5 9.479675711 9.479675712 140 5 9.479675711 9.479675712 141 5 9.479675711 9.479675712 142 5 10.654979640 10.654979641 143 5 10.654979640 10.654979641 144 5 10.654979640 10.654979641 241 11 10.788697604 10.788697604 242 11 10.788697604 10.788697604 243 11 10.788697604 10.788697604 244 11 8.728189214 8.728189214 245 11 8.728189214 8.728189214 246 11 8.728189214 8.728189214 247 11 10.348507082 10.348507082 248 11 10.348507082 10.348507082 249 11 10.348507082 10.348507082 250 11 10.491889154 10.491889154 251 11 10.491889154 10.491889154 252 11 10.491889154 10.491889154 253 11 9.764878647 9.764878647 254 11 9.764878647 9.764878647 255 11 9.764878647 9.764878647 256 11 10.159568882 10.159568882 257 11 10.159568882 10.159568882 258 11 10.159568882 10.159568882 259 11 8.831372619 8.831372619 260 11 8.831372619 8.831372619 261 11 8.831372619 8.831372619 262 11 9.298569650 9.298569650 263 11 9.298569650 9.298569650 264 11 9.298569650 9.298569650 265 11 9.643529915 9.643529915 266 11 9.643529915 9.643529915 267 11 9.643529915 9.643529915 268 11 10.697735079 10.697735079 269 11 10.697735079 10.697735079 270 11 10.697735079 10.697735079 271 11 5.951768075 5.951768075 272 11 5.951768075 5.951768075 273 11 5.951768075 5.951768075 274 11 10.189950687 10.189950687 275 11 10.189950687 10.189950687 276 11 10.189950687 10.189950687 277 11 6.388445582 6.388445582 278 11 6.388445582 6.388445582 279 11 6.388445582 6.388445582 280 11 9.861056861 9.861056861 281 11 9.861056861 9.861056861 282 11 9.861056861 9.861056861 283 11 9.479675711 9.479675711 284 11 9.479675711 9.479675711 285 11 9.479675711 9.479675711 286 11 10.654979640 10.654979640 287 11 10.654979640 10.654979640 288 11 10.654979640 10.654979640 337 100 10.788697604 NA 338 100 10.788697604 NA 339 100 10.788697604 NA 340 100 8.728189214 NA 341 100 8.728189214 NA 342 100 8.728189214 NA 343 100 10.348507082 NA 344 100 10.348507082 NA 345 100 10.348507082 NA 346 100 10.491889154 NA 347 100 10.491889154 NA 348 100 10.491889154 NA 349 100 9.764878647 NA 350 100 9.764878647 NA 351 100 9.764878647 NA 352 100 10.159568882 NA 353 100 10.159568882 NA 354 100 10.159568882 NA 355 100 8.831372619 NA 356 100 8.831372619 NA 357 100 8.831372619 NA 358 100 9.298569650 NA 359 100 9.298569650 NA 360 100 9.298569650 NA 361 100 9.643529915 NA 362 100 9.643529915 NA 363 100 9.643529915 NA 364 100 10.697735079 NA 365 100 10.697735079 NA 366 100 10.697735079 NA 367 100 5.951768075 NA 368 100 5.951768075 NA 369 100 5.951768075 NA 370 100 10.189950687 NA 371 100 10.189950687 NA 372 100 10.189950687 NA 373 100 6.388445582 NA 374 100 6.388445582 NA 375 100 6.388445582 NA 376 100 9.861056861 NA 377 100 9.861056861 NA 378 100 9.861056861 NA 379 100 9.479675711 NA 380 100 9.479675711 NA 381 100 9.479675711 NA 382 100 10.654979640 NA 383 100 10.654979640 NA 384 100 10.654979640 NA 49 4 10.788697604 10.788697604 50 4 10.788697604 10.788697604 51 4 10.788697604 10.788697604 52 4 8.728189214 8.728189214 53 4 8.728189214 8.728189214 54 4 8.728189214 8.728189214 55 4 10.348507082 10.348507082 56 4 10.348507082 10.348507082 57 4 10.348507082 10.348507082 58 4 10.491889154 10.491889154 59 4 10.491889154 10.491889154 60 4 10.491889154 10.491889154 61 4 9.764878647 9.764878647 62 4 9.764878647 9.764878647 63 4 9.764878647 9.764878647 64 4 10.159568882 10.159568882 65 4 10.159568882 10.159568882 66 4 10.159568882 10.159568882 67 4 8.831372619 8.831372619 68 4 8.831372619 8.831372619 69 4 8.831372619 8.831372619 70 4 9.298569650 9.298569650 71 4 9.298569650 9.298569650 72 4 9.298569650 9.298569650 73 4 9.643529915 9.643529915 74 4 9.643529915 9.643529915 75 4 9.643529915 9.643529915 76 4 10.697735079 10.697735079 77 4 10.697735079 10.697735079 78 4 10.697735079 10.697735079 79 4 5.951768075 5.951768075 80 4 5.951768075 5.951768075 81 4 5.951768075 5.951768075 82 4 10.189950687 10.189950687 83 4 10.189950687 10.189950687 84 4 10.189950687 10.189950687 85 4 6.388445582 6.388445582 86 4 6.388445582 6.388445582 87 4 6.388445582 6.388445582 88 4 9.861056861 9.861056861 89 4 9.861056861 9.861056861 90 4 9.861056861 9.861056861 91 4 9.479675711 9.479675712 92 4 9.479675711 9.479675712 93 4 9.479675711 9.479675712 94 4 10.654979640 10.654979641 95 4 10.654979640 10.654979641 96 4 10.654979640 10.654979641 1 2 10.788697604 10.788697605 2 2 10.788697604 10.788697605 3 2 10.788697604 10.788697605 4 2 8.728189214 8.728189215 5 2 8.728189214 8.728189215 6 2 8.728189214 8.728189215 7 2 10.348507082 10.348507083 8 2 10.348507082 10.348507083 9 2 10.348507082 10.348507083 10 2 10.491889154 10.491889155 11 2 10.491889154 10.491889155 12 2 10.491889154 10.491889155 13 2 9.764878647 9.764878648 14 2 9.764878647 9.764878648 15 2 9.764878647 9.764878648 16 2 10.159568882 10.159568882 17 2 10.159568882 10.159568882 18 2 10.159568882 10.159568882 19 2 8.831372619 8.831372620 20 2 8.831372619 8.831372620 21 2 8.831372619 8.831372620 22 2 9.298569650 9.298569651 23 2 9.298569650 9.298569651 24 2 9.298569650 9.298569651 25 2 9.643529915 9.643529916 26 2 9.643529915 9.643529916 27 2 9.643529915 9.643529916 28 2 10.697735079 10.697735080 29 2 10.697735079 10.697735080 30 2 10.697735079 10.697735080 31 2 5.951768075 5.951768076 32 2 5.951768075 5.951768076 33 2 5.951768075 5.951768076 34 2 10.189950687 10.189950688 35 2 10.189950687 10.189950688 36 2 10.189950687 10.189950688 37 2 6.388445582 6.388445582 38 2 6.388445582 6.388445582 39 2 6.388445582 6.388445582 40 2 9.861056861 9.861056862 41 2 9.861056861 9.861056862 42 2 9.861056861 9.861056862 43 2 9.479675711 9.479675712 44 2 9.479675711 9.479675712 45 2 9.479675711 9.479675712 46 2 10.654979640 10.654979641 47 2 10.654979640 10.654979641 48 2 10.654979640 10.654979641 289 12 10.788697604 10.788697604 290 12 10.788697604 10.788697604 291 12 10.788697604 10.788697604 292 12 8.728189214 8.728189214 293 12 8.728189214 8.728189214 294 12 8.728189214 8.728189214 295 12 10.348507082 10.348507082 296 12 10.348507082 10.348507082 297 12 10.348507082 10.348507082 298 12 10.491889154 10.491889154 299 12 10.491889154 10.491889154 300 12 10.491889154 10.491889154 301 12 9.764878647 9.764878647 302 12 9.764878647 9.764878647 303 12 9.764878647 9.764878647 304 12 10.159568882 10.159568882 305 12 10.159568882 10.159568882 306 12 10.159568882 10.159568882 307 12 8.831372619 8.831372619 308 12 8.831372619 8.831372619 309 12 8.831372619 8.831372619 310 12 9.298569650 9.298569650 311 12 9.298569650 9.298569650 312 12 9.298569650 9.298569650 313 12 9.643529915 9.643529915 314 12 9.643529915 9.643529915 315 12 9.643529915 9.643529915 316 12 10.697735079 10.697735079 317 12 10.697735079 10.697735079 318 12 10.697735079 10.697735079 319 12 5.951768075 5.951768075 320 12 5.951768075 5.951768075 321 12 5.951768075 5.951768075 322 12 10.189950687 10.189950687 323 12 10.189950687 10.189950687 324 12 10.189950687 10.189950687 325 12 6.388445582 6.388445582 326 12 6.388445582 6.388445582 327 12 6.388445582 6.388445582 328 12 9.861056861 9.861056861 329 12 9.861056861 9.861056861 330 12 9.861056861 9.861056861 331 12 9.479675711 9.479675712 332 12 9.479675711 9.479675712 333 12 9.479675711 9.479675712 334 12 10.654979640 10.654979641 335 12 10.654979640 10.654979641 336 12 10.654979640 10.654979641 145 8 10.788697604 10.788697603 146 8 10.788697604 10.788697603 147 8 10.788697604 10.788697603 148 8 8.728189214 8.728189213 149 8 8.728189214 8.728189213 150 8 8.728189214 8.728189213 151 8 10.348507082 10.348507081 152 8 10.348507082 10.348507081 153 8 10.348507082 10.348507081 154 8 10.491889154 10.491889153 155 8 10.491889154 10.491889153 156 8 10.491889154 10.491889153 157 8 9.764878647 9.764878646 158 8 9.764878647 9.764878646 159 8 9.764878647 9.764878646 160 8 10.159568882 10.159568881 161 8 10.159568882 10.159568881 162 8 10.159568882 10.159568881 163 8 8.831372619 8.831372618 164 8 8.831372619 8.831372618 165 8 8.831372619 8.831372618 166 8 9.298569650 9.298569649 167 8 9.298569650 9.298569649 168 8 9.298569650 9.298569649 169 8 9.643529915 9.643529914 170 8 9.643529915 9.643529914 171 8 9.643529915 9.643529914 172 8 10.697735079 10.697735078 173 8 10.697735079 10.697735078 174 8 10.697735079 10.697735078 175 8 5.951768075 5.951768075 176 8 5.951768075 5.951768075 177 8 5.951768075 5.951768075 178 8 10.189950687 10.189950686 179 8 10.189950687 10.189950686 180 8 10.189950687 10.189950686 181 8 6.388445582 6.388445581 182 8 6.388445582 6.388445581 183 8 6.388445582 6.388445581 184 8 9.861056861 9.861056861 185 8 9.861056861 9.861056861 186 8 9.861056861 9.861056861 187 8 9.479675711 9.479675711 188 8 9.479675711 9.479675711 189 8 9.479675711 9.479675711 190 8 10.654979640 10.654979640 191 8 10.654979640 10.654979640 192 8 10.654979640 10.654979640 433 102 10.788697604 NA 434 102 10.788697604 NA 435 102 10.788697604 NA 436 102 8.728189214 NA 437 102 8.728189214 NA 438 102 8.728189214 NA 439 102 10.348507082 NA 440 102 10.348507082 NA 441 102 10.348507082 NA 442 102 10.491889154 NA 443 102 10.491889154 NA 444 102 10.491889154 NA 445 102 9.764878647 NA 446 102 9.764878647 NA 447 102 9.764878647 NA 448 102 10.159568882 NA 449 102 10.159568882 NA 450 102 10.159568882 NA 451 102 8.831372619 NA 452 102 8.831372619 NA 453 102 8.831372619 NA 454 102 9.298569650 NA 455 102 9.298569650 NA 456 102 9.298569650 NA 457 102 9.643529915 NA 458 102 9.643529915 NA 459 102 9.643529915 NA 460 102 10.697735079 NA 461 102 10.697735079 NA 462 102 10.697735079 NA 463 102 5.951768075 NA 464 102 5.951768075 NA 465 102 5.951768075 NA 466 102 10.189950687 NA 467 102 10.189950687 NA 468 102 10.189950687 NA 469 102 6.388445582 NA 470 102 6.388445582 NA 471 102 6.388445582 NA 472 102 9.861056861 NA 473 102 9.861056861 NA 474 102 9.861056861 NA 475 102 9.479675711 NA 476 102 9.479675711 NA 477 102 9.479675711 NA 478 102 10.654979640 NA 479 102 10.654979640 NA 480 102 10.654979640 NA 385 101 10.788697604 NA 386 101 10.788697604 NA 387 101 10.788697604 NA 388 101 8.728189214 NA 389 101 8.728189214 NA 390 101 8.728189214 NA 391 101 10.348507082 NA 392 101 10.348507082 NA 393 101 10.348507082 NA 394 101 10.491889154 NA 395 101 10.491889154 NA 396 101 10.491889154 NA 397 101 9.764878647 NA 398 101 9.764878647 NA 399 101 9.764878647 NA 400 101 10.159568882 NA 401 101 10.159568882 NA 402 101 10.159568882 NA 403 101 8.831372619 NA 404 101 8.831372619 NA 405 101 8.831372619 NA 406 101 9.298569650 NA 407 101 9.298569650 NA 408 101 9.298569650 NA 409 101 9.643529915 NA 410 101 9.643529915 NA 411 101 9.643529915 NA 412 101 10.697735079 NA 413 101 10.697735079 NA 414 101 10.697735079 NA 415 101 5.951768075 NA 416 101 5.951768075 NA 417 101 5.951768075 NA 418 101 10.189950687 NA 419 101 10.189950687 NA 420 101 10.189950687 NA 421 101 6.388445582 NA 422 101 6.388445582 NA 423 101 6.388445582 NA 424 101 9.861056861 NA 425 101 9.861056861 NA 426 101 9.861056861 NA 427 101 9.479675711 NA 428 101 9.479675711 NA 429 101 9.479675711 NA 430 101 10.654979640 NA 431 101 10.654979640 NA 432 101 10.654979640 NA 193 9 10.788697604 10.788697603 194 9 10.788697604 10.788697603 195 9 10.788697604 10.788697603 196 9 8.728189214 8.728189214 197 9 8.728189214 8.728189214 198 9 8.728189214 8.728189214 199 9 10.348507082 10.348507081 200 9 10.348507082 10.348507081 201 9 10.348507082 10.348507081 202 9 10.491889154 10.491889153 203 9 10.491889154 10.491889153 204 9 10.491889154 10.491889153 205 9 9.764878647 9.764878646 206 9 9.764878647 9.764878646 207 9 9.764878647 9.764878646 208 9 10.159568882 10.159568881 209 9 10.159568882 10.159568881 210 9 10.159568882 10.159568881 211 9 8.831372619 8.831372619 212 9 8.831372619 8.831372619 213 9 8.831372619 8.831372619 214 9 9.298569650 9.298569649 215 9 9.298569650 9.298569649 216 9 9.298569650 9.298569649 217 9 9.643529915 9.643529914 218 9 9.643529915 9.643529914 219 9 9.643529915 9.643529914 220 9 10.697735079 10.697735078 221 9 10.697735079 10.697735078 222 9 10.697735079 10.697735078 223 9 5.951768075 5.951768075 224 9 5.951768075 5.951768075 225 9 5.951768075 5.951768075 226 9 10.189950687 10.189950686 227 9 10.189950687 10.189950686 228 9 10.189950687 10.189950686 229 9 6.388445582 6.388445582 230 9 6.388445582 6.388445582 231 9 6.388445582 6.388445582 232 9 9.861056861 9.861056861 233 9 9.861056861 9.861056861 234 9 9.861056861 9.861056861 235 9 9.479675711 9.479675711 236 9 9.479675711 9.479675711 237 9 9.479675711 9.479675711 238 9 10.654979640 10.654979640 239 9 10.654979640 10.654979640 240 9 10.654979640 10.654979640 > (n2prD01 <- predict(fit2, newD, level=0:1))# " TreeID predict.fixed predict.TreeID 97 5 10.691223176 10.691223177 98 5 10.296461846 10.296461846 99 5 11.075393502 11.075393503 100 5 8.585737596 8.585737597 101 5 8.270794578 8.270794579 102 5 9.031667477 9.031667477 103 5 10.238808353 10.238808353 104 5 9.861283697 9.861283697 105 5 10.641512296 10.641512297 106 5 10.386015153 10.386015154 107 5 10.002887177 10.002887178 108 5 10.783000684 10.783000684 109 5 9.641171767 9.641171767 110 5 9.286344669 9.286344669 111 5 10.063976116 10.063976117 112 5 10.045061412 10.045061412 113 5 9.674904018 9.674904018 114 5 10.454830700 10.454830701 115 5 8.690436649 8.690436649 116 5 8.371548550 8.371548550 117 5 9.134786356 9.134786356 118 5 9.165463083 9.165463083 119 5 8.828644300 8.828644301 120 5 9.600661595 9.600661596 121 5 9.517224052 9.517224052 122 5 9.167094090 9.167094090 123 5 9.943567233 9.943567233 124 5 10.597617254 10.597617255 125 5 10.206426092 10.206426093 126 5 10.985855162 10.985855163 127 5 5.797197263 5.797197263 128 5 5.586401051 5.586401052 129 5 6.225686450 6.225686450 130 5 10.076198757 10.076198758 131 5 9.704857941 9.704857941 132 5 10.484867976 10.484867976 133 5 6.232149549 6.232149549 134 5 6.005226200 6.005226201 135 5 6.671050823 6.671050823 136 5 9.739486436 9.739486437 137 5 9.380931089 9.380931089 138 5 10.159329342 10.159329342 139 5 9.350031286 9.350031286 140 5 9.006231697 9.006231697 141 5 9.780802933 9.780802934 142 5 10.553640469 10.553640470 143 5 10.164125906 10.164125906 144 5 10.943747494 10.943747495 241 11 10.691223176 10.691223176 242 11 10.296461846 10.296461846 243 11 11.075393502 11.075393502 244 11 8.585737596 8.585737596 245 11 8.270794578 8.270794578 246 11 9.031667477 9.031667477 247 11 10.238808353 10.238808353 248 11 9.861283697 9.861283697 249 11 10.641512296 10.641512296 250 11 10.386015153 10.386015153 251 11 10.002887177 10.002887177 252 11 10.783000684 10.783000684 253 11 9.641171767 9.641171767 254 11 9.286344669 9.286344669 255 11 10.063976116 10.063976116 256 11 10.045061412 10.045061412 257 11 9.674904018 9.674904018 258 11 10.454830700 10.454830700 259 11 8.690436649 8.690436649 260 11 8.371548550 8.371548550 261 11 9.134786356 9.134786356 262 11 9.165463083 9.165463083 263 11 8.828644300 8.828644300 264 11 9.600661595 9.600661595 265 11 9.517224052 9.517224051 266 11 9.167094090 9.167094090 267 11 9.943567233 9.943567233 268 11 10.597617254 10.597617254 269 11 10.206426092 10.206426092 270 11 10.985855162 10.985855162 271 11 5.797197263 5.797197262 272 11 5.586401051 5.586401051 273 11 6.225686450 6.225686450 274 11 10.076198757 10.076198757 275 11 9.704857941 9.704857941 276 11 10.484867976 10.484867976 277 11 6.232149549 6.232149549 278 11 6.005226200 6.005226200 279 11 6.671050823 6.671050823 280 11 9.739486436 9.739486436 281 11 9.380931089 9.380931089 282 11 10.159329342 10.159329342 283 11 9.350031286 9.350031286 284 11 9.006231697 9.006231697 285 11 9.780802933 9.780802933 286 11 10.553640469 10.553640469 287 11 10.164125906 10.164125906 288 11 10.943747494 10.943747494 337 100 10.691223176 NA 338 100 10.296461846 NA 339 100 11.075393502 NA 340 100 8.585737596 NA 341 100 8.270794578 NA 342 100 9.031667477 NA 343 100 10.238808353 NA 344 100 9.861283697 NA 345 100 10.641512296 NA 346 100 10.386015153 NA 347 100 10.002887177 NA 348 100 10.783000684 NA 349 100 9.641171767 NA 350 100 9.286344669 NA 351 100 10.063976116 NA 352 100 10.045061412 NA 353 100 9.674904018 NA 354 100 10.454830700 NA 355 100 8.690436649 NA 356 100 8.371548550 NA 357 100 9.134786356 NA 358 100 9.165463083 NA 359 100 8.828644300 NA 360 100 9.600661595 NA 361 100 9.517224052 NA 362 100 9.167094090 NA 363 100 9.943567233 NA 364 100 10.597617254 NA 365 100 10.206426092 NA 366 100 10.985855162 NA 367 100 5.797197263 NA 368 100 5.586401051 NA 369 100 6.225686450 NA 370 100 10.076198757 NA 371 100 9.704857941 NA 372 100 10.484867976 NA 373 100 6.232149549 NA 374 100 6.005226200 NA 375 100 6.671050823 NA 376 100 9.739486436 NA 377 100 9.380931089 NA 378 100 10.159329342 NA 379 100 9.350031286 NA 380 100 9.006231697 NA 381 100 9.780802933 NA 382 100 10.553640469 NA 383 100 10.164125906 NA 384 100 10.943747494 NA 49 4 10.691223176 10.691223176 50 4 10.296461846 10.296461846 51 4 11.075393502 11.075393503 52 4 8.585737596 8.585737596 53 4 8.270794578 8.270794578 54 4 9.031667477 9.031667477 55 4 10.238808353 10.238808353 56 4 9.861283697 9.861283697 57 4 10.641512296 10.641512297 58 4 10.386015153 10.386015154 59 4 10.002887177 10.002887177 60 4 10.783000684 10.783000684 61 4 9.641171767 9.641171767 62 4 9.286344669 9.286344669 63 4 10.063976116 10.063976117 64 4 10.045061412 10.045061412 65 4 9.674904018 9.674904018 66 4 10.454830700 10.454830701 67 4 8.690436649 8.690436649 68 4 8.371548550 8.371548550 69 4 9.134786356 9.134786356 70 4 9.165463083 9.165463083 71 4 8.828644300 8.828644301 72 4 9.600661595 9.600661596 73 4 9.517224052 9.517224052 74 4 9.167094090 9.167094090 75 4 9.943567233 9.943567233 76 4 10.597617254 10.597617255 77 4 10.206426092 10.206426092 78 4 10.985855162 10.985855163 79 4 5.797197263 5.797197263 80 4 5.586401051 5.586401052 81 4 6.225686450 6.225686450 82 4 10.076198757 10.076198757 83 4 9.704857941 9.704857941 84 4 10.484867976 10.484867976 85 4 6.232149549 6.232149549 86 4 6.005226200 6.005226201 87 4 6.671050823 6.671050823 88 4 9.739486436 9.739486437 89 4 9.380931089 9.380931089 90 4 10.159329342 10.159329342 91 4 9.350031286 9.350031286 92 4 9.006231697 9.006231697 93 4 9.780802933 9.780802934 94 4 10.553640469 10.553640469 95 4 10.164125906 10.164125906 96 4 10.943747494 10.943747494 1 2 10.691223176 10.691223177 2 2 10.296461846 10.296461847 3 2 11.075393502 11.075393503 4 2 8.585737596 8.585737597 5 2 8.270794578 8.270794579 6 2 9.031667477 9.031667478 7 2 10.238808353 10.238808354 8 2 9.861283697 9.861283698 9 2 10.641512296 10.641512298 10 2 10.386015153 10.386015154 11 2 10.002887177 10.002887178 12 2 10.783000684 10.783000685 13 2 9.641171767 9.641171768 14 2 9.286344669 9.286344670 15 2 10.063976116 10.063976117 16 2 10.045061412 10.045061413 17 2 9.674904018 9.674904019 18 2 10.454830700 10.454830701 19 2 8.690436649 8.690436650 20 2 8.371548550 8.371548551 21 2 9.134786356 9.134786357 22 2 9.165463083 9.165463084 23 2 8.828644300 8.828644301 24 2 9.600661595 9.600661597 25 2 9.517224052 9.517224053 26 2 9.167094090 9.167094091 27 2 9.943567233 9.943567234 28 2 10.597617254 10.597617255 29 2 10.206426092 10.206426093 30 2 10.985855162 10.985855164 31 2 5.797197263 5.797197263 32 2 5.586401051 5.586401052 33 2 6.225686450 6.225686451 34 2 10.076198757 10.076198758 35 2 9.704857941 9.704857942 36 2 10.484867976 10.484867977 37 2 6.232149549 6.232149550 38 2 6.005226200 6.005226201 39 2 6.671050823 6.671050823 40 2 9.739486436 9.739486438 41 2 9.380931089 9.380931090 42 2 10.159329342 10.159329343 43 2 9.350031286 9.350031287 44 2 9.006231697 9.006231698 45 2 9.780802933 9.780802935 46 2 10.553640469 10.553640470 47 2 10.164125906 10.164125907 48 2 10.943747494 10.943747495 289 12 10.691223176 10.691223176 290 12 10.296461846 10.296461846 291 12 11.075393502 11.075393503 292 12 8.585737596 8.585737596 293 12 8.270794578 8.270794578 294 12 9.031667477 9.031667477 295 12 10.238808353 10.238808353 296 12 9.861283697 9.861283697 297 12 10.641512296 10.641512297 298 12 10.386015153 10.386015154 299 12 10.002887177 10.002887177 300 12 10.783000684 10.783000684 301 12 9.641171767 9.641171767 302 12 9.286344669 9.286344669 303 12 10.063976116 10.063976117 304 12 10.045061412 10.045061412 305 12 9.674904018 9.674904018 306 12 10.454830700 10.454830700 307 12 8.690436649 8.690436649 308 12 8.371548550 8.371548550 309 12 9.134786356 9.134786356 310 12 9.165463083 9.165463083 311 12 8.828644300 8.828644301 312 12 9.600661595 9.600661596 313 12 9.517224052 9.517224052 314 12 9.167094090 9.167094090 315 12 9.943567233 9.943567233 316 12 10.597617254 10.597617255 317 12 10.206426092 10.206426092 318 12 10.985855162 10.985855163 319 12 5.797197263 5.797197263 320 12 5.586401051 5.586401052 321 12 6.225686450 6.225686450 322 12 10.076198757 10.076198757 323 12 9.704857941 9.704857941 324 12 10.484867976 10.484867976 325 12 6.232149549 6.232149549 326 12 6.005226200 6.005226201 327 12 6.671050823 6.671050823 328 12 9.739486436 9.739486437 329 12 9.380931089 9.380931089 330 12 10.159329342 10.159329342 331 12 9.350031286 9.350031286 332 12 9.006231697 9.006231697 333 12 9.780802933 9.780802934 334 12 10.553640469 10.553640469 335 12 10.164125906 10.164125906 336 12 10.943747494 10.943747494 145 8 10.691223176 10.691223175 146 8 10.296461846 10.296461845 147 8 11.075393502 11.075393501 148 8 8.585737596 8.585737595 149 8 8.270794578 8.270794577 150 8 9.031667477 9.031667476 151 8 10.238808353 10.238808352 152 8 9.861283697 9.861283696 153 8 10.641512296 10.641512295 154 8 10.386015153 10.386015152 155 8 10.002887177 10.002887176 156 8 10.783000684 10.783000682 157 8 9.641171767 9.641171766 158 8 9.286344669 9.286344668 159 8 10.063976116 10.063976115 160 8 10.045061412 10.045061411 161 8 9.674904018 9.674904017 162 8 10.454830700 10.454830699 163 8 8.690436649 8.690436648 164 8 8.371548550 8.371548549 165 8 9.134786356 9.134786355 166 8 9.165463083 9.165463082 167 8 8.828644300 8.828644299 168 8 9.600661595 9.600661594 169 8 9.517224052 9.517224050 170 8 9.167094090 9.167094089 171 8 9.943567233 9.943567232 172 8 10.597617254 10.597617253 173 8 10.206426092 10.206426091 174 8 10.985855162 10.985855161 175 8 5.797197263 5.797197262 176 8 5.586401051 5.586401051 177 8 6.225686450 6.225686449 178 8 10.076198757 10.076198756 179 8 9.704857941 9.704857939 180 8 10.484867976 10.484867975 181 8 6.232149549 6.232149548 182 8 6.005226200 6.005226200 183 8 6.671050823 6.671050822 184 8 9.739486436 9.739486435 185 8 9.380931089 9.380931088 186 8 10.159329342 10.159329341 187 8 9.350031286 9.350031285 188 8 9.006231697 9.006231695 189 8 9.780802933 9.780802932 190 8 10.553640469 10.553640468 191 8 10.164125906 10.164125905 192 8 10.943747494 10.943747493 433 102 10.691223176 NA 434 102 10.296461846 NA 435 102 11.075393502 NA 436 102 8.585737596 NA 437 102 8.270794578 NA 438 102 9.031667477 NA 439 102 10.238808353 NA 440 102 9.861283697 NA 441 102 10.641512296 NA 442 102 10.386015153 NA 443 102 10.002887177 NA 444 102 10.783000684 NA 445 102 9.641171767 NA 446 102 9.286344669 NA 447 102 10.063976116 NA 448 102 10.045061412 NA 449 102 9.674904018 NA 450 102 10.454830700 NA 451 102 8.690436649 NA 452 102 8.371548550 NA 453 102 9.134786356 NA 454 102 9.165463083 NA 455 102 8.828644300 NA 456 102 9.600661595 NA 457 102 9.517224052 NA 458 102 9.167094090 NA 459 102 9.943567233 NA 460 102 10.597617254 NA 461 102 10.206426092 NA 462 102 10.985855162 NA 463 102 5.797197263 NA 464 102 5.586401051 NA 465 102 6.225686450 NA 466 102 10.076198757 NA 467 102 9.704857941 NA 468 102 10.484867976 NA 469 102 6.232149549 NA 470 102 6.005226200 NA 471 102 6.671050823 NA 472 102 9.739486436 NA 473 102 9.380931089 NA 474 102 10.159329342 NA 475 102 9.350031286 NA 476 102 9.006231697 NA 477 102 9.780802933 NA 478 102 10.553640469 NA 479 102 10.164125906 NA 480 102 10.943747494 NA 385 101 10.691223176 NA 386 101 10.296461846 NA 387 101 11.075393502 NA 388 101 8.585737596 NA 389 101 8.270794578 NA 390 101 9.031667477 NA 391 101 10.238808353 NA 392 101 9.861283697 NA 393 101 10.641512296 NA 394 101 10.386015153 NA 395 101 10.002887177 NA 396 101 10.783000684 NA 397 101 9.641171767 NA 398 101 9.286344669 NA 399 101 10.063976116 NA 400 101 10.045061412 NA 401 101 9.674904018 NA 402 101 10.454830700 NA 403 101 8.690436649 NA 404 101 8.371548550 NA 405 101 9.134786356 NA 406 101 9.165463083 NA 407 101 8.828644300 NA 408 101 9.600661595 NA 409 101 9.517224052 NA 410 101 9.167094090 NA 411 101 9.943567233 NA 412 101 10.597617254 NA 413 101 10.206426092 NA 414 101 10.985855162 NA 415 101 5.797197263 NA 416 101 5.586401051 NA 417 101 6.225686450 NA 418 101 10.076198757 NA 419 101 9.704857941 NA 420 101 10.484867976 NA 421 101 6.232149549 NA 422 101 6.005226200 NA 423 101 6.671050823 NA 424 101 9.739486436 NA 425 101 9.380931089 NA 426 101 10.159329342 NA 427 101 9.350031286 NA 428 101 9.006231697 NA 429 101 9.780802933 NA 430 101 10.553640469 NA 431 101 10.164125906 NA 432 101 10.943747494 NA 193 9 10.691223176 10.691223175 194 9 10.296461846 10.296461845 195 9 11.075393502 11.075393502 196 9 8.585737596 8.585737596 197 9 8.270794578 8.270794578 198 9 9.031667477 9.031667477 199 9 10.238808353 10.238808352 200 9 9.861283697 9.861283696 201 9 10.641512296 10.641512296 202 9 10.386015153 10.386015153 203 9 10.002887177 10.002887176 204 9 10.783000684 10.783000683 205 9 9.641171767 9.641171766 206 9 9.286344669 9.286344668 207 9 10.063976116 10.063976116 208 9 10.045061412 10.045061411 209 9 9.674904018 9.674904017 210 9 10.454830700 10.454830700 211 9 8.690436649 8.690436648 212 9 8.371548550 8.371548549 213 9 9.134786356 9.134786356 214 9 9.165463083 9.165463082 215 9 8.828644300 8.828644300 216 9 9.600661595 9.600661595 217 9 9.517224052 9.517224051 218 9 9.167094090 9.167094089 219 9 9.943567233 9.943567232 220 9 10.597617254 10.597617254 221 9 10.206426092 10.206426092 222 9 10.985855162 10.985855162 223 9 5.797197263 5.797197262 224 9 5.586401051 5.586401051 225 9 6.225686450 6.225686449 226 9 10.076198757 10.076198757 227 9 9.704857941 9.704857940 228 9 10.484867976 10.484867975 229 9 6.232149549 6.232149549 230 9 6.005226200 6.005226200 231 9 6.671050823 6.671050822 232 9 9.739486436 9.739486436 233 9 9.380931089 9.380931088 234 9 10.159329342 10.159329341 235 9 9.350031286 9.350031285 236 9 9.006231697 9.006231696 237 9 9.780802933 9.780802933 238 9 10.553640469 10.553640468 239 9 10.164125906 10.164125905 240 9 10.943747494 10.943747494 > ## consistency : > stopifnot( + identical(is.na(n1prD1), is.na(n2prD1)), + identical(sort(unique(newD[is.na(n2prD1), "TreeID"])), 100:102), + sort(unique( newD[is.na(n2prD1), "TreeID"] )) %in% 100:102 , + all.equal(as.vector(n1prD0), n1prD01[,"predict.fixed"], tolerance= 1e-15), + all.equal(as.vector(n2prD0), n2prD01[,"predict.fixed"], tolerance= 1e-15), + all.equal(as.vector(n1prD1), n1prD01[,"predict.TreeID"],tolerance= 1e-15), + all.equal(as.vector(n2prD1), n2prD01[,"predict.TreeID"],tolerance= 1e-15)) > > ## new data with factor levels stored as character > stopifnot(all.equal(predict(fit2, data.frame(SP="A", age=2), level = 0), + predict(fit2, level = 0)[1], check.attributes = FALSE)) > ## in nlme <= 3.1-155, failed with > ## Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) : > ## contrasts can be applied only to factors with 2 or more levels > > ## model without intercept > fit3 <- update(fit2, fixed = a + b ~ SP - 1) > stopifnot(all.equal(predict(fit3, head(df, 3)), + head(predict(fit3), 3), check.attributes = FALSE)) > ## in nlme <= 3.1-155, prediction failed if not all levels occurred > ## Error in f %*% beta[fmap[[nm]]] : non-conformable arguments > > proc.time() user system elapsed 0.73 0.01 0.75