Package check result: OK Changes to worse in reverse depends: Package: MCARtest Check: examples New result: ERROR Running examples in ‘MCARtest-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: MCAR_meancovTest > ### Title: Carry out a test of MCAR using first and second moments. > ### Aliases: MCAR_meancovTest > > ### ** Examples > > library(MASS) > alpha = 0.05 > B = 20 > m = 500 > > SigmaS=list() #Random 2x2 correlation matrices (necessarily consistent) > for(j in 1:3){ + x=runif(2,min=-1,max=1); y=runif(2,min=-1,max=1) + SigmaS[[j]]=cov2cor(x%*%t(x) + y%*%t(y)) + } > > X1 = mvrnorm(m, c(0,0), SigmaS[[1]]) > X2 = mvrnorm(m, c(0,0), SigmaS[[2]]) > X3 = mvrnorm(m, c(0,0), SigmaS[[3]]) > columns = c("X1","X2","X3") > X = data.frame(matrix(nrow = 3*m, ncol = 3)) > X[1:m, c("X1", "X2")] = X1 > X[(m+1):(2*m), c("X2", "X3")] = X2 > X[(2*m+1):(3*m), c("X1", "X3")] = X3 > X = as.matrix(X) > > MCAR_meancovTest(X, alpha, B) Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Warning in cov2cor(C_S[[i]]) : diag(V) had non-positive or NA entries; the non-finite result may be dubious Error in eigen(SigmaS[[i]]) : infinite or missing values in 'x' Calls: MCAR_meancovTest -> eigen Execution halted