Changed logic for select_var_param select the nth parameter instead of always picking the 0th parameter (Issue #1763)
Changed logic for select_var_param select the nth parameter instead of always picking the 0th parameter (Issue #1763)

stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math