Running 'gam-smooth-match.R' [3s/3s]
  Running 'gam.R' [4s/5s]
  Running 'glm.R' [3s/4s]
  Running 'glm.nb.R' [3s/5s]
  Running 'misc-tests.R' [2s/3s]
  Running 'multinom.R' [2s/3s]
  Running 'nlme.R' [3s/4s]
  Running 'parallel.R' [4s/8s]
  Running 'quasibinomial.R' [2s/3s]
  Running 'rlm.R' [2s/3s]
  Running 'singularities.R' [2s/3s]
  Running 'survival.R' [4s/5s]
Running the tests in 'tests/gam-smooth-match.R' failed.
Complete output:
  > 
  > library(MuMIn)
  > suppressPackageStartupMessages(library(mgcv))
  > RNGkind("Mersenne")
  > 
  > 
  > set.seed(0) ## simulate some data...
  > dat <- gamSim(1, n = 200, dist = "binary", scale = 2)
  Gu & Wahba 4 term additive model
  > 
  > 
  > gamsmoothwrap <-
  + function(formula, k1 = NA, ...) { 
  +     cl <- origCall <- match.call()
  +     cl[[1]] <- as.name("gam")
  +     cl$formula <- exprApply(formula, "s", function(e, k, x) {
  +         i <- which(e[[2]] == x)[1]
  +         if(!is.na(i) && !is.na(k[i])) e[["k"]] <- k[i]
  +         e
  +     }, k = c(k1), x = c("x0"))
  +     cl$k1 <- NULL
  + 	fit <- eval(cl, parent.frame())
  +     fit$call <- origCall # replace the stored call
  +     fit
  + }
  > 
  > glo <- gamsmoothwrap(y ~ s(x0, fx = TRUE), k1 = 3, data = dat, family = binomial)
  > 
  > 
  > print(ms <- model.sel(models <- lapply(dredge(glo, varying = list(k1 = 3:16), fixed = TRUE,
  + 	evaluate = FALSE), eval)))
  Fixed terms are "s(x0, fx = TRUE, k = 3)" and "(Intercept)"
  Model selection table 
     (Int) s(x0,T,3) s(x0,T,4) s(x0,T,5) s(x0,T,6) s(x0,T,7) s(x0,T,8) s(x0,T,9)
  1  1.293         +                                                            
  2  1.321                   +                                                  
  3  1.321                             +                                        
  4  1.329                                       +                              
  5  1.348                                                 +                    
  13 2.126                                                                      
  10 1.554                                                                      
  6  1.360                                                           +          
  14 1.964                                                                      
  11 1.575                                                                      
  7  1.361                                                                     +
  12 1.679                                                                      
  9  1.424                                                                      
  8  1.360                                                                      
     s(x0,T,10) s(x0,T,11) s(x0,T,12) s(x0,T,13) s(x0,T,14) s(x0,T,15) s(x0,T,16)
  1                                                                              
  2                                                                              
  3                                                                              
  4                                                                              
  5                                                                              
  13                                                                 +           
  10                                +                                            
  6                                                                              
  14                                                                            +
  11                                           +                                 
  7                                                                              
  12                                                      +                      
  9                      +                                                       
  8           +                                                                  
     k1 df   logLik  AICc delta weight
  1   3  2 -102.341 210.8  0.00  0.373
  2   4  3 -101.430 211.1  0.26  0.327
  3   5  5 -101.391 213.1  2.29  0.119
  4   6  6 -101.216 214.9  4.06  0.049
  5   7  6 -100.616 215.8  5.01  0.030
  13 15 15  -92.011 216.6  5.82  0.020
  10 12 11  -95.543 216.8  5.95  0.019
  6   8  8 -100.151 217.1  6.25  0.016
  14 16 15  -91.066 217.1  6.30  0.016
  11 13 13  -94.846 217.6  6.84  0.012
  7   9  9 -100.142 219.2  8.43  0.006
  12 14 14  -94.490 219.3  8.45  0.005
  9  11 11  -98.147 219.7  8.89  0.004
  8  10  9 -100.136 221.4 10.63  0.002
  Models ranked by AICc(x) 
  > 
  > 
  > # should throw a warning
  > stopifnot(isTRUE(tryCatch(model.avg(models), warning = function(e) TRUE)))
  > 
  > #_______________________________________________________________________________
  > 
  > set.seed(0) ## simulate some data...
  > dat <- gamSim(1, n = 400, dist = "binary", scale = 2)
  Gu & Wahba 4 term additive model
  > 
  > testSmoothKConsistency <- MuMIn:::testSmoothKConsistency
  > 
  > 
  > glm1 <- glm(y ~ x1 * x2, data = dat, family = binomial)
  > gam53 <- gam(y ~ s(x0, k = 5) + s(x1, k = 3), data = dat, family = binomial)
  > gam37 <- update(gam53, . ~ s(x0, k = 3) + s(x1, k = 7))
  > gam3e44 <- update(gam53, . ~ s(x0, k = 3) + te(x2, x1, k = 4))
  Error in .Call(C_mgcv_tmm, X, T, d, m, n) : WEIRD RETURN VALUE: 0x4
  Calls: update ... smooth.construct.tensor.smooth.spec -> tensor.prod.model.matrix
  Execution halted