* using log directory ‘/srv/hornik/tmp/CRAN_pretest/scalablebayesm.Rcheck’ * using R Under development (unstable) (2025-02-14 r87718) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 19.1.6 (1+b1) Debian flang-new version 19.1.6 (1+b1) * running under: Debian GNU/Linux trixie/sid * using session charset: UTF-8 * checking for file ‘scalablebayesm/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘scalablebayesm’ version ‘0.2’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [3s/3s] NOTE Maintainer: ‘Federico Bumbaca ’ New submission Possibly misspelled words in DESCRIPTION: Bumbaca (19:104) Misra (19:124) Rossi (19:137) Scalable (19:188) * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking serialization versions ... OK * checking whether package ‘scalablebayesm’ can be installed ... [58s/58s] OK * used C++ compiler: ‘Debian clang version 19.1.7 (1+b1)’ * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s/0s] OK * checking whether the package can be loaded with stated dependencies ... [0s/0s] OK * checking whether the package can be unloaded cleanly ... [0s/0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK * checking whether the namespace can be unloaded cleanly ... [0s/0s] OK * checking loading without being on the library search path ... [0s/0s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [4s/4s] OK * checking Rd files ... [0s/0s] OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking examples ... [48s/48s] ERROR Running examples in ‘scalablebayesm-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: rheteroMnlIndepMetrop > ### Title: Independence Metropolis-Hastings Algorithm for Draws From > ### Multinomial Distribution > ### Aliases: rheteroMnlIndepMetrop > > ### ** Examples > > > > R=500 > set.seed(66) > > ######### Single Component with rhierMnlRwMixtureParallel######## > ##parameters > p=3 # num of choice alterns > ncoef=3 > nlgt=2000 > nz=2 > Z=matrix(runif(nz*nlgt),ncol=nz) > Z=t(t(Z)-apply(Z,2,mean)) # demean Z > > ncomp=1 # no of mixture components > Delta=matrix(c(1,0,1,0,1,2),ncol=2) > comps=NULL > comps[[1]]=list(mu=c(0,2,1),rooti=diag(rep(1,3))) > pvec=c(1) > > simmnlwX= function(n,X,beta){ + k=length(beta) + Xbeta=X %*% beta + j=nrow(Xbeta)/n + Xbeta=matrix(Xbeta,byrow=TRUE,ncol=j) + Prob=exp(Xbeta) + iota=c(rep(1,j)) + denom=Prob %*% iota + Prob=Prob/as.vector(denom) + y=vector("double",n) + ind=1:j + for (i in 1:n) { + yvec = rmultinom(1, 1, Prob[i,]) + y[i] = ind%*%yvec + } + return(list(y=y,X=X,beta=beta,prob=Prob)) + } > > ## simulate data > simlgtdata=NULL > ni=rep(5,nlgt) > for (i in 1:nlgt) + { + if (is.null(Z)) + { + betai=as.vector(bayesm::rmixture(1,pvec,comps)$x) + } else { + betai=Delta %*% Z[i,]+as.vector(bayesm::rmixture(1,pvec,comps)$x) + } + Xa=matrix(runif(ni[i]*p,min=-1.5,max=0),ncol=p) + X=bayesm::createX(p,na=1,nd=NULL,Xa=Xa,Xd=NULL,base=1) + outa=simmnlwX(ni[i],X,betai) + simlgtdata[[i]]=list(y=outa$y,X=X,beta=betai) + } > > ## set MCMC parameters > Prior1=list(ncomp=ncomp) > keep=1 > Mcmc1=list(R=R,keep=keep) > Data1=list(list(p=p,lgtdata=simlgtdata,Z=Z)) > s = 1 > Data2 = partition_data(Data1, s=s) Data already partitioned into 1 shards> > out2 = parallel::mclapply(Data2, FUN = rhierMnlRwMixtureParallel, Prior = Prior1, + Mcmc = Mcmc1,mc.cores = s, mc.set.seed = FALSE) Table of Y values pooled over all units ypooled 1 2 3 1354 1642 7004 Starting MCMC Inference for Hierarchical Logit: Normal Mixture with 1 components for first stage prior 3 alternatives; 3 variables in X for 2000 cross-sectional units Prior Parameters: nu = 6 v [,1] [,2] [,3] [1,] 6 0 0 [2,] 0 6 0 [3,] 0 0 6 mubar [,1] [,2] [,3] [1,] 0 0 0 amu [,1] [1,] 0.01 a [1] 5 deltabar [1] 0 0 0 0 0 0 ad [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.01 0.00 0.00 0.00 0.00 0.00 [2,] 0.00 0.01 0.00 0.00 0.00 0.00 [3,] 0.00 0.00 0.01 0.00 0.00 0.00 [4,] 0.00 0.00 0.00 0.01 0.00 0.00 [5,] 0.00 0.00 0.00 0.00 0.01 0.00 [6,] 0.00 0.00 0.00 0.00 0.00 0.01 MCMC Parameters: s= 1.374 w= 0.1 r= 500 keep= 1 nprint= 100 initializing Metropolis candidate densities for 2000 units ... MCMC Iteration (est time to end - min) 100 (0.1) 200 (0.1) 300 (0.0) 400 (0.0) 500 (0.0) Total Time Elapsed: 0.07 > > betadraws = parallel::mclapply(out2,FUN=drawPosteriorParallel,Z=Z, + Prior = Prior1, Mcmc = Mcmc1, mc.cores=s,mc.set.seed = FALSE) > betadraws = combine_draws(betadraws, R) > > out_indep = parallel::mclapply(Data2, FUN=rheteroMnlIndepMetrop, draws = betadraws, + Mcmc = Mcmc1, Prior = Prior1, mc.cores = s, mc.set.seed = FALSE) Error in FUN(X[[i]], ...) : unused argument (Prior = list(1)) Calls: -> lapply Execution halted Examples with CPU (user + system) or elapsed time > 5s user system elapsed rheteroLinearIndepMetrop 18.256 0.048 18.308 drawMixture 12.560 0.032 12.596 drawPosteriorParallel 11.205 0.004 11.212 * checking PDF version of manual ... [3s/3s] OK * checking HTML version of manual ... [1s/1s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE