Running 'testthat.R' [508s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(disaggregation)
  > 
  > test_check("disaggregation")
  Fitting model. This may be slow.
  Saving _problems/test-fit-model-36.R
  The data contains 100 polygons and 400 pixels
  The largest polygon contains 4 pixels and the smallest polygon contains 4 pixels
  There are 2 covariates
  
  Covariate summary:
       layer1           layer2      
   Min.   :-5.513   Min.   :-4.018  
   1st Qu.: 5.732   1st Qu.: 4.836  
   Median :10.356   Median :10.137  
   Mean   :10.455   Mean   :10.400  
   3rd Qu.:15.326   3rd Qu.:15.766  
   Max.   :25.306   Max.   :26.086  
  They data contains 100 polygons and 400 pixels
  The largest polygon contains 4 pixels and the smallest polygon contains 4 pixels
  There are 2 covariates
  Likelihood function: poisson 
  Link function: log 
  Model parameters:
                        Estimate Std. Error
  intercept          4.778761087 0.27223965
  layer1             0.002172027 0.01727794
  layer2            -0.017490931 0.01570533
  iideffect_log_tau  0.149315777 0.14991676
  log_sigma         -2.429686225 0.92756179
  log_rho            2.741551660 0.81888031
  
  Model convergence: 0 (relative convergence (4))
  Negative log likelihood:  -375.386593275042 
  
  In sample performance:
        RMSE       MAE   pearson spearman log_pearson
  1 1.063271 0.7718022 0.9999985        1   0.9954931
  Bayesian disaggregation model result
  
  Likelihood function: poisson 
  Link function: log 
  
  Parameter values:
          intercept            layer1            layer2 iideffect_log_tau 
        4.778761087       0.002172027      -0.017490931       0.149315777 
          log_sigma           log_rho 
       -2.429686225       2.741551660 
  Predction from disaggregation model
  
  Components of the model: covariates field 
  
  There are 100 uncertainty realisations
  
  The mean predicted values range from 76.4 to 132 
  The predicted IQR takes values from 39.9 to 129 
  Predction from disaggregation model
  
  Components of the model: covariates field 
  
  There are 100 uncertainty realisations[ FAIL 1 | WARN 0 | SKIP 0 | PASS 293 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-fit-model.R:36:3'): disag_model with 1 covariate behaves as expected ──
  Error in `stats::nlminb(obj$par, obj$fn, obj$gr, control = list(iter.max = iterations, trace = 0))`: NA/NaN gradient evaluation
  Backtrace:
      ▆
   1. └─disaggregation::disag_model(...) at test-fit-model.R:36:3
   2.   └─stats::nlminb(...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 293 ]
  Error:
  ! Test failures.
  Execution halted