Running 'gam-smooth-match.R' [3s]
  Running 'gam.R' [3s]
  Running 'glm.R' [2s]
  Running 'glm.nb.R' [3s]
  Running 'misc-tests.R' [172s]
  Running 'multinom.R' [2s]
  Running 'nlme.R' [2s]
  Running 'parallel.R' [168s]
  Running 'quasibinomial.R' [170s]
  Running 'rlm.R' [161s]
  Running 'singularities.R' [2s]
  Running 'survival.R' [172s]
Running the tests in 'tests/misc-tests.R' failed.
Complete output:
  > # Test varia
  > 
  > require(MuMIn)
  Loading required package: MuMIn
  > packageVersion("MuMIn")
  [1] '1.47.5'
  > options(na.action = "na.fail")
  > 
  > #print(packageDescription("MuMIn", fields = "Version"))
  > # TEST binary response ---------------------------------------------------------
  > ldose <- rep(0:5, 2)
  > numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
  > sex <- factor(rep(c("M", "F"), c(6, 6)))
  > SF <- cbind(numdead, numalive=20-numdead)
  > budworm.lg <- glm(SF ~ sex*ldose, family = binomial)
  > dd <- dredge(budworm.lg, trace=FALSE)
  Fixed term is "(Intercept)"
  > gm <- get.models(dd, 1:4)
  > model.avg(gm)
  
  Call:
  model.avg(object = gm)
  
  Component models: 
  '12'  '123' '1'   '2'  
  
  Coefficients: 
         (Intercept)    ldose     sexM ldose:sexM
  full     -3.365538 1.033944 0.900864 0.06372988
  subset   -3.365538 1.033944 0.928449 0.35291299
  > 
  > # The same, but use cbind directly in the formula
  > budworm.lg <- glm(cbind(numdead, numalive=20-numdead) ~ sex*ldose, family=binomial)
  > dd <- dredge(budworm.lg, trace=TRUE)
  Fixed term is "(Intercept)"
  0 : glm(formula = cbind(numdead, numalive = 20 - numdead) ~ 1, family = binomial)
  1 : glm(formula = cbind(numdead, numalive = 20 - numdead) ~ ldose + 
      1, family = binomial)
  2 : glm(formula = cbind(numdead, numalive = 20 - numdead) ~ sex + 
      1, family = binomial)
  3 : glm(formula = cbind(numdead, numalive = 20 - numdead) ~ ldose + 
      sex + 1, family = binomial)
  7 : glm(formula = cbind(numdead, numalive = 20 - numdead) ~ ldose + 
      sex + ldose:sex + 1, family = binomial)
  > avgmod <- model.avg(get.models(dd, 1:4))
  > 
  > # TEST for consistency of vcov and se calculation ------------------------------
  > if(!isTRUE(all.equal(coefTable(avgmod, adjust.se = FALSE)[,2],
  + 	sqrt(diag(vcov(avgmod))), tolerance = .001)))
  + 	stop("'vcov' has a problem")
  > 
  > # TEST evaluation from within function -----------------------------------------
  > 
  > budworm <- data.frame(ldose = rep(0:5, 2), numdead = c(1, 4, 9, 12, 18, 20, 0,
  + 	2, 6, 10, 12, 16), sex = factor(rep(c("M", "F"), c(6, 6))))
  > budworm$SF <- cbind(numdead = budworm$numdead, numalive = 20 - budworm$numdead)
  > 
  > # evaluate within an exotic environment
  > (function(dat) (function(dat2) {
  + 	#mod <- glm(SF ~ sex*ldose, data = dat2, family = "quasibinomial", trace=T)
  + 	mod <- glm(SF ~ sex*ldose, data = dat2, family = "binomial")
  + 	#mod <- glm(SF ~ sex*ldose, data = budworm, family = "binomial", trace=F)
  + 	print(dd <- dredge(mod, rank = "QAIC", chat = summary(budworm.lg)$dispersion))
  + 	gm <- get.models(dd, subset = NA, family = "binomial")
  + 	#print(sys.frames())
  + 	summary(model.avg(gm))
  + })(dat))(budworm)
  Fixed term is "(Intercept)"
  Global model call: glm(formula = SF ~ sex * ldose, family = "binomial", data = dat2)
  ---
  Model selection table 
      (Int)   lds sex lds:sex df  logLik  QAIC  delta weight
  4 -3.4380 1.053   +          3 -18.736  43.5   0.00  0.552
  8 -2.9940 0.906   +       +  4 -17.981  44.0   0.49  0.432
  2 -2.7810 1.002              2 -23.301  50.6   7.13  0.016
  3 -0.4754         +          2 -74.119 152.2 108.77  0.000
  1 -0.1671                    1 -76.849 155.7 112.23  0.000
  Models ranked by QAIC(x, chat = 1) 
  
  Call:
  model.avg(object = gm)
  
  Component model call: 
  glm(formula = SF ~ <5 unique rhs>, family = binomial, data = dat2)
  
  Component models: 
         df logLik   QAIC  delta weight
  12      3 -18.74  43.47   0.00   0.55
  123     4 -17.98  43.96   0.49   0.43
  1       2 -23.30  50.60   7.13   0.02
  2       2 -74.12 152.24 108.77   0.00
  (Null)  1 -76.85 155.70 112.23   0.00
  
  Term codes: 
      ldose       sex ldose:sex 
          1         2         3 
  
  Model-averaged coefficients:  
  (full average) 
              Estimate Std. Error Adjusted SE z value Pr(>|z|)    
  (Intercept)  -3.2356     0.5517      0.6287   5.146    3e-07 ***
  ldose         0.9885     0.1638      0.1861   5.313    1e-07 ***
  sexM          0.6493     0.7159      0.7971   0.815    0.415    
  ldose:sexM    0.1393     0.2368      0.2604   0.535    0.593    
   
  (conditional average) 
              Estimate Std. Error Adjusted SE z value Pr(>|z|)    
  (Intercept)  -3.2356     0.5517      0.6287   5.146    3e-07 ***
  ldose         0.9885     0.1638      0.1861   5.313    1e-07 ***
  sexM          0.6596     0.7169      0.7991   0.825    0.409    
  ldose:sexM    0.3225     0.2659      0.3129   1.031    0.303    
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  > 
  > 
  > 
  > rm(list=ls())
  > 
  > # END TESTS
  > 
  > proc.time()
     user  system elapsed 
     1.40    0.18    1.59 
Running the tests in 'tests/parallel.R' failed.
Complete output:
  > if(MuMIn:::.parallelPkgCheck(quiet = TRUE)) {
  + 	clusterType <- if(length(find.package("snow", quiet = TRUE))) "SOCK" else "PSOCK"
  + 	clust <- try(makeCluster(getOption("cl.cores", 2), type = clusterType))
  + 	if(inherits(clust, "cluster")) {
  + 	
  + 		library(MuMIn)
  + 		library(nlme)
  + 
  + 		data(Orthodont, package = "nlme")
  + 		#Orthodont <- Orthodont[sample.int(nrow(Orthodont), size = 64,
  + 			#replace = TRUE), ]
  + 		Orthodont$rand1 <- runif(nrow(Orthodont))
  + 		Orthodont$rand2 <- runif(nrow(Orthodont))
  + 		clusterExport(clust, "Orthodont")
  + 		clusterCall(clust, "library", "nlme", character.only = TRUE)		
  + 
  + 		# fm2 <- lmer(log(distance) ~ rand*Sex*age + (1|Subject) + (1|Sex),
  + 		#	data = Orthodont, REML=FALSE)
  + 		fm2 <- lme(log(distance) ~ rand1*Sex*age + rand2, ~ 1|Subject / Sex,
  + 			data = Orthodont, method = "ML")
  + 		print(system.time(pdd1 <- dredge(fm2, cluster = FALSE)))
  + 		print(system.time(pddc <- dredge(fm2, cluster = clust)))
  + 		print(system.time(dd1 <- dredge(fm2)))
  + 
  + 		print(pddc)
  + 		print(pdd1)
  + 		print(dd1)
  + 		
  + 		#print(all.equal(pddc, dd1))
  + 		ma1 <- model.avg(pdd1, beta = "none")
  + 		ma0 <- model.avg(pddc)
  + 
  + 		if(!isTRUE(test <- all.equal(ma1$avg.model, ma0$avg.model))) {
  + 			print(test)
  + 			warning("'ma1' and 'ma0' are not equal")
  + 		}
  + 		if(!isTRUE(test <- all.equal(ma1$summary, ma0$summary))) {
  + 			print(test)
  + 			warning("'ma1' and 'ma0' are not equal")
  + 		}
  + 		
  +         if(!(identical(c(pddc), c(pdd1)) && identical(c(pdd1), c(dd1)))) {
  + 		    warning("results of 'dredge' and 'pdredge' are not equal")
  + 			print(all.equal(c(pddc), c(pdd1)))
  + 			print(all.equal(c(pdd1), c(dd1)))
  + 		}
  + 
  + 		stopCluster(clust)
  + 
  + 	# suppressPackageStartupMessages(library(spdep))
  + 	# suppressMessages(example(NY_data, echo = FALSE))
  + 	# esar1f <- spautolm(Z ~ PEXPOSURE * PCTAGE65P + PCTOWNHOME,
  + 	# data=nydata, listw=listw_NY, family="SAR", method="full", verbose=FALSE)
  + 	# clusterCall(clust, "library", "spdep", character.only = TRUE)
  + 	# clusterExport(clust, "listw_NY", "nydata")
  + 	# options(warn=1)
  + 
  + 	# varying <- list(family = list("CAR", "SAR"), method=list("Matrix_J", "full"))
  + 
  + 	# dd <- dredge(esar1f, m.lim=c(0, 1),  fixed=~PEXPOSURE, varying = varying, trace=FALSE)
  + 
  + 	} else # if(inherits(clust, "try-error"))
  + 	message("Could not set up the cluster")
  + 
  + }
  Fixed term is "(Intercept)"
     user  system elapsed 
     1.36    0.03    1.40 
  Fixed term is "(Intercept)"
     user  system elapsed 
     0.05    0.00    2.06 
  Fixed term is "(Intercept)"
     user  system elapsed 
     1.23    0.03    1.26 
  Global model call: lme.formula(fixed = log(distance) ~ rand1 * Sex * age + rand2, 
      data = Orthodont, random = ~1 | Subject/Sex, method = "ML")
  ---
  Model selection table 
      (Int) Sex     age        rn1      rn2 Sex:age Sex:rn1  age:rn1 Sex:age:rn1
  19  2.862   + 0.03170                           +                             
  3   2.910   + 0.02740                                                         
  27  2.860   + 0.03155            0.008319       +                             
  23  2.863   + 0.03169 -6.551e-04                +                             
  11  2.903   + 0.02735            0.015210                                     
  7   2.913   + 0.02739 -6.502e-03                                              
  31  2.861   + 0.03154 -9.581e-04 0.008360       +                             
  87  2.869   + 0.03111 -1.426e-02                +         0.001286            
  55  2.862   + 0.03170 -7.551e-05                +       +                     
  15  2.907   + 0.02734 -6.737e-03 0.015330                                     
  71  2.927   + 0.02609 -3.797e-02                          0.002982            
  39  2.912   + 0.02742 -5.057e-03                        +                     
  95  2.868   + 0.03089 -1.597e-02 0.008482       +         0.001419            
  63  2.861   + 0.03153 -1.158e-03 0.008385       +       +                     
  119 2.869   + 0.03112 -1.368e-02                +       + 0.001276            
  2   2.870     0.02740                                                         
  79  2.921   + 0.02597 -3.982e-02 0.015500                 0.003134            
  47  2.907   + 0.02734 -6.762e-03 0.015340               +                     
  103 2.926   + 0.02612 -3.651e-02                        + 0.002954            
  247 2.883   + 0.02982 -4.398e-02                +       + 0.004118           +
  127 2.868   + 0.03088 -1.640e-02 0.008527       +       + 0.001428            
  10  2.865     0.02737            0.011680                                     
  6   2.873     0.02739 -6.511e-03                                              
  111 2.921   + 0.02596 -4.024e-02 0.015550               + 0.003143            
  255 2.882   + 0.02956 -4.719e-02 0.008670       +       + 0.004315           +
  14  2.868     0.02735 -6.690e-03 0.011810                                     
  70  2.879     0.02681 -2.055e-02                          0.001331            
  78  2.875     0.02673 -2.163e-02 0.011860                 0.001417            
  1   3.211   +                                                                 
  9   3.202   +                    0.020510                                     
  5   3.216   +         -1.171e-02                                              
  37  3.228   +         -3.662e-02                        +                     
  13  3.207   +         -1.197e-02 0.020690                                     
  45  3.218   +         -3.898e-02 0.024110               +                     
  0   3.172                                                                     
  4   3.177             -1.185e-02                                              
  8   3.166                        0.012390                                     
  12  3.171             -1.201e-02 0.012580                                     
      df  logLik   AICc delta weight
  19   7 127.865 -240.6  0.00  0.344
  3    6 125.738 -238.6  1.97  0.129
  27   8 127.937 -238.4  2.19  0.115
  23   8 127.866 -238.3  2.33  0.107
  11   7 125.971 -236.8  3.79  0.052
  7    7 125.787 -236.5  4.16  0.043
  31   9 127.938 -236.0  4.57  0.035
  87   9 127.875 -235.9  4.70  0.033
  55   9 127.866 -235.9  4.71  0.033
  15   8 126.024 -234.6  6.02  0.017
  71   8 125.834 -234.2  6.40  0.014
  39   8 125.790 -234.1  6.49  0.013
  95  10 127.949 -233.6  6.98  0.010
  63  10 127.938 -233.6  7.00  0.010
  119 10 127.875 -233.5  7.13  0.010
  2    5 121.539 -232.5  8.12  0.006
  79   9 126.077 -232.3  8.29  0.005
  47   9 126.024 -232.2  8.40  0.005
  103  9 125.836 -231.8  8.77  0.004
  247 11 127.960 -231.2  9.44  0.003
  127 11 127.949 -231.1  9.46  0.003
  10   6 121.675 -230.5 10.09  0.002
  6    6 121.587 -230.3 10.27  0.002
  111 10 126.077 -229.9 10.72  0.002
  255 12 128.036 -228.8 11.82  0.001
  14   7 121.726 -228.3 12.28  0.001
  70   7 121.596 -228.1 12.54  0.001
  78   8 121.737 -226.0 14.59  0.000
  1    5  89.806 -169.0 71.59  0.000
  9    6  89.990 -167.1 73.46  0.000
  5    6  89.874 -166.9 73.69  0.000
  37   7  90.280 -165.4 75.17  0.000
  13   7  90.062 -165.0 75.61  0.000
  45   8  90.534 -163.6 77.00  0.000
  0    4  85.606 -162.8 77.79  0.000
  4    5  85.675 -160.8 79.85  0.000
  8    5  85.672 -160.8 79.85  0.000
  12   6  85.743 -158.7 81.96  0.000
  Models ranked by AICc(x) 
  Random terms (all models): 
    1 | Subject, 1 | Sex %in% Subject
  
  Global model call: lme.formula(fixed = log(distance) ~ rand1 * Sex * age + rand2, 
      data = Orthodont, random = ~1 | Subject/Sex, method = "ML")
  ---
  Model selection table 
      (Int) Sex     age        rn1      rn2 Sex:age Sex:rn1  age:rn1 Sex:age:rn1
  20  2.862   + 0.03170                           +                             
  4   2.910   + 0.02740                                                         
  28  2.860   + 0.03155            0.008319       +                             
  24  2.863   + 0.03169 -6.551e-04                +                             
  12  2.903   + 0.02735            0.015210                                     
  8   2.913   + 0.02739 -6.502e-03                                              
  32  2.861   + 0.03154 -9.581e-04 0.008360       +                             
  88  2.869   + 0.03111 -1.426e-02                +         0.001286            
  56  2.862   + 0.03170 -7.551e-05                +       +                     
  16  2.907   + 0.02734 -6.737e-03 0.015330                                     
  72  2.927   + 0.02609 -3.797e-02                          0.002982            
  40  2.912   + 0.02742 -5.057e-03                        +                     
  96  2.868   + 0.03089 -1.597e-02 0.008482       +         0.001419            
  64  2.861   + 0.03153 -1.158e-03 0.008385       +       +                     
  120 2.869   + 0.03112 -1.368e-02                +       + 0.001276            
  3   2.870     0.02740                                                         
  80  2.921   + 0.02597 -3.982e-02 0.015500                 0.003134            
  48  2.907   + 0.02734 -6.762e-03 0.015340               +                     
  104 2.926   + 0.02612 -3.651e-02                        + 0.002954            
  248 2.883   + 0.02982 -4.398e-02                +       + 0.004118           +
  128 2.868   + 0.03088 -1.640e-02 0.008527       +       + 0.001428            
  11  2.865     0.02737            0.011680                                     
  7   2.873     0.02739 -6.511e-03                                              
  112 2.921   + 0.02596 -4.024e-02 0.015550               + 0.003143            
  256 2.882   + 0.02956 -4.719e-02 0.008670       +       + 0.004315           +
  15  2.868     0.02735 -6.690e-03 0.011810                                     
  71  2.879     0.02681 -2.055e-02                          0.001331            
  79  2.875     0.02673 -2.163e-02 0.011860                 0.001417            
  2   3.211   +                                                                 
  10  3.202   +                    0.020510                                     
  6   3.216   +         -1.171e-02                                              
  38  3.228   +         -3.662e-02                        +                     
  14  3.207   +         -1.197e-02 0.020690                                     
  46  3.218   +         -3.898e-02 0.024110               +                     
  1   3.172                                                                     
  5   3.177             -1.185e-02                                              
  9   3.166                        0.012390                                     
  13  3.171             -1.201e-02 0.012580                                     
      df  logLik   AICc delta weight
  20   7 127.865 -240.6  0.00  0.344
  4    6 125.738 -238.6  1.97  0.129
  28   8 127.937 -238.4  2.19  0.115
  24   8 127.866 -238.3  2.33  0.107
  12   7 125.971 -236.8  3.79  0.052
  8    7 125.787 -236.5  4.16  0.043
  32   9 127.938 -236.0  4.57  0.035
  88   9 127.875 -235.9  4.70  0.033
  56   9 127.866 -235.9  4.71  0.033
  16   8 126.024 -234.6  6.02  0.017
  72   8 125.834 -234.2  6.40  0.014
  40   8 125.790 -234.1  6.49  0.013
  96  10 127.949 -233.6  6.98  0.010
  64  10 127.938 -233.6  7.00  0.010
  120 10 127.875 -233.5  7.13  0.010
  3    5 121.539 -232.5  8.12  0.006
  80   9 126.077 -232.3  8.29  0.005
  48   9 126.024 -232.2  8.40  0.005
  104  9 125.836 -231.8  8.77  0.004
  248 11 127.960 -231.2  9.44  0.003
  128 11 127.949 -231.1  9.46  0.003
  11   6 121.675 -230.5 10.09  0.002
  7    6 121.587 -230.3 10.27  0.002
  112 10 126.077 -229.9 10.72  0.002
  256 12 128.036 -228.8 11.82  0.001
  15   7 121.726 -228.3 12.28  0.001
  71   7 121.596 -228.1 12.54  0.001
  79   8 121.737 -226.0 14.59  0.000
  2    5  89.806 -169.0 71.59  0.000
  10   6  89.990 -167.1 73.46  0.000
  6    6  89.874 -166.9 73.69  0.000
  38   7  90.280 -165.4 75.17  0.000
  14   7  90.062 -165.0 75.61  0.000
  46   8  90.534 -163.6 77.00  0.000
  1    4  85.606 -162.8 77.79  0.000
  5    5  85.675 -160.8 79.85  0.000
  9    5  85.672 -160.8 79.85  0.000
  13   6  85.743 -158.7 81.96  0.000
  Models ranked by AICc(x) 
  Random terms (all models): 
    1 | Subject, 1 | Sex %in% Subject
  
  Global model call: lme.formula(fixed = log(distance) ~ rand1 * Sex * age + rand2, 
      data = Orthodont, random = ~1 | Subject/Sex, method = "ML")
  ---
  Model selection table 
      (Int) Sex     age        rn1      rn2 Sex:age Sex:rn1  age:rn1 Sex:age:rn1
  20  2.862   + 0.03170                           +                             
  4   2.910   + 0.02740                                                         
  28  2.860   + 0.03155            0.008319       +                             
  24  2.863   + 0.03169 -6.551e-04                +                             
  12  2.903   + 0.02735            0.015210                                     
  8   2.913   + 0.02739 -6.502e-03                                              
  32  2.861   + 0.03154 -9.581e-04 0.008360       +                             
  88  2.869   + 0.03111 -1.426e-02                +         0.001286            
  56  2.862   + 0.03170 -7.551e-05                +       +                     
  16  2.907   + 0.02734 -6.737e-03 0.015330                                     
  72  2.927   + 0.02609 -3.797e-02                          0.002982            
  40  2.912   + 0.02742 -5.057e-03                        +                     
  96  2.868   + 0.03089 -1.597e-02 0.008482       +         0.001419            
  64  2.861   + 0.03153 -1.158e-03 0.008385       +       +                     
  120 2.869   + 0.03112 -1.368e-02                +       + 0.001276            
  3   2.870     0.02740                                                         
  80  2.921   + 0.02597 -3.982e-02 0.015500                 0.003134            
  48  2.907   + 0.02734 -6.762e-03 0.015340               +                     
  104 2.926   + 0.02612 -3.651e-02                        + 0.002954            
  248 2.883   + 0.02982 -4.398e-02                +       + 0.004118           +
  128 2.868   + 0.03088 -1.640e-02 0.008527       +       + 0.001428            
  11  2.865     0.02737            0.011680                                     
  7   2.873     0.02739 -6.511e-03                                              
  112 2.921   + 0.02596 -4.024e-02 0.015550               + 0.003143            
  256 2.882   + 0.02956 -4.719e-02 0.008670       +       + 0.004315           +
  15  2.868     0.02735 -6.690e-03 0.011810                                     
  71  2.879     0.02681 -2.055e-02                          0.001331            
  79  2.875     0.02673 -2.163e-02 0.011860                 0.001417            
  2   3.211   +                                                                 
  10  3.202   +                    0.020510                                     
  6   3.216   +         -1.171e-02                                              
  38  3.228   +         -3.662e-02                        +                     
  14  3.207   +         -1.197e-02 0.020690                                     
  46  3.218   +         -3.898e-02 0.024110               +                     
  1   3.172                                                                     
  5   3.177             -1.185e-02                                              
  9   3.166                        0.012390                                     
  13  3.171             -1.201e-02 0.012580                                     
      df  logLik   AICc delta weight
  20   7 127.865 -240.6  0.00  0.344
  4    6 125.738 -238.6  1.97  0.129
  28   8 127.937 -238.4  2.19  0.115
  24   8 127.866 -238.3  2.33  0.107
  12   7 125.971 -236.8  3.79  0.052
  8    7 125.787 -236.5  4.16  0.043
  32   9 127.938 -236.0  4.57  0.035
  88   9 127.875 -235.9  4.70  0.033
  56   9 127.866 -235.9  4.71  0.033
  16   8 126.024 -234.6  6.02  0.017
  72   8 125.834 -234.2  6.40  0.014
  40   8 125.790 -234.1  6.49  0.013
  96  10 127.949 -233.6  6.98  0.010
  64  10 127.938 -233.6  7.00  0.010
  120 10 127.875 -233.5  7.13  0.010
  3    5 121.539 -232.5  8.12  0.006
  80   9 126.077 -232.3  8.29  0.005
  48   9 126.024 -232.2  8.40  0.005
  104  9 125.836 -231.8  8.77  0.004
  248 11 127.960 -231.2  9.44  0.003
  128 11 127.949 -231.1  9.46  0.003
  11   6 121.675 -230.5 10.09  0.002
  7    6 121.587 -230.3 10.27  0.002
  112 10 126.077 -229.9 10.72  0.002
  256 12 128.036 -228.8 11.82  0.001
  15   7 121.726 -228.3 12.28  0.001
  71   7 121.596 -228.1 12.54  0.001
  79   8 121.737 -226.0 14.59  0.000
  2    5  89.806 -169.0 71.59  0.000
  10   6  89.990 -167.1 73.46  0.000
  6    6  89.874 -166.9 73.69  0.000
  38   7  90.280 -165.4 75.17  0.000
  14   7  90.062 -165.0 75.61  0.000
  46   8  90.534 -163.6 77.00  0.000
  1    4  85.606 -162.8 77.79  0.000
  5    5  85.675 -160.8 79.85  0.000
  9    5  85.672 -160.8 79.85  0.000
  13   6  85.743 -158.7 81.96  0.000
  Models ranked by AICc(x) 
  Random terms (all models): 
    1 | Subject, 1 | Sex %in% Subject
  
  > 
  > #system.time(pdredge(fm2, cluster = clust))
  > #system.time(pdredge(fm2, cluster = F))
  > #system.time(dredge(fm2))
  > 
  > proc.time()
     user  system elapsed 
     5.92    0.28    8.57 
Running the tests in 'tests/quasibinomial.R' failed.
Complete output:
  > library("MuMIn")
  > options(na.action = na.fail)
  > 
  > budworm <- data.frame(ldose = rep(0:5, 2), numdead = c(1, 4, 9, 13, 18, 20, 0,
  + 	2, 6, 10, 12, 16), sex = factor(rep(c("M", "F"), c(6, 6))))
  > budworm$SF = cbind(numdead = budworm$numdead, numalive = 20 - budworm$numdead)
  > 
  > qbinomial <- function(...) {
  + 	res <- quasibinomial(...)
  + 	res$aic <- binomial(...)$aic
  + 	res
  + }
  > 
  > budworm.qqlg <- glm(SF ~ sex*ldose + sex*I(ldose^2), data = budworm, family = qbinomial)
  > budworm.lg <- glm(SF ~ sex*ldose + sex*I(ldose^2), data = budworm, family = binomial)
  > 
  > r.squaredLR(budworm.lg)
  [1] 0.9999606
  attr(,"adj.r.squared")
  [1] 0.9999631
  > r.squaredGLMM(budworm.lg)
                    R2m       R2c
  theoretical 0.9675480 0.9675480
  delta       0.9606046 0.9606046
  Warning messages:
  1: 'r.squaredGLMM' now calculates a revised statistic. See the help page. 
  2: the null model is correct only if all variables used by the original model remain unchanged. 
  > 
  > dd <- dredge(budworm.lg, rank = "QAIC", chat = summary(budworm.lg)$dispersion)
  Fixed term is "(Intercept)"
  > #dd <- dredge(budworm.lg) # should be the same
  > mod <- get.models(dd, subset = NA)
  > mod
  $`6`
  
  Call:  glm(formula = SF ~ ldose + sex + 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)        ldose         sexM  
       -3.473        1.064        1.101  
  
  Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 6.757 	AIC: 42.87
  
  $`14`
  
  Call:  glm(formula = SF ~ ldose + sex + ldose:sex + 1, family = binomial, 
      data = budworm)
  
  Coefficients:
  (Intercept)        ldose         sexM   ldose:sexM  
      -2.9935       0.9060       0.1750       0.3529  
  
  Degrees of Freedom: 11 Total (i.e. Null);  8 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 4.994 	AIC: 43.1
  
  $`8`
  
  Call:  glm(formula = SF ~ ldose + I(ldose^2) + sex + 1, family = binomial, 
      data = budworm)
  
  Coefficients:
  (Intercept)        ldose   I(ldose^2)         sexM  
      -3.8943       1.4882      -0.0794       1.1007  
  
  Degrees of Freedom: 11 Total (i.e. Null);  8 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 5.851 	AIC: 43.96
  
  $`24`
  
  Call:  glm(formula = SF ~ ldose + I(ldose^2) + sex + I(ldose^2):sex + 
      1, family = binomial, data = budworm)
  
  Coefficients:
      (Intercept)            ldose       I(ldose^2)             sexM  
         -3.38713          1.31397         -0.07619          0.46528  
  I(ldose^2):sexM  
          0.07283  
  
  Degrees of Freedom: 11 Total (i.e. Null);  7 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 3.871 	AIC: 43.98
  
  $`16`
  
  Call:  glm(formula = SF ~ ldose + I(ldose^2) + sex + ldose:sex + 1, 
      family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)        ldose   I(ldose^2)         sexM   ldose:sexM  
     -3.31770      1.20866     -0.05367      0.26718      0.30891  
  
  Degrees of Freedom: 11 Total (i.e. Null);  7 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 4.611 	AIC: 44.72
  
  $`32`
  
  Call:  glm(formula = SF ~ ldose + I(ldose^2) + sex + ldose:sex + I(ldose^2):sex + 
      1, family = binomial, data = budworm)
  
  Coefficients:
      (Intercept)            ldose       I(ldose^2)             sexM  
          -3.9473           1.7487          -0.1455           1.4145  
       ldose:sexM  I(ldose^2):sexM  
          -0.8364           0.2214  
  
  Degrees of Freedom: 11 Total (i.e. Null);  6 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 3.172 	AIC: 45.28
  
  $`23`
  
  Call:  glm(formula = SF ~ I(ldose^2) + sex + I(ldose^2):sex + 1, family = binomial, 
      data = budworm)
  
  Coefficients:
      (Intercept)       I(ldose^2)             sexM  I(ldose^2):sexM  
          -1.9416           0.1496           0.1586           0.1247  
  
  Degrees of Freedom: 11 Total (i.e. Null);  8 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 12.47 	AIC: 50.58
  
  $`2`
  
  Call:  glm(formula = SF ~ ldose + 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)        ldose  
       -2.766        1.007  
  
  Degrees of Freedom: 11 Total (i.e. Null);  10 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 16.98 	AIC: 51.09
  
  $`4`
  
  Call:  glm(formula = SF ~ ldose + I(ldose^2) + 1, family = binomial, 
      data = budworm)
  
  Coefficients:
  (Intercept)        ldose   I(ldose^2)  
     -3.17949      1.42087     -0.07754  
  
  Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 16.08 	AIC: 52.19
  
  $`7`
  
  Call:  glm(formula = SF ~ I(ldose^2) + sex + 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)   I(ldose^2)         sexM  
      -2.3477       0.1913       1.0387  
  
  Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 17.76 	AIC: 53.87
  
  $`3`
  
  Call:  glm(formula = SF ~ I(ldose^2) + 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)   I(ldose^2)  
      -1.7337       0.1817  
  
  Degrees of Freedom: 11 Total (i.e. Null);  10 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 27.43 	AIC: 61.54
  
  $`5`
  
  Call:  glm(formula = SF ~ sex + 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)         sexM  
      -0.4754       0.6425  
  
  Degrees of Freedom: 11 Total (i.e. Null);  10 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 118.8 	AIC: 152.9
  
  $`1`
  
  Call:  glm(formula = SF ~ 1, family = binomial, data = budworm)
  
  Coefficients:
  (Intercept)  
      -0.1503  
  
  Degrees of Freedom: 11 Total (i.e. Null);  11 Residual
  Null Deviance:	    124.9 
  Residual Deviance: 124.9 	AIC: 157
  
  attr(,"rank")
  function (x) 
  do.call("rank", list(x, chat = 1))
  <environment: 0x0000027d79008068>
  attr(,"call")
  QAIC(x, chat = 1)
  attr(,"class")
  [1] "function"     "rankFunction"
  attr(,"beta")
  [1] "none"
  > 
  > # Note: this works:
  > # ma <- model.avg(mod)
  > # but this will not: ('rank' attribute passed from 'dredge' is lost)
  > # ma <- model.avg(mod)
  > # so, need to supply them
  > 
  > model.avg(mod[1:5], rank = "QAICc", rank.args = list(chat = 0.403111))
  
  Call:
  model.avg(object = mod[1:5], rank = "QAICc", rank.args = list(chat = 0.403111))
  
  Component models: 
  '23'   '235'  '123'  '1234' '1235'
  
  Coefficients: 
         (Intercept)  ldose      sexM ldose:sexM   I(ldose^2) I(ldose^2):sexM
  full     -3.437418 1.0877 0.9353745 0.05998441 -0.009801539    0.0008955918
  subset   -3.437418 1.0877 0.9353745 0.35072750 -0.077366047    0.0728311378
  Warning messages:
  1: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  2: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  3: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  4: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  5: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  6: In .aic(list(object, ...), chat, k, REML, function(ll, chat, k,  :
    'chat' given is < 1, increased to 1
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     1.50    0.15    1.59 
Running the tests in 'tests/rlm.R' failed.
Complete output:
  > if (MuMIn:::testStart("MASS")) {
  + 
  +     data(Cement, package = "MuMIn")
  + 
  +     nseq <- function(x, len = length(x)) 
  +         seq(min(x, na.rm = TRUE), max(x, na.rm = TRUE), length = len)
  + 
  +     fm1 <- rlm(y ~X1 + X2 * X3 + X4, data = Cement)
  +     dd <- dredge(fm1, trace = TRUE)
  +     gm <- get.models(dd, subset = 1:10)
  +     ma <- model.avg(gm)
  +     stopifnot(all(predict(ma) == predict(ma, Cement)))
  +     predict(ma, lapply(Cement, nseq, len = 30), se.fit = TRUE)
  +     vcov(ma)
  + }
  Loading required package: MuMIn
  Fixed term is "(Intercept)"
  0 : rlm(formula = y ~ 1, data = Cement)
  1 : rlm(formula = y ~ X1 + 1, data = Cement)
  2 : rlm(formula = y ~ X2 + 1, data = Cement)
  3 : rlm(formula = y ~ X1 + X2 + 1, data = Cement)
  4 : rlm(formula = y ~ X3 + 1, data = Cement)
  5 : rlm(formula = y ~ X1 + X3 + 1, data = Cement)
  6 : rlm(formula = y ~ X2 + X3 + 1, data = Cement)
  7 : rlm(formula = y ~ X1 + X2 + X3 + 1, data = Cement)
  8 : rlm(formula = y ~ X4 + 1, data = Cement)
  9 : rlm(formula = y ~ X1 + X4 + 1, data = Cement)
  10 : rlm(formula = y ~ X2 + X4 + 1, data = Cement)
  11 : rlm(formula = y ~ X1 + X2 + X4 + 1, data = Cement)
  12 : rlm(formula = y ~ X3 + X4 + 1, data = Cement)
  13 : rlm(formula = y ~ X1 + X3 + X4 + 1, data = Cement)
  14 : rlm(formula = y ~ X2 + X3 + X4 + 1, data = Cement)
  15 : rlm(formula = y ~ X1 + X2 + X3 + X4 + 1, data = Cement)
  22 : rlm(formula = y ~ X2 + X3 + X2:X3 + 1, data = Cement)
  23 : rlm(formula = y ~ X1 + X2 + X3 + X2:X3 + 1, data = Cement)
  30 : rlm(formula = y ~ X2 + X3 + X4 + X2:X3 + 1, data = Cement)
  31 : rlm(formula = y ~ X1 + X2 + X3 + X4 + X2:X3 + 1, data = Cement)
              (Intercept)            X1            X2            X3           X4
  (Intercept) 657.3291410 -2.7536391499 -3.5010654693 -17.745284127 -7.683626226
  X1           -2.7536391  0.0488568894  0.0034839126   0.150515200  0.024212557
  X2           -3.5010655  0.0034839126  0.0403462579   0.148368689  0.097570988
  X3          -17.7452841  0.1505151999  0.1483686893   0.227058309  0.188165359
  X4           -7.6836262  0.0242125572  0.0975709883   0.188165359  0.082900719
  X2:X3         0.0148248  0.0006357005 -0.0009424436  -0.003691552  0.003716187
                      X2:X3
  (Intercept)  0.0148247985
  X1           0.0006357005
  X2          -0.0009424436
  X3          -0.0036915519
  X4           0.0037161868
  X2:X3        0.0001039456
  > 
  > proc.time()
     user  system elapsed 
     1.60    0.21    1.76 
Running the tests in 'tests/survival.R' failed.
Complete output:
  > if (MuMIn:::testStart("survival")) {
  + 
  +     bladder1 <- bladder[bladder$enum < 5, ]
  + 
  +     fmcph <- coxph(Surv(stop, event) ~ (rx + size + number) * strata(enum) + cluster(id), bladder1)
  + 
  +     r.squared.coxph <- function(object, ...) {
  +         logtest <- -2 * (object$loglik[1L] - object$loglik[2L])
  +         c(rsq = 1 - exp(-logtest/object$n), maxrsq = 1 - exp(2 * object$loglik[1L]/object$n))
  +     }
  + 
  +     getAllTerms(fmcph)
  +     coef(fmcph)
  + 
  +     ms <- dredge(fmcph, fixed=c("strata(enum)"), 
  +         extra = list(R2 = "r.squared.coxph"), trace = TRUE)
  + 
  + 
  +     # BUG in survival
  +     if(! "logLik.coxph.null" %in% methods("logLik"))
  +         registerS3method("logLik", "coxph.null", survival:::logLik.coxph.null)
  + 
  +     summary(model.avg(ms[1:10]))
  + 
  +     fits <- get.models(ms, delta < 5)
  +     summary(model.avg(fits))
  + 
  +     ####
  + 
  +     lung <- na.omit(lung)
  +     fm <- coxph(Surv(time, status) ~ ph.ecog + tt(age), data=lung,
  +          tt=function(x,t,...) pspline(x + t/365.25))
  +     ma <- model.avg(dredge(fm))
  +     coef(ma)
  +     coefTable(ma)
  +     ####
  + 
  +     fmsrvrg <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='weibull',
  +         scale = 1, cluster = rx)
  + 
  +     r.squaredLR(fmsrvrg)
  +     
  +     #null <- survreg(Surv(futime, fustat) ~ 1, ovarian, dist='weibull', scale = 1)
  +     #R2survreg <- function(x) r.squaredLR(x, null = null)
  +     #dredge(fmsrvrg, extra = "R2survreg")
  +     
  +     summary(model.avg(dredge(fmsrvrg), delta  < 4))
  + 
  +     fmsrvrg2 <- survreg(Surv(futime, fustat) ~ ecog.ps + rx, ovarian, dist='weibull')
  + 
  +     fmsrvrg3 <- survreg(Surv(time, status) ~ ph.ecog + age + strata(sex), lung,
  +           na.action = "na.omit")
  +     
  +     r.squaredLR(fmsrvrg3)
  + 
  + 
  +     coefTable(fmsrvrg)
  +     coefTable(fmsrvrg2)
  +     coefTable(fmsrvrg3)
  + }
  Loading required package: MuMIn
  Fixed terms are "strata(enum)" and "(Intercept)"
  0 : coxph(formula = Surv(stop, event) ~ strata(enum), data = bladder1, 
      cluster = id)
  1 : coxph(formula = Surv(stop, event) ~ number + strata(enum), data = bladder1, 
      cluster = id)
  2 : coxph(formula = Surv(stop, event) ~ rx + strata(enum), data = bladder1, 
      cluster = id)
  3 : coxph(formula = Surv(stop, event) ~ number + rx + strata(enum), 
      data = bladder1, cluster = id)
  4 : coxph(formula = Surv(stop, event) ~ size + strata(enum), data = bladder1, 
      cluster = id)
  5 : coxph(formula = Surv(stop, event) ~ number + size + strata(enum), 
      data = bladder1, cluster = id)
  6 : coxph(formula = Surv(stop, event) ~ rx + size + strata(enum), 
      data = bladder1, cluster = id)
  7 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum), 
      data = bladder1, cluster = id)
  9 : coxph(formula = Surv(stop, event) ~ number + strata(enum) + number:strata(enum), 
      data = bladder1, cluster = id)
  11 : coxph(formula = Surv(stop, event) ~ number + rx + strata(enum) + 
      number:strata(enum), data = bladder1, cluster = id)
  13 : coxph(formula = Surv(stop, event) ~ number + size + strata(enum) + 
      number:strata(enum), data = bladder1, cluster = id)
  15 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      number:strata(enum), data = bladder1, cluster = id)
  18 : coxph(formula = Surv(stop, event) ~ rx + strata(enum) + rx:strata(enum), 
      data = bladder1, cluster = id)
  19 : coxph(formula = Surv(stop, event) ~ number + rx + strata(enum) + 
      rx:strata(enum), data = bladder1, cluster = id)
  22 : coxph(formula = Surv(stop, event) ~ rx + size + strata(enum) + 
      rx:strata(enum), data = bladder1, cluster = id)
  23 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      rx:strata(enum), data = bladder1, cluster = id)
  27 : coxph(formula = Surv(stop, event) ~ number + rx + strata(enum) + 
      number:strata(enum) + rx:strata(enum), data = bladder1, cluster = id)
  31 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      number:strata(enum) + rx:strata(enum), data = bladder1, cluster = id)
  36 : coxph(formula = Surv(stop, event) ~ size + strata(enum) + size:strata(enum), 
      data = bladder1, cluster = id)
  37 : coxph(formula = Surv(stop, event) ~ number + size + strata(enum) + 
      size:strata(enum), data = bladder1, cluster = id)
  38 : coxph(formula = Surv(stop, event) ~ rx + size + strata(enum) + 
      size:strata(enum), data = bladder1, cluster = id)
  39 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      size:strata(enum), data = bladder1, cluster = id)
  45 : coxph(formula = Surv(stop, event) ~ number + size + strata(enum) + 
      number:strata(enum) + size:strata(enum), data = bladder1, 
      cluster = id)
  47 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      number:strata(enum) + size:strata(enum), data = bladder1, 
      cluster = id)
  54 : coxph(formula = Surv(stop, event) ~ rx + size + strata(enum) + 
      rx:strata(enum) + size:strata(enum), data = bladder1, cluster = id)
  55 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      rx:strata(enum) + size:strata(enum), data = bladder1, cluster = id)
  63 : coxph(formula = Surv(stop, event) ~ number + rx + size + strata(enum) + 
      number:strata(enum) + rx:strata(enum) + size:strata(enum), 
      data = bladder1, cluster = id)
  Fixed term is "(Intercept)"
  Fixed term is "(Intercept)"
  Fixed term is "(Intercept)"
                     Estimate Std. Error
  (Intercept)       6.6737246     0.4875
  ph.ecog          -0.3266802     0.1042
  age              -0.0046787     0.0081
  Log(scale):sex=1 -0.2746477     0.0904
  Log(scale):sex=2 -0.3899741     0.1273
  > 
  > proc.time()
     user  system elapsed 
     2.17    0.29    2.46