Running ‘testthat.R’ [29s/79s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(lmvar)
  > 
  > test_check("lmvar")
  ── 1. Failure: cv.lm works with model matrix with one column (@test_cross_valida
  `cv` not equal to `expected`.
  Component "MAE": Component "mean": Mean relative difference: 0.00538002
  Component "MAE": Component "sd": Mean relative difference: 0.006253794
  Component "MSE": Component "mean": Mean relative difference: 0.0160631
  Component "MSE": Component "sd": Mean relative difference: 0.1311636
  Component "MSE_sqrt": Component "mean": Mean relative difference: 0.008091265
  Component "MSE_sqrt": Component "sd": Mean relative difference: 0.1381749
  
  ── 2. Failure: cv.lmvar works with model matrix with one column (@test_cross_val
  `cv` not equal to `expected`.
  Component "MAE": Component "mean": Mean relative difference: 0.00538002
  Component "MAE": Component "sd": Mean relative difference: 0.006253794
  Component "MSE": Component "mean": Mean relative difference: 0.0160631
  Component "MSE": Component "sd": Mean relative difference: 0.1311636
  Component "MSE_sqrt": Component "mean": Mean relative difference: 0.008091265
  Component "MSE_sqrt": Component "sd": Mean relative difference: 0.1381749
  
  ── 3. Failure: cv.lmvar works with model matrix with one column (@test_cross_val
  `cv` not equal to `expected`.
  Component "MAE": Component "mean": Mean relative difference: 0.001482958
  Component "MAE": Component "sd": Mean relative difference: 0.1321531
  Component "MSE": Component "mean": Mean relative difference: 0.002985587
  Component "MSE": Component "sd": Mean relative difference: 0.1217967
  Component "MSE_sqrt": Component "mean": Mean relative difference: 0.0007902951
  Component "MSE_sqrt": Component "sd": Mean relative difference: 0.113554
  
  ── 4. Failure: cv.lmvar works with model matrix with one column (@test_cross_val
  `cv` not equal to `expected`.
  Component "MAE": Component "mean": Mean relative difference: 0.005379804
  Component "MAE": Component "sd": Mean relative difference: 0.00642035
  Component "MSE": Component "mean": Mean relative difference: 0.01606225
  Component "MSE": Component "sd": Mean relative difference: 0.1309952
  Component "MSE_sqrt": Component "mean": Mean relative difference: 0.008090746
  Component "MSE_sqrt": Component "sd": Mean relative difference: 0.1380182
  
  ── 5. Failure: Selection retrieves original model (lm and lmvar as lm) (@test_fw
  `cols` not equal to colnames(X)[-8].
  6/9 mismatches
  x[2]: "v2"
  y[2]: "v1"
  
  x[3]: "v3"
  y[3]: "v2"
  
  x[4]: "v4"
  y[4]: "v3"
  
  x[5]: "v5"
  y[5]: "v4"
  
  x[6]: "v6"
  y[6]: "v5"
  
  ── 6. Failure: Selection retrieves original model (lm and lmvar as lm) (@test_fw
  fwbw$fun not equal to BIC(fit_lm).
  1/1 mismatches
  [1] 31180 - 35292 == -4112
  
  ── 7. Failure: Unusual variable names (lm) (@test_fwbw.R#271)  ─────────────────
  BIC(fwbw$object) not equal to BIC(fit_lm).
  1/1 mismatches
  [1] 32086 - 32182 == -95.3
  
  ── 8. Failure: betas are as expected (@test_lmvar.R#58)  ───────────────────────
  beta_f + 1.5 * sterr_f is not strictly more than beta[i]. Difference: -0.000183
  
  ── 9. Failure: Option to remove degrees of freedom to improve fit (@test_lmvar.R
  `lmvar(fit$y[1:n], fit$X_mu[1:n, -1], X_sigma[, -1], slvr_options = list(start = start))` did not produce any warnings.
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 165 SKIPPED: 5 FAILED: 9
  1. Failure: cv.lm works with model matrix with one column (@test_cross_validations.R#300) 
  2. Failure: cv.lmvar works with model matrix with one column (@test_cross_validations.R#315) 
  3. Failure: cv.lmvar works with model matrix with one column (@test_cross_validations.R#327) 
  4. Failure: cv.lmvar works with model matrix with one column (@test_cross_validations.R#339) 
  5. Failure: Selection retrieves original model (lm and lmvar as lm) (@test_fwbw.R#101) 
  6. Failure: Selection retrieves original model (lm and lmvar as lm) (@test_fwbw.R#105) 
  7. Failure: Unusual variable names (lm) (@test_fwbw.R#271) 
  8. Failure: betas are as expected (@test_lmvar.R#58) 
  9. Failure: Option to remove degrees of freedom to improve fit (@test_lmvar.R#157) 
  
  Error: testthat unit tests failed
  Execution halted