This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(rstan) | |
## HOW THE SIMULATION LOOP BELOW WORKS -- ignore the shocks for now -------------- | |
# quick example | |
I = 3 # individuals | |
M = 5 # "months" | |
S = 7 # sims | |
mat <- matrix(NA, I*M, S) # M rows (months) will be filled in at a time for each individual i across all S columns (simulations); records for individual i will populate rows ((i - 1)*M + 1):(i*M) |