-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbeliefs_transformed_data.stan
9 lines (7 loc) · 1.06 KB
/
beliefs_transformed_data.stan
1
2
3
4
5
6
7
8
9
array[num_beliefs_obs] int<lower = 1, upper = num_clusters> beliefs_cluster_index = obs_cluster_id[beliefs_obs_index];
array[num_beliefs_obs] int<lower = 1, upper = num_counties> beliefs_stratum_index = obs_county_id[beliefs_obs_index];
// int<lower = 1, upper = num_treatments * num_discrete_dist> beliefs_assigned_dist_group_treatment_id[num_beliefs_obs] = cluster_assigned_dist_group_treatment[beliefs_cluster_index];
array[num_beliefs_obs] int<lower = 1, upper = num_treatments> obs_beliefs_treatment_id = cluster_treatment_map[cluster_assigned_dist_group_treatment[beliefs_cluster_index], 1];
array[num_beliefs_obs] int<lower = 1, upper = num_discrete_dist> obs_beliefs_assigned_dist_id = cluster_treatment_map[cluster_assigned_dist_group_treatment[beliefs_cluster_index], 2];
// matrix[num_beliefs_obs, num_dist_group_treatments] beliefs_treatment_design_matrix = beliefs_treatment_map_design_matrix[beliefs_assigned_dist_group_treatment_id];
matrix[num_beliefs_obs, num_treatments] beliefs_treatment_design_matrix = beliefs_treatment_map_design_matrix[obs_beliefs_treatment_id];