Running ‘testthat.R’ [220s/325s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(JointAI)
  Please report any bugs to the package maintainer (https://github.com/NErler/JointAI/issues).
  > 
  > test_check("JointAI")
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  
  Running clm models...
  ── Skip (test-clm.R:126:3): data_list remains the same ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test-clm.R:131:3): jagsmodel remains the same ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test-clm.R:137:3): GRcrit and MCerror give same result ────────────────
  Reason: On CRAN
  
  ── Skip (test-clm.R:144:3): summary output remained the same on Windows ────────
  Reason: On CRAN
  
  ── Skip (test-clm.R:154:3): summary output remained the same on non-Windows ────
  Reason: On CRAN
  
  ── Warning (test-clm.R:166:3): prediction works ────────────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  ── Warning (test-clm.R:235:3): wrong models give errors ────────────────────────
  
  It is currently not possible to use "contr.poly" for incomplete
  categorical covariates. I will use "contr.treatment" instead.  You can
  specify (globally) which types of contrasts are used by changing
  "options('contrasts')".
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  
  It is currently not possible to use "contr.poly" for incomplete
  categorical covariates. I will use "contr.treatment" instead.  You can
  specify (globally) which types of contrasts are used by changing
  "options('contrasts')".
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clm.R:237:3): wrong models give errors ────────────────────────
  '^' is not meaningful for ordered factors
  
  Error in rjags::jags.model(file = modelfile, data = data_list, inits = inits,  : 
    RUNTIME ERROR:
  Unable to resolve the following parameters:
  M_lvlone[1,4] (line 6)
  M_lvlone[2,4] (line 6)
  M_lvlone[3,4] (line 6)
  M_lvlone[4,4] (line 6)
  M_lvlone[5,4] (line 6)
  M_lvlone[6,4] (line 6)
  M_lvlone[7,4] (line 6)
  M_lvlone[8,4] (line 6)
  M_lvlone[9,4] (line 6)
  M_lvlone[10,4] (line 6)
  M_lvlone[11,4] (line 6)
  M_lvlone[12,4] (line 6)
  M_lvlone[13,4] (line 6)
  M_lvlone[14,4] (line 6)
  M_lvlone[15,4] (line 6)
  M_lvlone[16,4] (line 6)
  M_lvlone[17,4] (line 6)
  M_lvlone[18,4] (line 6)
  M_lvlone[19,4] (line 6)
  M_lvlone[20,4] (line 6)
  M_lvlone[21,4] (line 6)
  M_lvlone[22,4] (line 6)
  M_lvlone[23,4] (line 6)
  M_lvlone[24,4] (line 6)
  M_lvlone[25,4] (line 6)
  M_lvlone[26,4] (line 6)
  M_lvlone[27,4] (line 6)
  M_lvlone[28,4] (line 6)
  M_lvlone[29,4] (line 6)
  M_lvlone[30,4] (line 6)
  M_lvlone[31,4] (line 6)
  M_lvlone[32,4] (line 6)
  M_lvlone[33,4] (line 6)
  M_lvlone[34,4] (line 6)
  M_lvlone[35,4] (line 6)
  M_lvlone[36,4] (line 6)
  M_lvlone[37,4] (line 6)
  M_lvlone[38,4] (line 6)
  M_lvlone[39,4] (line 6)
  M_lvlone[40,4
  ── Warning (test-clm.R:239:3): wrong models give errors ────────────────────────
  
  It is currently not possible to use "contr.poly" for incomplete
  categorical covariates. I will use "contr.treatment" instead.  You can
  specify (globally) which types of contrasts are used by changing
  "options('contrasts')".
  
  
  Running clmm models...
  ── Skip (test-clmm.R:180:3): data_list remains the same ────────────────────────
  Reason: On CRAN
  
  ── Skip (test-clmm.R:185:3): jagsmodel remains the same ────────────────────────
  Reason: On CRAN
  
  ── Skip (test-clmm.R:191:3): GRcrit and MCerror give same result ───────────────
  Reason: On CRAN
  
  ── Skip (test-clmm.R:198:3): summary output remained the same on Windows ───────
  Reason: On CRAN
  
  ── Skip (test-clmm.R:208:3): summary output remained the same on non-Windows ───
  Reason: On CRAN
  
  ── Warning (test-clmm.R:219:3): prediction works ───────────────────────────────
  
  Prediction in multi-level settings currently only takes into account
  the fixed effects, i.e., assumes that the random effect realizations
  are equal to zero.
  
  ── Warning (test-clmm.R:219:3): prediction works ───────────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  ── Warning (test-clmm.R:271:3): residuals work if implemented ──────────────────
  
  It is not yet possible to obtain residuals conditional on the random
  effects in multi-level settings.
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-clmm.R:296:3): wrong models give errors ───────────────────────
  '^' is not meaningful for ordered factors
  
  Error in rjags::jags.model(file = modelfile, data = data_list, inits = inits,  : 
    RUNTIME ERROR:
  Unable to resolve the following parameters:
  M_id[1,3] (line 21)
  M_id[2,3] (line 21)
  M_id[3,3] (line 21)
  M_id[4,3] (line 21)
  M_id[5,3] (line 21)
  M_id[6,3] (line 21)
  M_id[7,3] (line 21)
  M_id[8,3] (line 21)
  M_id[9,3] (line 21)
  M_id[10,3] (line 21)
  M_id[11,3] (line 21)
  M_id[12,3] (line 21)
  M_id[13,3] (line 21)
  M_id[14,3] (line 21)
  M_id[15,3] (line 21)
  M_id[16,3] (line 21)
  M_id[17,3] (line 21)
  M_id[18,3] (line 21)
  M_id[19,3] (line 21)
  M_id[20,3] (line 21)
  M_id[21,3] (line 21)
  M_id[22,3] (line 21)
  M_id[23,3] (line 21)
  M_id[24,3] (line 21)
  M_id[25,3] (line 21)
  M_id[26,3] (line 21)
  M_id[27,3] (line 21)
  M_id[28,3] (line 21)
  M_id[29,3] (line 21)
  M_id[30,3] (line 21)
  M_id[31,3] (line 21)
  M_id[32,3] (line 21)
  M_id[33,3] (line 21)
  M_id[34,3] (line 21)
  M_id[35,3] (line 21)
  M_id[36,3] (line 21)
  M_id[37,3] (line 21)
  M_id[38,3] (line 21)
  M_id[39,3] (line 21)
  M_id[40,3] (line 21)
  M_id[41,3] (line 21)
  M_id[42,3] (line 21)
  M_id[43,3] (line 21)
  M_id[44,3] (line 21)
  M_id[45,3] (line 21)
  M_id
  ── Warning (test-clmm.R:299:3): wrong models give errors ───────────────────────
  
  It is currently not possible to use "contr.poly" for incomplete
  categorical covariates. I will use "contr.treatment" instead.  You can
  specify (globally) which types of contrasts are used by changing
  "options('contrasts')".
  
  
  Running glm models...
  ── Skip (test-glm.R:300:3): data_list remains the same ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test-glm.R:305:3): jagsmodel remains the same ─────────────────────────
  Reason: On CRAN
  
  ── Skip (test-glm.R:310:3): GRcrit and MCerror give same result ────────────────
  Reason: On CRAN
  
  ── Skip (test-glm.R:317:3): summary output remained the same ───────────────────
  Reason: On CRAN
  
  ── Warning (test-glm.R:358:7): residuals ───────────────────────────────────────
  NaNs produced
  
  ── Warning (test-glm.R:358:7): residuals ───────────────────────────────────────
  NaNs produced
  
  ── Warning (test-helpfunctions.R:16:5): extract_id works ───────────────────────
  
  No "id" variable could be identified. I will assume that all
  observations are independent.
  
  ── Warning (test-helpfunctions_formulas.R:46:5): extract_id works ──────────────
  
  No "id" variable could be identified. I will assume that all
  observations are independent.
  
  ── Warning (test-helpfunctions_formulas.R:46:5): extract_id works ──────────────
  
  No "id" variable could be identified. I will assume that all
  observations are independent.
  
  
  Running mlogit models...
  ── Skip (test-mlogit.R:85:3): data_list remains the same ───────────────────────
  Reason: On CRAN
  
  ── Skip (test-mlogit.R:90:3): jagsmodel remains the same ───────────────────────
  Reason: On CRAN
  
  ── Skip (test-mlogit.R:96:3): GRcrit and MCerror give same result ──────────────
  Reason: On CRAN
  
  ── Skip (test-mlogit.R:103:3): summary output remained the same ────────────────
  Reason: On CRAN
  
  ── Warning (test-mlogit.R:113:3): prediction works ─────────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  ── Warning (test-mlogit.R:129:3): prediction works ─────────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  
  Running mlogitmm models...
  ── Skip (test-mlogitmm.R:126:3): data_list remains the same ────────────────────
  Reason: On CRAN
  
  ── Skip (test-mlogitmm.R:131:3): jagsmodel remains the same ────────────────────
  Reason: On CRAN
  
  ── Skip (test-mlogitmm.R:136:3): GRcrit and MCerror give same result ───────────
  Reason: On CRAN
  
  ── Skip (test-mlogitmm.R:143:3): summary output remained the same ──────────────
  Reason: On CRAN
  
  ── Warning (test-mlogitmm.R:153:3): prediction works ───────────────────────────
  
  Prediction in multi-level settings currently only takes into account
  the fixed effects, i.e., assumes that the random effect realizations
  are equal to zero.
  
  ── Warning (test-mlogitmm.R:153:3): prediction works ───────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  ── Warning (test-mlogitmm.R:193:3): residuals work if implemented ──────────────
  
  It is not yet possible to obtain residuals conditional on the random
  effects in multi-level settings.
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  ── Warning (test-mlogitmm.R:219:3): wrong models give errors ───────────────────
  '^' is not meaningful for ordered factors
  
  Error in rjags::jags.model(file = modelfile, data = data_list, inits = inits,  : 
    RUNTIME ERROR:
  Unable to resolve the following parameters:
  M_id[1,3] (line 14, 19)
  M_id[2,3] (line 14, 19)
  M_id[3,3] (line 14, 19)
  M_id[4,3] (line 14, 19)
  M_id[5,3] (line 14, 19)
  M_id[6,3] (line 14, 19)
  M_id[7,3] (line 14, 19)
  M_id[8,3] (line 14, 19)
  M_id[9,3] (line 14, 19)
  M_id[10,3] (line 14, 19)
  M_id[11,3] (line 14, 19)
  M_id[12,3] (line 14, 19)
  M_id[13,3] (line 14, 19)
  M_id[14,3] (line 14, 19)
  M_id[15,3] (line 14, 19)
  M_id[16,3] (line 14, 19)
  M_id[17,3] (line 14, 19)
  M_id[18,3] (line 14, 19)
  M_id[19,3] (line 14, 19)
  M_id[20,3] (line 14, 19)
  M_id[21,3] (line 14, 19)
  M_id[22,3] (line 14, 19)
  M_id[23,3] (line 14, 19)
  M_id[24,3] (line 14, 19)
  M_id[25,3] (line 14, 19)
  M_id[26,3] (line 14, 19)
  M_id[27,3] (line 14, 19)
  M_id[28,3] (line 14, 19)
  M_id[29,3] (line 14, 19)
  M_id[30,3] (line 14, 19)
  M_id[31,3] (line 14, 19)
  M_id[32,3] (line 14, 19)
  M_id[33,3] (line 14, 19)
  M_id[34,3] (line 14, 19)
  M_id[35,3] (line 14, 19)
  M_id[36,3] (line 14, 19)
  M_id[37,3] (line 14, 19)
  M_id[38,3] (line 14, 19)
  NOTE: Stopping adaptation
  
  
  NOTE: Stopping adaptation
  
  
  ── Warning (test-survival.R:15:3): JM ──────────────────────────────────────────
  
  It is currently not possible to use "contr.poly" for incomplete
  categorical covariates. I will use "contr.treatment" instead.  You can
  specify (globally) which types of contrasts are used by changing
  "options('contrasts')".
  
  ── Warning (test-survival.R:15:3): JM ──────────────────────────────────────────
  Adaptation incomplete
  
  NOTE: Stopping adaptation
  
  
  ── ERROR (test-survival.R:29:3): fill_locf works ───────────────────────────────
  Error: cannot xtfrm 'x'
  Backtrace:
      █
   1. └─JointAI:::fill_locf(...) test-survival.R:29:2
   2.   ├─data[order(data[timevar]), ]
   3.   ├─base::`[.data.frame`(data, order(data[timevar]), )
   4.   └─base::order(data[timevar])
   5.     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   6.       └─base:::FUN(X[[i]], ...)
   7.         ├─base::as.vector(xtfrm(x))
   8.         ├─base::xtfrm(x)
   9.         └─base::xtfrm.default(x)
  
  
  Running survreg models...
  ── Skip (test-survreg.R:95:3): data_list remains the same ──────────────────────
  Reason: On CRAN
  
  ── Skip (test-survreg.R:100:3): jagsmodel remains the same ─────────────────────
  Reason: On CRAN
  
  ── Skip (test-survreg.R:106:3): GRcrit and MCerror give same result ────────────
  Reason: On CRAN
  
  ── Skip (test-survreg.R:113:3): summary output remained the same ───────────────
  Reason: On CRAN
  
  ── Warning (test-survreg.R:124:3): prediction works ────────────────────────────
  
  Prediction in multi-level settings currently only takes into account
  the fixed effects, i.e., assumes that the random effect realizations
  are equal to zero.
  
  ── Warning (test-survreg.R:124:3): prediction works ────────────────────────────
  
  Prediction for cases with missing covariates is not yet implemented.
  
  ── Warning (test-survreg.R:132:3): residuals ───────────────────────────────────
  
  It is not yet possible to obtain residuals conditional on the random
  effects in multi-level settings.
  
  ── Warning (test-survreg.R:133:3): residuals ───────────────────────────────────
  
  It is not yet possible to obtain residuals conditional on the random
  effects in multi-level settings.
  
  ── Skipped tests  ──────────────────────────────────────────────────────────────
  ● On CRAN (26)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  Warning (test-clm.R:166:3): prediction works
  Warning (test-clm.R:235:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:237:3): wrong models give errors
  Warning (test-clm.R:239:3): wrong models give errors
  Warning (test-clmm.R:219:3): prediction works
  Warning (test-clmm.R:219:3): prediction works
  Warning (test-clmm.R:271:3): residuals work if implemented
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:296:3): wrong models give errors
  Warning (test-clmm.R:299:3): wrong models give errors
  Warning (test-glm.R:358:7): residuals
  Warning (test-glm.R:358:7): residuals
  Warning (test-helpfunctions.R:16:5): extract_id works
  Warning (test-helpfunctions_formulas.R:46:5): extract_id works
  Warning (test-helpfunctions_formulas.R:46:5): extract_id works
  Warning (test-mlogit.R:113:3): prediction works
  Warning (test-mlogit.R:129:3): prediction works
  Warning (test-mlogitmm.R:153:3): prediction works
  Warning (test-mlogitmm.R:153:3): prediction works
  Warning (test-mlogitmm.R:193:3): residuals work if implemented
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-mlogitmm.R:219:3): wrong models give errors
  Warning (test-survival.R:15:3): JM
  Warning (test-survival.R:15:3): JM
  ERROR (test-survival.R:29:3): fill_locf works
  Warning (test-survreg.R:124:3): prediction works
  Warning (test-survreg.R:124:3): prediction works
  Warning (test-survreg.R:132:3): residuals
  Warning (test-survreg.R:133:3): residuals
  
  [ FAIL 1 | WARN 48 | SKIP 26 | PASS 1400 ]
  Error: Test failures
  Execution halted