text: **Figure 8.**Results of the parameter recovery study. (**A**) Estimated parameter values plotted against 
  the values used to generate the data. (**B**) Parameter estimates split by the two groups from which the 
  parameter values of synthetic subjects were sampled. 
  
  Finally, there are various metrics for model comparison that might be calculated, as 
  implemented by various software packages. Here for demonstration, we calculated the 
  Pareto-Smoothed Importance Sampling approximation to Leave One Out cross-validation 
  (PSIS-LOO) [59], as implemented by ParetoSmooth.jl [64]: 
  (cid:7)  (cid:4) 
  
  **using**ParetoSmooth : psis_loo 
  # Calculate the PSIS LOO 
  PSIS_loo = psis_loo ( model , results . chains ) 
  (cid:6)  (cid:5) 
  
  **5. Discussion**
  
  We introduce ActiveInference.jl, a novel Julia software package for creating and 
  using POMDP-based AIF models for simulation and fitting to empirical data, demonstrat- 
  ing its ease of use on a small parameter study with simulated agents. ActiveInference.jl 
  makes AIF modelling available in a fast language, equipped with an interface and situated 
  in an ecosystem oriented specifically towards cognitive and behavioural modelling. 
  
  Importantly, the ability to fit models to empirical data with sampling-based methods 
  provides value to researchers within cognitive modelling and computational psychiatry: it 
  allows for comparing estimated parameter values between population groups or investigat- 