text: (cid:7) 
  
  # Initialize model for single subject 
  single_subject_model = create_model ( 
  
  agent , 
  # ActionModels agent object 
  priors , # Dictionary with parameter priors 
  observations , # Vector of observations 
  actions ,  # Vector of actions 
  
  ) 
  (cid:6)  (cid:5) 
  
  If we have multiple subjects whose parameters we wish to estimate, we can achieve this 
  by passing a dataframe object to the same function. Here, we specify which columns are 
  actions and inputs, as well as which column to use for grouping the specific time series: 
  (cid:7)  (cid:4) 
  
  # Initialize model for multiple subjects 
  multiple_subjects_model = create_model ( 
  # ActionModels agent 
  
  agent , 
  priors , # Dictionary with parameter priors 
  data ; 
  grouping_cols = [" ID "], # Column to split dataframe 
  input_cols = [" observations "], 
  action_cols = [" actions "],  # Columns with observations 
  # Columns with actions 
  
  ) 
  (cid:6)  (cid:5) 
  
  This model can be used as a normal Turing model object. ActionModels provides a conve- 
  nience function for doing this with appropriate defaults: 
  (cid:7)  (cid:4) 
  results = fit_model ( 
  
  single_subject_model ; # Model object 
  n_iterations = 1000 , 
  n_chains = 1  # Number of iterations 
  # Number of chains 
  
  ) 
  (cid:6)  (cid:5) 