Modified R code to coincide with Stan model data block variables