Running 'test_functions.R'
Running the tests in 'tests/test_functions.R' failed.
Complete output:
  > library(mlogitBMA)
  Loading required package: BMA
  Loading required package: survival
  Loading required package: leaps
  Loading required package: robustbase
  
  Attaching package: 'robustbase'
  
  The following object is masked from 'package:survival':
  
      heart
  
  Loading required package: inline
  Loading required package: rrcov
  Scalable Robust Estimators with High Breakdown Point (version 1.5-5)
  
  Loading required package: abind
  Loading required package: maxLik
  Loading required package: miscTools
  
  Attaching package: 'miscTools'
  
  The following objects are masked from 'package:robustbase':
  
      colMedians, rowMedians
  
  
  Please cite the 'maxLik' package as:
  Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.
  
  If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
  https://r-forge.r-project.org/projects/maxlik/
  > 
  > test.specification <- function() {
  + 	spec <- mnl.spec(choice ~ fuel + price + cost | hsg2, Car,
  + 					varying=5:ncol(Car), sep='')
  + 	stopifnot(all(dim(spec$variable.used) == c(6,4)))
  + 	stopifnot(all(spec$varying.names == c('fuel', 'price', 'cost')))
  + 	stopifnot(sum(spec$same.coefs) == 3 & !spec$same.coefs['hsg2'])
  + 	stopifnot(sum(spec$intercepts)==5 &  !spec$intercepts[1])
  + 	cat('\nSpecification test OK.\n')
  + }
  > 
  > test.estimation.car <- function() {
  + 	cat('\nRunning test for MNL estimation on Car dataset ... ')
  + 	est <- estimate.mlogit(choice ~ price + cost | coml5, Car, 
  + 						varying=5:ncol(Car), sep='')
  + 	sest <- summary(est)
  + 	stopifnot(all(dim(sest$coefs) == c(12, 4)))
  + 	stopifnot(sest$lratio > 0.1)
  + 	cat(' OK.\n')
  + }
  > 
  > test.estimation.catsup <- function() {
  + 	cat('\nRunning test for MNL estimation on Catsup dataset ... ')
  + 	est <- estimate.mlogit(choice ~ disp + feat + price, Catsup, 
  + 						varying=2:(ncol(Catsup)-1), sep='.')
  + 	sest <- summary(est)
  + 	stopifnot(all(dim(sest$coefs) == c(6, 4)))
  + 	stopifnot(sest$lratio > 0.3)
  + 	stopifnot(sest$bic > 5083)
  + 	print(sest)
  + 	cat(' OK.\n')
  + }
  > 
  > test.bic.mlogit.car <- function() {
  + 	cat('\nRunning test for BMA on Car dataset ... ')
  + 	res <- bic.mlogit(choice ~ price + cost  + speed + acc + size | hsg2, Car, 
  + 						varying=5:ncol(Car), sep='', include.intercepts = FALSE, 
  + 						verbose = TRUE)
  + 	stopifnot(all(dim(res$bic.glm$which)==c(1,14))) # 1 model selected, 14 variables in total
  + 	cat('... BMA test OK.\n')
  + }
  > 
  > test.bic.mlogit.catsup <- function() {
  + 	cat('\nRunning test for BMA on Catsup dataset ... ')
  + 	res <- bic.mlogit(choice ~ 1 | disp + feat + price, Catsup, 
  + 						varying=2:(ncol(Catsup)-1), sep='.', 
  + 						base.choice = 4, 
  + 						include.intercepts = FALSE, 
  + 						verbose = TRUE)
  + 	summary(res)
  + 	stopifnot(all(dim(res$bic.glm$which)==c(2,11))) # 2 models selected, 11 variables in total
  + 	cat('... BMA test OK.\n')
  + 	est.res <- estimate.mlogit(res, Catsup)
  + 	stopifnot(length(est.res)==2)
  + 	stopifnot(all(dim(est.res[[1]]$coefs) == c(12, 4)))
  + 	stopifnot(all(dim(est.res[[2]]$coefs) == c(11, 4)))
  + 	cat('Estimation on the BMA object OK.\n')
  + }
  > 
  > # load data
  > data('Car', package='mlogit')
  Error in find.package(package, lib.loc, verbose = verbose) : 
    there is no package called 'mlogit'
  Calls: data -> find.package
  Execution halted