1 Overview

This document reports posterior model checks for the four shifted lognormal mixed-effects mixture models. The checks use the saved Stan fit objects in stanout/smog_exp*.rda. These files are RDS objects despite the .rda extension and are read with readRDS(). They are large, so the document loads and checks one experiment at a time.

2 Diagnostics by Experiment

2.1 Experiment 1

2.1.1 HMC diagnostics

Experiment 1 HMC diagnostics by chain.
chain divergent max_treedepth ebfmi mean_accept_stat mean_stepsize
1 0 0 0.735 0.993 0.0201
2 0 0 0.738 0.984 0.0300
3 0 0 0.818 0.992 0.0215

2.1.2 R-hat and effective sample size

Experiment 1 summary of R-hat and effective sample size.
parameters max_Rhat parameters_Rhat_above_1_01 parameters_Rhat_above_1_05 min_n_eff parameters_n_eff_below_400
17 1.007 0 0 658 0
Experiment 1 parameters with the largest R-hat values.
parameter mean sd n_eff Rhat
beta[2] 5.200 0.040 658 1.007
sigma_u[1] 0.311 0.030 1276 1.006
beta[1] 5.941 0.055 1312 1.003
shift 6.514 0.034 1198 1.003
sigma_diff[2] 0.194 0.007 7989 1.002
sigma 0.552 0.009 5092 1.001
theta[6] -1.283 0.112 5941 1.001
theta[2] -1.512 0.126 6112 1.001
theta[4] -1.399 0.121 5843 1.001
theta[3] -1.197 0.190 6193 1.000
theta[5] 0.173 0.197 6376 1.000
theta[1] 0.593 0.225 6372 1.000
delta[2] 0.267 0.029 6994 1.000
sigma_diff[1] 0.143 0.013 9058 1.000
sigma_u[2] 0.243 0.024 2296 1.000
sigma_w 0.091 0.009 11623 1.000
delta[1] 0.703 0.039 8052 1.000

2.1.3 Traceplots

2.1.4 Posterior predictive checks

2.2 Experiment 2

2.2.1 HMC diagnostics

Experiment 2 HMC diagnostics by chain.
chain divergent max_treedepth ebfmi mean_accept_stat mean_stepsize
1 0 0 0.801 0.985 0.0326
2 0 0 0.817 0.986 0.0310
3 0 0 0.792 0.982 0.0374

2.2.2 R-hat and effective sample size

Experiment 2 summary of R-hat and effective sample size.
parameters max_Rhat parameters_Rhat_above_1_01 parameters_Rhat_above_1_05 min_n_eff parameters_n_eff_below_400
37 1.006 0 0 570 0
Experiment 2 parameters with the largest R-hat values.
parameter mean sd n_eff Rhat
beta[3] 5.206 0.040 570 1.006
beta[1] 6.109 0.048 817 1.004
beta[2] 6.026 0.053 1029 1.003
sigma_u[2] 0.222 0.019 2978 1.001
sigma_u[1] 0.367 0.028 1185 1.001
shift 6.483 0.029 1495 1.001
theta[15] -0.146 0.295 13737 1.000
theta[5] 0.102 0.291 13944 1.000
theta[21] -0.308 0.275 14624 1.000
delta[1] 0.427 0.044 12179 1.000
theta[24] -1.108 0.131 16329 1.000
sigma_diff[2] 0.200 0.006 9855 1.000
theta[3] -0.458 0.277 15417 1.000
sigma 0.562 0.007 6400 1.000
theta[17] 0.250 0.245 16046 1.000
theta[11] -1.089 0.264 16153 1.000
theta[4] -1.476 0.146 17952 1.000
delta[2] 0.599 0.058 16967 1.000
theta[20] -1.310 0.136 17189 1.000
theta[7] -0.238 0.263 15903 1.000

2.2.3 Traceplots

2.2.4 Posterior predictive checks

2.3 Experiment 3

2.3.1 HMC diagnostics

Experiment 3 HMC diagnostics by chain.
chain divergent max_treedepth ebfmi mean_accept_stat mean_stepsize
1 0 0 0.792 0.986 0.0332
2 0 0 0.748 0.985 0.0348
3 0 0 0.763 0.993 0.0249

2.3.2 R-hat and effective sample size

Experiment 3 summary of R-hat and effective sample size.
parameters max_Rhat parameters_Rhat_above_1_01 parameters_Rhat_above_1_05 min_n_eff parameters_n_eff_below_400
46 1.010 0 0 341 1
Experiment 3 parameters with the largest R-hat values.
parameter mean sd n_eff Rhat
sigma_u[1] 0.318 0.023 830 1.010
beta[3] 5.204 0.031 341 1.009
beta[1] 6.228 0.043 580 1.006
beta[2] 6.207 0.041 582 1.006
shift[1] 6.821 0.025 1100 1.003
shift[2] 6.426 0.026 1196 1.003
sigma_u[2] 0.205 0.016 1917 1.001
theta[6] -1.473 0.131 15976 1.000
theta[9] 1.087 0.394 6057 1.000
sigma 0.536 0.005 6626 1.000
theta[1] 0.620 0.310 10719 1.000
theta[2] -1.272 0.132 15186 1.000
theta[24] -1.204 0.124 15511 1.000
theta[21] -0.936 0.217 13563 1.000
theta[22] -1.020 0.128 13599 1.000
theta[14] -1.558 0.146 15374 1.000
theta[11] 0.698 0.296 11463 1.000
theta[8] -1.305 0.133 14688 1.000
theta[27] -0.390 0.218 12381 1.000
sigma_diff[2] 0.175 0.004 11745 1.000

2.3.3 Traceplots

2.3.4 Posterior predictive checks

Posterior predictive plots were skipped because the saved posterior predictive draws do not match the reconstructed model data. This usually means that the cleaning or aggregation script has changed since this Stan fit was generated. Refit the model with the current data-processing scripts to regenerate matching y_tilde draws.

Experiment 3 posterior predictive data check.
check y_tilde observations in saved fit observations reconstructed from current scripts
n_mismatch 30771 30762

2.4 Experiment 4

2.4.1 HMC diagnostics

Experiment 4 HMC diagnostics by chain.
chain divergent max_treedepth ebfmi mean_accept_stat mean_stepsize
1 0 0 0.782 0.986 0.0300
2 0 0 0.781 0.995 0.0170
3 0 0 0.803 0.985 0.0311

2.4.2 R-hat and effective sample size

Experiment 4 summary of R-hat and effective sample size.
parameters max_Rhat parameters_Rhat_above_1_01 parameters_Rhat_above_1_05 min_n_eff parameters_n_eff_below_400
45 1.009 0 0 676 0
Experiment 4 parameters with the largest R-hat values.
parameter mean sd n_eff Rhat
beta[3] 6.265 0.026 676 1.009
beta[1] 6.660 0.032 912 1.006
beta[2] 6.667 0.034 1041 1.005
sigma_u[1] 0.201 0.016 1273 1.003
delta[1] 0.238 0.020 17238 1.000
sigma 0.392 0.006 6016 1.000
theta[1] 0.017 0.237 14514 1.000
sigma_diff[2] 0.229 0.006 9276 1.000
sigma_u[2] 0.545 0.028 3879 1.000
sigma_diff[1] 0.166 0.006 11671 1.000
theta[31] -0.487 0.219 14876 1.000
shift 5.442 0.077 1652 1.000
theta[9] 0.459 0.283 12047 1.000
theta[25] -0.171 0.221 14536 1.000
theta[28] -0.639 0.173 21959 1.000
theta[14] -0.390 0.185 20966 1.000
theta[8] -0.788 0.182 21841 1.000
theta[5] 0.006 0.223 15047 1.000
theta[23] -0.980 0.240 11538 1.000
theta[27] -0.031 0.226 14130 1.000

2.4.3 Traceplots

2.4.4 Posterior predictive checks

3 Session Information

## R version 4.5.2 (2025-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.4 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_GB.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_GB.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: Europe/London
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] tidyr_1.3.2         tibble_3.3.1        stringr_1.6.0      
##  [4] rstan_2.32.7        StanHeaders_2.32.10 readr_2.1.6        
##  [7] purrr_1.2.1         knitr_1.51          ggplot2_4.0.2      
## [10] dplyr_1.2.0        
## 
## loaded via a namespace (and not attached):
##  [1] sass_0.4.10           generics_0.1.4        stringi_1.8.7        
##  [4] hms_1.1.4             digest_0.6.39         magrittr_2.0.4       
##  [7] timechange_0.3.0      evaluate_1.0.5        grid_4.5.2           
## [10] RColorBrewer_1.1-3    fastmap_1.2.0         jsonlite_2.0.0       
## [13] pkgbuild_1.4.8        gridExtra_2.3         QuickJSR_1.8.1       
## [16] scales_1.4.0          codetools_0.2-20      jquerylib_0.1.4      
## [19] cli_3.6.5             crayon_1.5.3          rlang_1.1.7          
## [22] bit64_4.6.0-1         withr_3.0.2           cachem_1.1.0         
## [25] yaml_2.3.12           otel_0.2.0            tools_4.5.2          
## [28] inline_0.3.21         parallel_4.5.2        tzdb_0.5.0           
## [31] curl_7.0.0            vctrs_0.7.1           R6_2.6.1             
## [34] lubridate_1.9.4       matrixStats_1.5.0     stats4_4.5.2         
## [37] lifecycle_1.0.5       bit_4.6.0             V8_8.0.1             
## [40] vroom_1.6.7           pkgconfig_2.0.3       RcppParallel_5.1.11-1
## [43] pillar_1.11.1         bslib_0.10.0          gtable_0.3.6         
## [46] loo_2.9.0             glue_1.8.0            Rcpp_1.1.1           
## [49] xfun_0.56             tidyselect_1.2.1      rstudioapi_0.18.0    
## [52] farver_2.1.2          htmltools_0.5.9       labeling_0.4.3       
## [55] rmarkdown_2.30        compiler_4.5.2        S7_0.2.1