text: # Set multiple parameters by passing a dictionary 
  new_parameters = Dict ( 
  
  " alpha " => 1 .0 , # Set alpha to 1.0 
  " lr_pA " => 0 .5 
  ) 
  # Set learning rate of A to 0.5 
  
  set_parameters !( agent , new_parameters ) # Set new parameters to agent 
  (cid:6)  (cid:5) 
  
  3.3. Model Fitting with ActionModels 
  
  In addition to simulating the behaviour and belief updating of agents, ActionModels 
  also makes it possible to fit models to data and perform parameter estimation. This is 
  used in general to form better models and theories of mental processes, as well as to 
  find mechanistic differences (usually prior beliefs in AIF) between, for example, clinical 
  populations or investigating how computational constructs, like Bayesian beliefs, relate 
  to, for example, neuronal dynamics. This is performed in fields like cognitive modelling 
  and mathematical psychology [34], as well as computational psychiatry [14,53]. In the 
  following, we briefly describe the high-level functions needed to fit AIF models to empirical 
  data with ActionModels. 
  
  We have our agent object defined as above. We then need to specify priors for the 
  parameters we want to estimate. Here, we estimate the*α*parameter, and use a gamma 
  distribution as prior: 
  (cid:7)  (cid:4) 
  
  # Load package for specifying distributions 
  **using**Distributions 
  # Initialize priors 
  priors = Dict (" alpha " => Gamma (4,4)) 
  (cid:6)  (cid:5) 