anchor.diff:  !------------------------------------------------------------------------------
   
       ! Construct auxiliary objects
  +    num_obs = SIZE(data_array, 1)
  +
       shocks_cov = MATMUL(shocks_cholesky, TRANSPOSE(shocks_cholesky))
       is_deterministic = ALL(shocks_cov .EQ. zero_dble)
   
       ! Initialize container for likelihood contributions
  +    ALLOCATE(crit_val(num_obs))
       crit_val = zero_dble
   
  -    j = 1
  -
  -    DO i = 0, num_agents_est - 1
  -
  -        DO period = 0, num_periods -1
  +    
  +    DO j = 1, num_obs
  +
  +            period = INT(data_array(j, 2)) 
   
               ! Extract observable components of state space as well as agent decision.
               exp_a = INT(data_array(j, 5))
  
positive.code:     INTEGER(our_int)                :: counts(4)
      INTEGER(our_int)                :: choice
      INTEGER(our_int)                :: period
      INTEGER(our_int)                :: exp_a
      INTEGER(our_int)                :: exp_b
      INTEGER(our_int)                :: idx
      INTEGER(our_int)                :: edu
      INTEGER(our_int)                :: i
      INTEGER(our_int)                :: s
      INTEGER(our_int)                :: k
      INTEGER(our_int)                :: j
  
negative.code: !******************************************************************************
  !******************************************************************************
  SUBROUTINE fort_evaluate(rslt, periods_payoffs_systematic, mapping_state_idx, periods_emax, states_all, shocks_cholesky, data_array, periods_draws_prob)
  
      !   DEVELOPMENT NOTES
      !
      !   This routine accepts assumed shape arrays to allow its use during parallel execution as well. This is also the reasoning behind relaxing the alignment with the PYTHON counterpart.
  
      !/* external objects        */
  
  