Running 'testthat.R' [32s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(OrthoPanels)
  > 
  > test_check("OrthoPanels")
  -- 1. Failure: data (@test-dropouts.R#29)  -------------------------------------
  `x` not equal to array(...).
  4/40 mismatches (average diff: NaN)
  [15] -1.479 -     NA == NA
  [23] -0.937 -     NA == NA
  [24]     NA - 1.4386 == NA
  [27]     NA - 0.0878 == NA
  
  -- 2. Failure: data (@test-dropouts.R#41)  -------------------------------------
  `y` not equal to matrix(...).
  4/40 mismatches (average diff: NaN)
  [15] -2.53 -    NA == NA
  [23]  3.01 -    NA == NA
  [24]    NA -  4.25 == NA
  [27]    NA - -2.23 == NA
  
  -- 3. Failure: default (@test-dropouts.R#56)  ----------------------------------
  opm(x, y, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.2303622
  Component "samples": Component "sig2": Mean relative difference: 0.320781
  Component "samples": Component "beta": Mean relative difference: 0.4380968
  Component "fitted.values": Mean relative difference: 0.5546152
  Component "residuals": Mean relative difference: 0.6291491
  Component "df.residual": Mean relative difference: 0.04
  Component "logLik": Mean relative difference: 1.885473
  
  -- 4. Failure: late-arrivals (@test-dropouts.R#102)  ---------------------------
  opm(x, y, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.2273547
  Component "samples": Component "sig2": Mean relative difference: 0.3131764
  Component "samples": Component "beta": Mean relative difference: 0.4424159
  Component "fitted.values": Mean relative difference: 0.5351241
  Component "residuals": Mean relative difference: 0.6333826
  Component "logLik": Mean relative difference: 0.1593311
  
  -- 5. Failure: late-arrivals (@test-dropouts.R#145)  ---------------------------
  opm(y ~ x, d, n.samp = 10) not equal to `o`.
  Component "samples": Component "rho": Mean relative difference: 0.02540907
  Component "samples": Component "sig2": Mean relative difference: 0.05825686
  Component "samples": Component "beta": Mean relative difference: 0.01144097
  Component "fitted.values": Mean relative difference: 0.1777019
  Component "residuals": Mean relative difference: 0.05002074
  Component "df.residual": Mean relative difference: 0.04166667
  Component "logLik": Mean relative difference: 0.5982181
  
  -- 6. Failure: DIC (@test-dropouts.R#166)  -------------------------------------
  DIC(o) not equal to 15.158.
  1/1 mismatches
  [1] 6.45 - 15.2 == -8.71
  
  -- 7. Failure: default (@test-opm-multivar.R#54)  ------------------------------
  opm(x, y, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.5033373
  
  -- 8. Failure: named matrix (@test-opm-multivar.R#100)  ------------------------
  opm(x, y, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.5033373
  
  -- 9. Failure: formula (@test-opm-multivar.R#201)  -----------------------------
  opm(y ~ x1 + x2, d, n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.5033373
  
  -- 10. Failure: formula (@test-opm-multivar.R#211)  ----------------------------
  opm(y ~ x1 + x2, d, index = 4:3, n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.5033373
  
  -- 11. Failure: formula (@test-opm-multivar.R#219)  ----------------------------
  opm(y ~ x1 + x2, d, index = c("i", "t"), n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.5033373
  
  -- 12. Failure: early dropouts (@test-opm-multivar.R#236)  ---------------------
  opm(xx, yy, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.5974755
  Component "samples": Component "sig2": Mean relative difference: 3.078561
  Component "samples": Component "beta": Mean relative difference: 1.698956
  Component "fitted.values": Mean relative difference: 0.02227339
  Component "residuals": Mean relative difference: 0.05728316
  Component "logLik": Mean relative difference: 0.475353
  
  -- 13. Failure: confint (@test-opm-multivar.R#281)  ----------------------------
  confint(o) not equal to matrix(...).
  8/8 mismatches (average diff: 13.7)
  [1] -0.560 -  -0.160 ==   -0.3999
  [2]  0.155 -   0.112 ==    0.0437
  [3] -2.272 -  -2.962 ==    0.6909
  [4] -1.417 -  -1.545 ==    0.1281
  [5]  0.918 -   0.929 ==   -0.0108
  [6] 75.283 - 178.186 == -102.9022
  [7]  1.899 -   5.110 ==   -3.2105
  [8]  2.959 -   5.457 ==   -2.4985
  
  -- 14. Failure: confint (@test-opm-multivar.R#290)  ----------------------------
  confint(o, 1:2, level = 0.68) not equal to matrix(...).
  4/4 mismatches (average diff: 0.298)
  [1] 0.296 - -0.0235 == 0.3197
  [2] 0.233 -  0.2157 == 0.0175
  [3] 0.830 -  0.7865 == 0.0436
  [4] 8.008 -  7.1965 == 0.8120
  
  -- 15. Failure: coef (@test-opm-multivar.R#299)  -------------------------------
  coef(o) not equal to c(...).
  4/4 mismatches (average diff: 0.0701)
  [1]  0.616 -  0.557 ==  0.05850
  [2]  0.665 -  0.874 == -0.20905
  [3] -0.706 - -0.713 ==  0.00706
  [4] -0.650 - -0.656 ==  0.00589
  
  -- 16. Failure: print (@test-opm-multivar.R#311)  ------------------------------
  capture.output(o) not equal to c(...).
  5/12 mismatches
  x[7]: "                mean (SD)       med          95-CI"
  y[7]: "                 mean (SD)       med           95-CI"
  
  x[8]: "rho        0.48150 (0.51)   0.61550  (-0.56, 0.92)"
  y[8]: "rho        0.450900 (0.39)   0.55700   (-0.16, 0.93)"
  
  x[9]: "sig2     11.26123 (29.17)   0.66499  (0.16, 75.28)"
  y[9]: "sig2     24.422159 (71.18)   0.87405  (0.11, 178.19)"
  
  x[10]: "beta.x1   -0.37450 (1.33)  -0.70593    (-2.3, 1.9)"
  y[10]: "beta.x1   -0.077945 (2.55)  -0.71298     (-3.0, 5.1)"
  
  x[11]: "beta.x2    -0.25045 (1.5)  -0.64997    (-1.4, 3.0)"
  y[11]: "beta.x2    0.023554 (2.51)  -0.65587     (-1.5, 5.5)"
  
  -- 17. Failure: summary (@test-opm-multivar.R#328)  ----------------------------
  capture.output(summary(o)) not equal to c(...).
  4/9 mismatches
  x[6]: "rho       -0.55957    0.29620    0.61550    0.830160    0.91823"
  y[6]: "rho       -0.15962   -0.02352    0.55700    0.786520     0.9290"
  
  x[7]: "sig2       0.15540    0.23318    0.66499    8.008459   75.28336"
  y[7]: "sig2       0.11171    0.21566    0.87405    7.196468   178.1855"
  
  x[8]: "beta.x1   -2.27154   -1.14733   -0.70593    0.909175    1.89940"
  y[8]: "beta.x1   -2.96240   -1.42573   -0.71298    0.703472     5.1099"
  
  x[9]: "beta.x2   -1.41667   -0.98567   -0.64997   -0.041433    2.95880"
  y[9]: "beta.x2   -1.54479   -1.18338   -0.65587   -0.032576     5.4573"
  
  -- 18. Failure: DIC (@test-opm-multivar.R#342)  --------------------------------
  DIC(o) not equal to 24.83189.
  1/1 mismatches
  [1] 18.6 - 24.8 == -6.22
  
  -- 19. Failure: default (@test-opm.R#42)  --------------------------------------
  opm(x, y, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 20. Failure: formula (@test-opm.R#141)  -------------------------------------
  opm(y ~ x, d, n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 21. Failure: formula (@test-opm.R#149)  -------------------------------------
  opm(y ~ x, d, n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 22. Failure: formula (@test-opm.R#161)  -------------------------------------
  opm(y ~ x, index = c("i", "t"), n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 23. Failure: formula (@test-opm.R#171)  -------------------------------------
  opm(y ~ x, d, index = 4:3, n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 24. Failure: formula (@test-opm.R#179)  -------------------------------------
  opm(y ~ x, d, index = c("i", "t"), n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 25. Failure: formula (@test-opm.R#189)  -------------------------------------
  opm(y ~ x, d, index = c("i", "t"), n.samp = 10) not equal to `expected`.
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 2.687317
  
  -- 26. Failure: dummy vals (@test-opm.R#197)  ----------------------------------
  opm(x, y, n = 10, add = TRUE) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.60373
  Component "samples": Component "sig2": Mean relative difference: 75.97933
  Component "samples": Component "beta": Mean relative difference: 0.5833952
  Component "fitted.values": Mean relative difference: 5.78359e-06
  Component "residuals": Mean relative difference: 0.1083666
  Component "logLik": Mean relative difference: 0.1745717
  
  -- 27. Failure: formula dummy vals (@test-opm.R#259)  --------------------------
  opm(y ~ x, d, n = 10, add = TRUE) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.60373
  Component "samples": Component "sig2": Mean relative difference: 75.97933
  Component "samples": Component "beta": Mean relative difference: 0.5833952
  Component "fitted.values": Mean relative difference: 5.78359e-06
  Component "residuals": Mean relative difference: 0.1083666
  Component "logLik": Mean relative difference: 0.1745717
  
  -- 28. Failure: early dropouts (@test-opm.R#345)  ------------------------------
  opm(xx, yy, n = 10) not equal to structure(...).
  Component "samples": Component "rho": Mean relative difference: 0.7186255
  Component "samples": Component "sig2": Mean relative difference: 1.727357
  Component "samples": Component "beta": Mean relative difference: 0.9974274
  Component "fitted.values": Mean relative difference: 0.1438326
  Component "residuals": Mean relative difference: 0.2279311
  Component "logLik": Mean relative difference: 3.060569
  
  -- 29. Failure: confint (@test-opm.R#388)  -------------------------------------
  confint(o) not equal to matrix(...).
  6/6 mismatches (average diff: 0.797)
  [1] -0.560 - -0.160 == -0.3999
  [2]  0.435 -  0.258 ==  0.1773
  [3] -0.348 - -0.405 ==  0.0564
  [4]  0.898 -  0.945 == -0.0468
  [5] 30.508 - 26.574 ==  3.9335
  [6]  1.813 -  1.982 == -0.1695
  
  -- 30. Failure: confint (@test-opm.R#395)  -------------------------------------
  confint(o, 1:2, level = 0.68) not equal to matrix(...).
  4/4 mismatches (average diff: 2.23)
  [1] 0.296 - -0.0235 ==  0.3197
  [2] 0.528 -  0.3922 ==  0.1354
  [3] 0.802 -  0.8348 == -0.0326
  [4] 4.739 - 13.1608 == -8.4217
  
  -- 31. Failure: coef (@test-opm.R#404)  ----------------------------------------
  coef(o) not equal to c(rho = 0.651, sig2 = 0.898766398134737, beta = 1.08982465524029).
  3/3 mismatches (average diff: 0.189)
  [1] 0.491 - 0.651 == -0.160
  [2] 1.170 - 0.899 ==  0.271
  [3] 0.954 - 1.090 == -0.136
  
  -- 32. Failure: print (@test-opm.R#415)  ---------------------------------------
  capture.output(o) not equal to c(...).
  4/11 mismatches
  x[7]: "            mean (SD)      med          95-CI"
  y[7]: "           mean (SD)      med          95-CI"
  
  x[8]: "rho    0.44220 (0.49)  0.49050  (-0.56, 0.90)"
  y[8]: "rho    0.4579 (0.44)  0.65100  (-0.16, 0.95)"
  
  x[9]: "sig2  5.28698 (11.47)  1.16962  (0.43, 30.51)"
  y[9]: "sig2  5.7391 (10.14)  0.89877  (0.26, 26.57)"
  
  x[10]: "beta   0.68978 (0.75)  0.95412  (-0.35, 1.81)"
  y[10]: "beta   1.0596 (0.74)  1.08982    (-0.4, 2.0)"
  
  -- 33. Failure: summary (@test-opm.R#431)  -------------------------------------
  capture.output(summary(o)) not equal to c(...).
  4/8 mismatches
  x[5]: "        <--95CI     <--68CI       med   68CI-->    95CI-->"
  y[5]: "        <--95CI    <--68CI       med    68CI-->   95CI-->"
  
  x[6]: "rho    -0.55957    0.296200   0.49050   0.80216    0.89845"
  y[6]: "rho    -0.15962   -0.02352   0.65100    0.83476    0.9452"
  
  x[7]: "sig2    0.43484    0.527561   1.16962   4.73908   30.50779"
  y[7]: "sig2    0.25757    0.39221   0.89877   13.16080   26.5743"
  
  x[8]: "beta   -0.34842   -0.069696   0.95412   1.20253    1.81290"
  y[8]: "beta   -0.40482    0.80448   1.08982    1.54018    1.9824"
  
  -- 34. Failure: DIC (@test-opm.R#444)  -----------------------------------------
  DIC(o) not equal to 16.80786.
  1/1 mismatches
  [1] 16.5 - 16.8 == -0.315
  
  -- 35. Failure: DIC (@test-opm.R#447)  -----------------------------------------
  DIC(opm(x, y, n = 10, add = TRUE)) not equal to -133.868546487072.
  1/1 mismatches
  [1] -157 - -134 == -22.9
  
  == testthat results  ===========================================================
  OK: 34 SKIPPED: 0 FAILED: 35
  1. Failure: data (@test-dropouts.R#29) 
  2. Failure: data (@test-dropouts.R#41) 
  3. Failure: default (@test-dropouts.R#56) 
  4. Failure: late-arrivals (@test-dropouts.R#102) 
  5. Failure: late-arrivals (@test-dropouts.R#145) 
  6. Failure: DIC (@test-dropouts.R#166) 
  7. Failure: default (@test-opm-multivar.R#54) 
  8. Failure: named matrix (@test-opm-multivar.R#100) 
  9. Failure: formula (@test-opm-multivar.R#201) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted