Running ‘testthat.R’ [120s/131s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(TrialEmulation)
  > 
  > data.table::setDTthreads(2)
  > test_check("TrialEmulation")
  Starting data manipulation
  Starting data extension
  Summary of extended data:
  Number of observations: 1939053
  ------------------------------------------------------------
  
  Starting data manipulation
  P(treatment = 1 | previous treatment = 0) for denominator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -3.84325    0.04785  -80.31   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 4329.7  on 21263  degrees of freedom
  Residual deviance: 4329.7  on 21263  degrees of freedom
  AIC: 4331.7
  
  Number of Fisher Scoring iterations: 6
  
  P(treatment = 1 | previous treatment = 0) for numerator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -3.84325    0.04785  -80.31   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 4329.7  on 21263  degrees of freedom
  Residual deviance: 4329.7  on 21263  degrees of freedom
  AIC: 4331.7
  
  Number of Fisher Scoring iterations: 6
  
  P(treatment = 1 | previous treatment = 1) for denominator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  4.37616    0.06815   64.21   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 2346.7  on 17555  degrees of freedom
  Residual deviance: 2346.7  on 17555  degrees of freedom
  AIC: 2348.7
  
  Number of Fisher Scoring iterations: 7
  
  P(treatment = 1 | previous treatment = 1) for numerator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  4.37616    0.06815   64.21   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 2346.7  on 17555  degrees of freedom
  Residual deviance: 2346.7  on 17555  degrees of freedom
  AIC: 2348.7
  
  Number of Fisher Scoring iterations: 7
  
  Starting data extension
  Summary of extended data:
  Number of observations: 963883
  ------------------------------------------------------------
  
  Starting data manipulation
  P(treatment = 1 | previous treatment = 0) for denominator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -3.32517    0.03599   -92.4   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 6948.7  on 23042  degrees of freedom
  Residual deviance: 6948.7  on 23042  degrees of freedom
  AIC: 6950.7
  
  Number of Fisher Scoring iterations: 6
  
  P(treatment = 1 | previous treatment = 0) for numerator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -3.32517    0.03599   -92.4   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 6948.7  on 23042  degrees of freedom
  Residual deviance: 6948.7  on 23042  degrees of freedom
  AIC: 6950.7
  
  Number of Fisher Scoring iterations: 6
  
  P(treatment = 1 | previous treatment = 1) for denominator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   3.9124     0.0453   86.37   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 4892.8  on 25356  degrees of freedom
  Residual deviance: 4892.8  on 25356  degrees of freedom
  AIC: 4894.8
  
  Number of Fisher Scoring iterations: 6
  
  P(treatment = 1 | previous treatment = 1) for numerator
  
  Call:
  glm(formula = treatment ~ 1, family = binomial(link = "logit"), 
      data = data)
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   3.9124     0.0453   86.37   <2e-16 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 4892.8  on 25356  degrees of freedom
  Residual deviance: 4892.8  on 25356  degrees of freedom
  AIC: 4894.8
  
  Number of Fisher Scoring iterations: 6
  
  Starting data extension
  Summary of extended data:
  Number of observations: 1939053
  ------------------------------------------------------------
  
  [ FAIL 1 | WARN 0 | SKIP 24 | PASS 139 ]
  
  ══ Skipped tests (24) ══════════════════════════════════════════════════════════
  • On CRAN (24): 'test-data_utils.R:6:3', 'test-data_utils.R:111:3',
    'test-data_utils.R:131:3', 'test-generics.R:66:3', 'test-generics.R:95:3',
    'test-modelling.R:99:3', 'test-modelling.R:154:3', 'test-modelling.R:175:3',
    'test-modelling.R:205:3', 'test-modelling.R:229:3', 'test-modelling.R:266:3',
    'test-modelling.R:290:3', 'test-modelling.R:314:3', 'test-modelling.R:357:3',
    'test-predict.R:26:3', 'test-predict.R:51:3', 'test-predict.R:108:3',
    'test-sampling.R:5:3', 'test-sampling.R:15:3', 'test-sampling.R:34:3',
    'test-sampling.R:54:3', 'test-sampling.R:86:3', 'test-sampling.R:103:3',
    'test-sampling.R:180:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-generics.R:25:3'): summary for data_preparation separate=TRUE ──
  Error in `print.data.table(data.table(data = object$data), topn = 3, n = 5, 
      col.names = "none", ...)`: argument 3 matches multiple formal arguments
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(...) at test-generics.R:25:3
   2.   └─rlang::cnd_signal(state$error)
  
  [ FAIL 1 | WARN 0 | SKIP 24 | PASS 139 ]
  Error: Test failures
  Execution halted