Running ‘test_scripts.R’ [369s/369s]
Running the tests in ‘tests/test_scripts.R’ failed.
Complete output:
  > ## Note: R CMD check may run these scripts from an installed package
  > scripts <- list.files(system.file("scripts", package = "sm"), ".*\\.q$")
  > ## these are interactive
  > omit2 <- match(c("bissell3.q", "dogs.q"), scripts)
  > scripts <- scripts[-omit2]
  > library(sm)
  Package 'sm', version 2.2-5.4: type help(sm) for summary information
  > if(.Platform$OS.type == "unix") options(pager="cat") else options(pager="console")
  > postscript(file="test_scripts.ps")
  > for(z in scripts) {
  +     cat("\n============ running script `", z, "' ============\n", sep="")
  +     set.seed(123)
  +     source(system.file("scripts", z, package = "sm"), echo=TRUE)
  +     rm(list = ls(all = TRUE))
  + }
  
  ============ running script `air_band.q' ============
  
  > with(aircraft, {
  +     y <- log(Span)[Period == 3]
  +     sm.density(y, xlab = "Log span", display = "se")
  + })
  
  ============ running script `air_boot.q' ============
  
  > with(aircraft, {
  +     y <- log(Span)[Period == 3]
  +     sm.density(y, xlab = "Log span")
  +     for (i in 1:20) sm.density(sample(y, replace = TRUE) .... [TRUNCATED] 
  
  ============ running script `air_cont.q' ============
  
  > with(airpc, {
  +     pc <- cbind(Comp.1, Comp.2)
  +     pc1 <- pc[Period == 1, ]
  +     pc2 <- pc[Period == 2, ]
  +     pc3 <- pc[Period == 3, ]
  +     p .... [TRUNCATED] 
  Loading required package: rgl
  Loading required package: rpanel
  Loading required package: tcltk
  Package `rpanel', version 1.1-3: type help(rpanel) for summary information
  
  ============ running script `air_dens.q' ============
  
  > with(airpc, {
  +     pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ]
  +     par(mfrow = c(2, 2))
  +     par(cex = 0.6)
  +     plot(pc3)
  +     sm.density(pc3 .... [TRUNCATED] 
  
  ============ running script `air_hcv.q' ============
  
  > with(aircraft, {
  +     y <- log(Span)[Period == 3]
  +     par(mfrow = c(1, 2))
  +     sm.density(y, h = hcv(y), xlab = "Log span", lty = 3, yht = 1.4) .... [TRUNCATED] 
  
  ============ running script `air_imag.q' ============
  
  > with(airpc, {
  +     pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ]
  +     par(mfrow = c(1, 2))
  +     sm.density(pc3, display = "image")
  +     sm.density .... [TRUNCATED] 
  
  ============ running script `air_ind.q' ============
  
  > with(aircraft, {
  +     Speed3 <- log(Speed[Period == 3])
  +     Span3 <- log(Span[Period == 3])
  +     par(mfrow = c(1, 2))
  +     plot(Span3, Speed3,  .... [TRUNCATED] 
  
  ============ running script `air_inds.q' ============
  
  > with(aircraft, {
  +     Speed3 <- log(Speed[Period == 3])
  +     Span3 <- log(Span[Period == 3])
  +     air3 <- cbind(Span3, Speed3)
  +     result.12 <- .... [TRUNCATED] 
  Observed value:  -0.12786 
  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  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137  138  139  140  141  142  143  144  145  146  147  148  149  150  151  152  153  154  155  156  157  158  159  160  161  162  163  164  165  166  167  168  169  170  171  172  173  174  175  176  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191  192  193  194  195  196  197  198  199  200  Empirical significance: 1 
  
  ============ running script `air_scat.q' ============
  
  > with(airpc, {
  +     pc <- cbind(Comp.1, Comp.2)
  +     pc1 <- pc[Period == 1, ]
  +     pc2 <- pc[Period == 2, ]
  +     pc3 <- pc[Period == 3, ]
  +     x .... [TRUNCATED] 
  
  ============ running script `bin_use.q' ============
  
  > cat("Examples of use of function binning()\n")
  Examples of use of function binning()
  
  > x <- rnorm(1000)
  
  > xb <- binning(x)
  
  > h <- hnorm(x)
  
  > sm.density(xb$x, h = h, weights = xb$x.freq, ylim = c(0, 
  +     0.5/sqrt(var(x))))
  
  > pause()
  
  > x <- cbind(x, x + rnorm(1000))
  
  > xb <- binning(x)
  
  > h <- hnorm(x)
  
  > par(mfrow = c(1, 2))
  
  > sm.density(xb$x, h = h, weights = xb$x.freq)
  
  > sm.density(xb$x, h = h, weights = xb$x.freq, display = "slice")
  
  > par(mfrow = c(1, 1))
  
  > pause()
  
  > with(airpc, {
  +     pc3 <- cbind(Comp.1, Comp.2)[Period == 3, ]
  +     pc.bin <- binning(pc3)
  +     par(mfrow = c(1, 2))
  +     sm.density(pc.bin$x, h .... [TRUNCATED] 
  this time original data rather than grid data are plotted
  
  ============ running script `birth1.q' ============
  
  > with(birth, {
  +     Low1 <- Low[Smoke == "S"]
  +     Lwt1 <- Lwt[Smoke == "S"]
  +     Lj <- jitter(Low1, amount = 0)
  +     plot(Lwt1, Lj, type = "n",  .... [TRUNCATED] 
  
  ============ running script `birth2.q' ============
  
  > with(birth, {
  +     Low0 <- Low[Smoke == "N"]
  +     Lwt0 <- Lwt[Smoke == "N"]
  +     Low1 <- Low[Smoke == "S"]
  +     Lwt1 <- Lwt[Smoke == "S"]
  +      .... [TRUNCATED] 
  
  ============ running script `bissell1.q' ============
  
  > with(bissell, {
  +     plot(Length, Flaws, xlim = c(0, 1000), pch = "o")
  +     beta <- sum(Flaws)/sum(Length)
  +     x <- seq(0, 1000, length = 50)
  +  .... [TRUNCATED] 
  
  ============ running script `bissell2.q' ============
  
  > with(bissell, {
  +     plot(Length, Flaws, xlim = c(0, 1000), pch = "o")
  +     beta <- sum(Flaws)/sum(Length)
  +     x <- seq(0, 1000, length = 50)
  +  .... [TRUNCATED] 
  
  ============ running script `citrate.q' ============
  
  > with(citrate, {
  +     Citrate <- as.matrix(citrate)
  +     nSubj <- dim(Citrate)[1]
  +     nTime <- dim(Citrate)[2]
  +     Time <- (1:nTime)
  +     plot .... [TRUNCATED] 
  Autocovariances & autocorrelations:
       auto-cov  auto-corr
  0  360.623571 1.00000000
  1  244.287143 0.67740204
  2  204.040714 0.56579972
  3  175.807857 0.48751072
  4  151.130000 0.41907965
  5  128.680714 0.35682835
  6  120.196429 0.33330164
  7  103.723571 0.28762283
  8   91.565000 0.25390742
  9   87.847857 0.24359988
  10  53.901429 0.14946729
  11  22.932143 0.06359025
  12  13.760714 0.03815811
  13   9.732143 0.02698698
         Rice's criterion:
         h    indept.   depend.
  [1] 0.100000 6.005194 6.005194
  [1] 0.200000 6.005156 6.005182
  [1] 0.300000 5.965648 5.992517
  [1] 0.400000 5.583011 5.878175
  [1] 0.500000 4.855846 5.702201
  [1] 0.600000 4.131101 5.579386
  [1] 0.700000 3.535247 5.519406
  [1] 0.800000 3.072755 5.506906
  [1] 0.900000 2.735846 5.530976
  [1] 1.000000 2.516341 5.582579
  [1] 1.100000 2.400934 5.653475
  [1] 1.200000 2.370399 5.736703
  [1] 1.300000 2.402966 5.826924
  [1] 1.400000 2.478570 5.920349
  [1] 1.500000 2.581237 6.014418
  [1] 1.600000 2.699336 6.107412
  [1] 1.700000 2.824778 6.198149
  [1] 1.800000 2.952046 6.285777
  [1] 1.900000 3.077424 6.369671
  [1] 2.000000 3.198465 6.449387
  h:  0.8 
  
  ============ running script `edfgrad.q' ============
  
  > with(aircraft, {
  +     y <- log(Span[Period == 3])
  +     n <- length(y)
  +     plot(sort(y), (1:n)/n, type = "S", xlab = "y", ylab = "Empirical distr ..." ... [TRUNCATED] 
  
  ============ running script `follicle.q' ============
  
  > with(follicle, {
  +     sm.regression(Age, log(Count), h = 4, lty = 2)
  +     model <- loess(log(Count) ~ Age)
  +     lines(Age, model$fitted, col = 6) .... [TRUNCATED] 
  
  ============ running script `geys3d.q' ============
  
  > with(geys3d, {
  +     par(mfrow = c(1, 2))
  +     plot(Waiting, Duration)
  +     sm.density(geys3d)
  +     par(mfrow = c(1, 1))
  + })
  Loading required package: misc3d
  
  ============ running script `geys_ts.q' ============
  
  > d <- geyser$duration
  
  > cat("Data are: d=(duration of geyser eruption)\n")
  Data are: d=(duration of geyser eruption)
  
  > cat("Marginal density of d(t) first, followed by\n")
  Marginal density of d(t) first, followed by
  
  > cat("estimated density of (d(t-k),d(t)), for k=1,2\n")
  estimated density of (d(t-k),d(t)), for k=1,2
  
  > a <- sm.ts.pdf(d, lags = c(1, 2))
  
  ============ running script `lc_comp.q' ============
  
  > with(lcancer, {
  +     cases <- cbind(Easting/10000, Northing/10000)[Cancer == 1, 
  +         ]
  +     controls <- cbind(Easting/10000, Northing/10000) .... [TRUNCATED] 
  Observed value: 384.6738 
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  
  p-value =  0.75 
  
  ============ running script `lc_dens.q' ============
  
  > with(lcancer, {
  +     cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000
  +     controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000
  +     x .... [TRUNCATED] 
  
  ============ running script `lc_rr.q' ============
  
  > with(lcancer, {
  +     cases <- cbind(Easting, Northing)[Cancer == 1, ]/10000
  +     controls <- cbind(Easting, Northing)[Cancer == 2, ]/10000
  +     x .... [TRUNCATED] 
  
  ============ running script `lynx.q' ============
  
  > ts.plot(lynx)
  
  > title("Canadian lynx trapping (1821-1934)")
  
  > pause()
  
  > cat("Data are now log-transformed\n")
  Data are now log-transformed
  
  > log.lynx <- log(lynx)
  
  > sm.ts.pdf(log.lynx, lags = 4:5)
  
  > pause()
  
  > sm.autoregression(log.lynx, maxlag = 5, se = TRUE)
  
  > pause()
  
  > sm.autoregression(log.lynx, lags = cbind(4, 5))
  
  ============ running script `mackgam.q' ============
  
  > library(gam)
  Loading required package: splines
  Loading required package: foreach
  Loaded gam 1.14-3
  
  
  > model1 <- gam(log(Density) ~ lo(log(mack.depth)) + 
  +     lo(Temperature) + lo(mack.lat, mack.long), data = mackerel)
  
  > print(model1)
  Call:
  gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature) + 
      lo(mack.lat, mack.long), data = mackerel)
  
  Degrees of Freedom: 278 total; 262.7774 Residual
  Residual Deviance: 260.3544 
  
  > print(gam(log(Density) ~ lo(Temperature) + lo(mack.lat, 
  +     mack.long), data = mackerel))
  Call:
  gam(formula = log(Density) ~ lo(Temperature) + lo(mack.lat, mack.long), 
      data = mackerel)
  
  Degrees of Freedom: 278 total; 266.4857 Residual
  Residual Deviance: 359.4476 
  
  > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, 
  +     mack.long), data = mackerel))
  Call:
  gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(mack.lat, 
      mack.long), data = mackerel)
  
  Degrees of Freedom: 278 total; 266.0766 Residual
  Residual Deviance: 271.311 
  
  > print(gam(log(Density) ~ lo(log(mack.depth)) + lo(Temperature), 
  +     data = mackerel))
  Call:
  gam(formula = log(Density) ~ lo(log(mack.depth)) + lo(Temperature), 
      data = mackerel)
  
  Degrees of Freedom: 278 total; 270.9924 Residual
  Residual Deviance: 335.5316 
  
  > par(mfrow = c(2, 2))
  
  > plot.gam(model1, se = TRUE)
  
  > par(mfrow = c(1, 1))
  
  ============ running script `mackmap.q' ============
  
  > with(mackerel, {
  +     plot(-mack.long, mack.lat, xlim = c(-15, 1), ylim = c(45, 
  +         59), xlab = "Longitude", ylab = "Latitude")
  +     britma .... [TRUNCATED] 
  
  ============ running script `mackplot.q' ============
  
  > with(mackerel, {
  +     Position <- cbind(Latitude = mack.lat, Longitude = mack.long)
  +     depth <- mack.depth
  +     par(mfrow = c(2, 2))
  +     sm.r .... [TRUNCATED] 
  
  ============ running script `mag_dens.q' ============
  
  > with(magrem, {
  +     par(mfrow = c(1, 2))
  +     sm.sphere(20, -30, theta = 60, phi = 10, sphim = TRUE, kappa = 13.6)
  +     sm.sphere(maglat, maglong .... [TRUNCATED] 
  
  ============ running script `mag_scat.q' ============
  
  > with(magrem, {
  +     par(mfrow = c(1, 2))
  +     sm.sphere(maglat, maglong, theta = 60, phi = 10)
  +     sm.sphere(maglat, maglong, theta = 240, phi = .... [TRUNCATED] 
  
  ============ running script `mildew.q' ============
  
  > X <- cbind(rep(1, 36), as.matrix(mildew[, 1:11]))
  
  > e <- residuals(lsfit(X, mildew$Yield, intercept = FALSE))
  
  > position <- 1:36
  
  > par(mfrow = c(1, 2))
  
  > sig.trace(sm.regression(position, e, design.mat = X, 
  +     model = "no.effect", display = "none"), hvec = seq(1, 20, 
  +     by = 1.5))
  Test of no.effect model:  significance =  0.407 
  Test of no.effect model:  significance =  0.076 
  Test of no.effect model:  significance =  0.037 
  Test of no.effect model:  significance =  0.025 
  Test of no.effect model:  significance =  0.019 
  Test of no.effect model:  significance =  0.018 
  Test of no.effect model:  significance =  0.02 
  Test of no.effect model:  significance =  0.03 
  Test of no.effect model:  significance =  0.045 
  Test of no.effect model:  significance =  0.063 
  Test of no.effect model:  significance =  0.081 
  Test of no.effect model:  significance =  0.097 
  Test of no.effect model:  significance =  0.112 
  
  > sm.regression(position, e, design.mat = X, h = 7, 
  +     model = "no.effect")
  Test of no.effect model:  significance =  0.019 
  
  > par(mfrow = c(1, 1))
  
  ============ running script `muscle.q' ============
  
  > with(muscle, {
  +     TypeI <- TypeI.P + TypeI.R + TypeI.B
  +     sm.poisson(log(TypeI), TypeII, 0.25, display = "se")
  +     pm <- glm(TypeII ~ log(Ty .... [TRUNCATED] 
  
  ============ running script `noeff.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 1 & Zone == 1 & !is.na(Depth))
  +     y <- Score1[ind]
  +     x <- Depth[ind]
  +     model <- sm.regression(x, y, h .... [TRUNCATED] 
  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  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  
  Empirical p-value:  0.07 
  
  ============ running script `nyc.q' ============
  
  > Temp <- c(67, 72, 74, 62, 65, 59, 61, 69, 66, 68, 
  +     58, 64, 66, 57, 68, 62, 59, 73, 61, 61, 67, 81, 79, 76, 82, 
  +     90, 87, 82, 77, 72, 65,  .... [TRUNCATED] 
  
  > ts.plot(Temp)
  
  > title("Temperature at NYC")
  
  > sm.regression.autocor(y = Temp, h.first = 10, maxh = 6)
  AR[1:2] coeff:  0.4614923 0.08157956 
   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15Suggested value of h:  4.428571 
  
  ============ running script `onionbnd.q' ============
  
  > data(wonions, {
  +     par(mfrow = c(1, 2))
  +     sig.trace(sm.ancova(Density, log(Yield), Locality, model = "parallel", 
  +         display = "none") .... [TRUNCATED] 
  
  ============ running script `onionplt.q' ============
  
  > with(wonions, {
  +     sm.ancova(Density, log(Yield), Locality, h = 15)
  + })
  
  ============ running script `rc_alter.q' ============
  
  > with(radioc, {
  +     cal.age <- Cal.age[Cal.age > 2000 & Cal.age < 3000]
  +     rc.age <- Rc.age[Cal.age > 2000 & Cal.age < 3000]
  +     par(mfrow = c .... [TRUNCATED] 
  
  ============ running script `rc_boot.q' ============
  
  > with(radioc, {
  +     x <- Cal.age[Cal.age > 2000 & Cal.age < 3000]
  +     y <- Rc.age[Cal.age > 2000 & Cal.age < 3000]
  +     plot(x, y, xlab = "Calen ..." ... [TRUNCATED] 
  
  ============ running script `rc_plot.q' ============
  
  > with(radioc, {
  +     par(mfrow = c(1, 2))
  +     plot(Cal.age, Rc.age)
  +     abline(0, 1, lty = 2)
  +     ind <- (Cal.age > 2000 & Cal.age < 3000)
  +   .... [TRUNCATED] 
  
  ============ running script `rc_vband.q' ============
  
  > with(radioc, {
  +     Calendar.age <- Cal.age[Cal.age > 2000 & Cal.age < 3000]
  +     Radiocarbon.age <- Rc.age[Cal.age > 2000 & Cal.age < 3000]
  +     .... [TRUNCATED] 
  
  ============ running script `sin_cv.q' ============
  
  > n <- 50
  
  > x <- seq(0, 1, length = n)
  
  > m <- sin(2 * pi * x)
  
  > h <- 0.05
  
  > sigma <- 0.2
  
  > y <- rnorm(n, m, sigma)
  
  > par(mfrow = c(1, 2))
  
  > h.cv <- hcv(x, y, display = "line", ngrid = 32)
  
  > plot(x, y)
  
  > lines(x, m)
  
  > sm.regression(x, y, h = hcv(x, y), add = TRUE, lty = 2)
  
  > par(mfrow = c(1, 1))
  
  ============ running script `sin_prop.q' ============
  
  > n <- 100
  
  > x <- seq(0, 1, length = n)
  
  > m <- sin(2 * pi * x)
  
  > h <- 0.05
  
  > true.sigma <- 0.2
  
  > model <- sm.regression(x, m, h = h, display = "none")
  
  > upper <- model$estimate + 2 * (true.sigma/model$sigma) * 
  +     model$se
  
  > lower <- model$estimate - 2 * (true.sigma/model$sigma) * 
  +     model$se
  
  > y <- rnorm(n, m, true.sigma)
  
  > plot(range(x), range(y, upper, lower), type = "n", 
  +     xlab = "x", ylab = "y")
  
  > z <- model$eval.points
  
  > polygon(c(z, rev(z)), c(upper, rev(lower)), border = FALSE, 
  +     col = "cyan")
  
  > lines(x, m)
  
  > lines(z, model$estimate, lty = 3)
  
  > points(x, y)
  
  ============ running script `smackgam.q' ============
  
  > library(gam)
  
  > Presence <- smacker$Density
  
  > Presence[Presence > 0] <- 1
  
  > position <- cbind(Latitude = smacker$smack.lat, Longitude = smacker$smack.long)
  
  > Log.depth <- log(smacker$smack.depth)
  
  > temperature <- smacker$Temperature
  
  > model1 <- gam(Presence ~ lo(position) + lo(Log.depth) + 
  +     lo(temperature), family = binomial)
  
  > model2 <- gam(Presence ~ lo(position) + lo(temperature), 
  +     family = binomial)
  
  > model3 <- gam(Presence ~ lo(position) + lo(Log.depth), 
  +     family = binomial)
  
  > model4 <- gam(Presence ~ lo(Log.depth) + lo(temperature), 
  +     family = binomial)
  
  > print(anova(model1))
  Anova for Nonparametric Effects
                  Npar Df Npar Chisq    P(Chi)    
  (Intercept)                                     
  lo(position)        5.9     40.481 3.372e-07 ***
  lo(Log.depth)       2.4     22.438 2.564e-05 ***
  lo(temperature)     2.4     13.446  0.001874 ** 
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  > par(mfrow = c(2, 2))
  
  > sm.regression(position, Presence, h = c(0.3, 0.3), 
  +     poly.index = 0, zlim = c(0, 0.8))
  
  > plot(model1, se = TRUE)
  
  > par(mfrow = c(1, 1))
  
  ============ running script `smackplt.q' ============
  
  > with(smacker, {
  +     Presence <- Density
  +     Presence[Presence > 0] <- 1
  +     Position <- cbind(Longitude = -smack.long, Latitude = smack.lat)
  + .... [TRUNCATED] 
  
  ============ running script `sp_alter.q' ============
  
  > with(aircraft, {
  +     y <- log(Span[Period == 3])
  +     par(mfrow = c(1, 2))
  +     sm.density(y, hmult = 1/3, xlab = "Log span")
  +     sm.density(y .... [TRUNCATED] 
  
  ============ running script `sp_build.q' ============
  
  > with(aircraft, {
  +     log.span.3 <- log(Span[Period == 3])
  +     par(mfrow = c(1, 2))
  +     subsamp <- log.span.3[1 + seq(1, length(log.span.3), 20 .... [TRUNCATED] 
  
  ============ running script `sp_comp.q' ============
  
  > with(aircraft, {
  +     y1 <- log(Span)[Period == 1]
  +     y2 <- log(Span)[Period == 2]
  +     y3 <- log(Span)[Period == 3]
  +     sm.density(y3, xlab  .... [TRUNCATED] 
  
  ============ running script `sp_comp2.q' ============
  
  > with(aircraft, {
  +     par(mfrow = c(1, 2))
  +     h <- exp(mean(log(tapply(log(Span), Period, FUN = "hnorm"))))
  +     ind <- (Period != 3)
  +     sm. .... [TRUNCATED] 
  
  ============ running script `sp_hist.q' ============
  
  > with(aircraft, {
  +     y <- log(Span[Period == 3])
  +     par(mfrow = c(1, 2))
  +     hist(y, xlab = "Log Span", ylab = "Frequency")
  +     sm.density( .... [TRUNCATED] 
  
  ============ running script `sp_test1.q' ============
  
  > with(aircraft, {
  +     par(mfrow = c(1, 2))
  +     h <- exp(mean(log(tapply(log(Span), Period, FUN = "hnorm"))))
  +     ind <- (Period != 3)
  +     sm. .... [TRUNCATED] 
  
  ============ running script `sp_test2.q' ============
  
  > with(aircraft, {
  +     y <- log(Span)
  +     for (i in 1:3) {
  +         yi <- y[Period == i]
  +         med <- median(yi)
  +         sc <- diff(quantil .... [TRUNCATED] 
  
  ============ running script `speed.q' ============
  
  > with(aircraft, {
  +     par(mfrow = c(1, 2))
  +     hist(Speed, ylab = "Frequency")
  +     sm.density(Speed, yht = 0.0016)
  +     par(mfrow = c(1, 1))
  + .... [TRUNCATED] 
  
  ============ running script `speedvar.q' ============
  
  > with(aircraft, {
  +     hw <- nnbr(Speed, 30)
  +     hw <- hw/exp(mean(log(hw)))
  +     par(mfrow = c(1, 2))
  +     sm.density(Speed, yht = 0.0022, posi .... [TRUNCATED] 
  
  ============ running script `stananim.q' ============
  
  > with(stanford, {
  +     x <- Age
  +     y <- Log.time
  +     status <- Status
  +     st.code <- 1
  +     hseq <- seq(5, 10, by = 1)
  +     model <- sm.sur .... [TRUNCATED] 
  
  ============ running script `stanplot.q' ============
  
  > with(stanford, {
  +     sm.survival(Age, Log.time, Status, h = 7)
  +     sm.survival(Age, Log.time, Status, h = 7, p = 0.25, add = TRUE, 
  +         lt .... [TRUNCATED] 
  
  ============ running script `te_band.q' ============
  
  > with(tephra, {
  +     logit <- log(Al2O3/(100 - Al2O3))
  +     par(mfrow = c(1, 2))
  +     sm.density(logit, model = "Normal")
  +     sm.density(logit,  .... [TRUNCATED] 
  
  ============ running script `te_hcvsj.q' ============
  
  > with(tephra, {
  +     logit <- log(Al2O3/(100 - Al2O3))
  +     par(mfrow = c(1, 2))
  +     h.cv <- hcv(logit, display = "line", ngrid = 32)
  +     n <-  .... [TRUNCATED] 
  
  ============ running script `te_norm.q' ============
  
  > with(tephra, {
  +     logit <- log(Al2O3/(100 - Al2O3))
  +     par(mfrow = c(1, 2))
  +     qqnorm(logit)
  +     qqline(logit)
  +     cat("ISE statistic:" .... [TRUNCATED] 
  ISE statistic: 0.009077435 
  
  ============ running script `te_var.q' ============
  
  > with(tephra, {
  +     logit <- log(Al2O3/(100 - Al2O3))
  +     nn <- nnbr(logit, 7)
  +     hw <- nn/exp(mean(log(nn)))
  +     sm.density(logit, h.weight .... [TRUNCATED] 
  
  ============ running script `trees.q' ============
  
  > diameter <- trees$Girth
  
  > volume <- trees$Volume
  
  > height <- trees$Height
  
  > h1 <- 1.5
  
  > h2 <- 4
  
  > par(mfrow = c(2, 2))
  
  > par(cex = 0.7)
  
  > sm.regression(diameter, volume, h = h1, model = "linear")
  Test of linear model:  significance =  0.007 
  
  > sm.regression(height, volume, h = h2, model = "linear")
  Test of linear model:  significance =  0.734 
  
  > X <- cbind(diameter, height)
  
  > sm.regression(X, volume, h = c(h1, h2), model = "linear", 
  +     zlim = c(0, 80))
  Test of linear model:  significance =  0.023 
  
  > X <- cbind(log(diameter), log(height))
  
  > colnames(X) <- c("log(Diameter)", "log(Height)")
  
  > sm.regression(X, log(volume), h = log(c(h1, h2)), 
  +     model = "linear")
  Test of linear model:  significance =  0.824 
  
  > par(cex = 1)
  
  > par(mfrow = c(1, 1))
  
  ============ running script `trout1.q' ============
  
  > with(trout, {
  +     conc <- N <- dead <- rep(0, 6)
  +     for (i in 1:6) {
  +         conc[i] <- Concentr[i * 4]
  +         for (j in 1:4) {
  +          .... [TRUNCATED] 
  
  ============ running script `trout2.q' ============
  
  > with(trout, {
  +     conc <- N <- dead <- rep(0, 6)
  +     for (i in 1:6) {
  +         conc[i] <- Concentr[i * 4]
  +         for (j in 1:4) {
  +          .... [TRUNCATED] 
  Dispersion parameter =  2.471992 
  Test statistic =  39.54358 
  Observed significance =  0 
  
  ============ running script `trw_lf.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 0 & Zone == 1)
  +     score <- Score1[ind]
  +     longitude <- Longitude[ind]
  +     par(mfrow = c(1, 2))
  +     plo .... [TRUNCATED] 
  
  Call:
  lm(formula = score ~ poly(longitude, 2))
  
  Residuals:
       Min       1Q   Median       3Q      Max 
  -1.47074 -0.25548  0.04998  0.37745  0.76055 
  
  Coefficients:
                      Estimate Std. Error t value Pr(>|t|)    
  (Intercept)          0.85404    0.07545  11.319 6.84e-14 ***
  poly(longitude, 2)1 -4.49836    0.48899  -9.199 2.58e-11 ***
  poly(longitude, 2)2 -0.36695    0.48899  -0.750    0.458    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 0.489 on 39 degrees of freedom
  Multiple R-squared:  0.686,	Adjusted R-squared:  0.6699 
  F-statistic: 42.59 on 2 and 39 DF,  p-value: 1.553e-10
  
  
  ============ running script `trw_lfsg.q' ============
  
  > ind <- (trawl$Year == 0 & trawl$Zone == 1)
  
  > score <- trawl$Score1[ind]
  
  > longitude <- trawl$Longitude[ind]
  
  > par(mfrow = c(1, 2))
  
  > sig.trace(sm.regression(longitude, score, model = "linear", 
  +     display = "none"), hvec = seq(0.02, 0.2, length = 10))
  Test of linear model:  significance =  0.118 
  Test of linear model:  significance =  0.018 
  Test of linear model:  significance =  0.006 
  Test of linear model:  significance =  0.004 
  Test of linear model:  significance =  0.003 
  Test of linear model:  significance =  0.002 
  Test of linear model:  significance =  0.002 
  Test of linear model:  significance =  0.001 
  Test of linear model:  significance =  0.001 
  Test of linear model:  significance =  0.001 
  
  > sm.regression(longitude, score, h = 0.1, model = "linear")
  Test of linear model:  significance =  0.003 
  
  > par(mfrow = c(1, 1))
  
  > print(summary(lm(score ~ poly(longitude, 2))))
  
  Call:
  lm(formula = score ~ poly(longitude, 2))
  
  Residuals:
       Min       1Q   Median       3Q      Max 
  -1.47074 -0.25548  0.04998  0.37745  0.76055 
  
  Coefficients:
                      Estimate Std. Error t value Pr(>|t|)    
  (Intercept)          0.85404    0.07545  11.319 6.84e-14 ***
  poly(longitude, 2)1 -4.49836    0.48899  -9.199 2.58e-11 ***
  poly(longitude, 2)2 -0.36695    0.48899  -0.750    0.458    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 0.489 on 39 degrees of freedom
  Multiple R-squared:  0.686,	Adjusted R-squared:  0.6699 
  F-statistic: 42.59 on 2 and 39 DF,  p-value: 1.553e-10
  
  
  ============ running script `trw_nebd.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 1 & Zone == 1 & !is.na(Depth))
  +     score1 <- Score1[ind]
  +     depth <- Depth[ind]
  +     par(mfrow = c(1, 2))
   .... [TRUNCATED] 
  Test of no.effect model:  significance =  0.068 
  Test of no.effect model:  significance =  0.039 
  
  ============ running script `trw_nesg.q' ============
  
  > ind <- (trawl$Year == 1 & trawl$Zone == 1 & !is.na(trawl$Depth))
  
  > score1 <- trawl$Score1[ind]
  
  > depth <- trawl$Depth[ind]
  
  > summary(lm(score1 ~ depth))
  
  Call:
  lm(formula = score1 ~ depth)
  
  Residuals:
      Min      1Q  Median      3Q     Max 
  -1.4840 -0.6676  0.1616  0.5862  1.0947 
  
  Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
  (Intercept)  1.75911    0.35938   4.895 1.65e-05 ***
  depth       -0.03201    0.01277  -2.507   0.0164 *  
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Residual standard error: 0.7385 on 40 degrees of freedom
  Multiple R-squared:  0.1358,	Adjusted R-squared:  0.1142 
  F-statistic: 6.284 on 1 and 40 DF,  p-value: 0.01635
  
  
  > sig.trace(sm.regression(depth, score1, model = "no.effect", 
  +     display = "none"), hvec = seq(5, 20, length = 10))
  Test of no.effect model:  significance =  0.068 
  Test of no.effect model:  significance =  0.058 
  Test of no.effect model:  significance =  0.047 
  Test of no.effect model:  significance =  0.039 
  Test of no.effect model:  significance =  0.033 
  Test of no.effect model:  significance =  0.03 
  Test of no.effect model:  significance =  0.027 
  Test of no.effect model:  significance =  0.025 
  Test of no.effect model:  significance =  0.023 
  Test of no.effect model:  significance =  0.022 
  
  ============ running script `trwlband.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 0)
  +     longitude <- Longitude[ind]
  +     zone <- Zone[ind]
  +     score1 <- Score1[ind]
  +     sm.ancova(longitu .... [TRUNCATED] 
  Test of equality :  h =  0.1    p-value =  0.5691 
  
  ============ running script `trwlboot.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 1 & Zone == 1 & !is.na(Depth))
  +     par(mfrow = c(1, 2))
  +     sm.regression(Depth[ind], Score1[ind], h = 5, xl .... [TRUNCATED] 
  
  ============ running script `trwlcmp2.q' ============
  
  > with(trawl, {
  +     ind <- (Zone == 1)
  +     score1 <- Score1[ind]
  +     latitude <- Latitude[ind]
  +     longitude <- Longitude[ind] - 140
  +     pos .... [TRUNCATED] 
  
  ============ running script `trwlcomp.q' ============
  
  > with(trawl, {
  +     ind <- (Year == 0)
  +     longitude <- Longitude[ind]
  +     zone <- Zone[ind]
  +     score1 <- Score1[ind]
  +     sm.ancova(longitu .... [TRUNCATED] 
  
  ============ running script `trwlgam1.q' ============
  
  > library(gam)
  
  > ind <- (trawl$Year == 0 & trawl$Zone == 1)
  
  > score1 <- trawl$Score1[ind]
  
  > latitude <- trawl$Latitude[ind]
  
  > longitude <- trawl$Longitude[ind] - 143
  
  > position <- cbind(latitude, longitude = -longitude)
  
  > par(mfrow = c(2, 2))
  
  > par(cex = 0.7)
  
  > model1 <- sm.regression(position, score1, h = c(0.1, 
  +     0.1))
  
  > model2 <- gam(score1 ~ lo(latitude) + lo(longitude))
  
  > ex <- model1$eval.points[, 1]
  
  > ey <- model1$eval.points[, 2]
  
  > ngrid <- length(ex)
  
  > grid <- data.frame(cbind(latitude = rep(ex, ngrid), 
  +     longitude = rep(-ey, rep(ngrid, ngrid))))
  
  > surface <- predict(model2, grid)
  Error in .Fortran("lo0", x, y, w, n, ncols, p, nvmax, span, degree, o$o,  : 
    "lo0" not available for .Fortran() for package "gam"
  Calls: source ... newdata.predict.gam -> eval -> eval -> gam.lo -> .Fortran
  In addition: Warning messages:
  1: In data(wonions, { : data set '{
      par(mfrow = c(1, 2))
      sig.trace(sm.ancova(Density, log(Yield), Locality, model = "parallel", display = "none"), hvec = seq(5, 30, length = 12))
      sm.ancova(Density, log(Yield), Locality, h = 15, model = "parallel")
      par(mfrow = c(1, 1))
  }' not found
  2: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  3: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  4: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  5: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  6: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  7: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  8: In lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame, bf.maxit,  :
    lo.wam convergence not obtained in  30  iterations
  Execution halted