variables in eq?

variables in eq?

There may be a better way around this....but I am trying to dynamically change the eq() value in a jquery statement.  

I have a form that refreshes itself on the zip of a form, and if someone selects the quantity of a product before entering info, then refreshes and goes to the eq(0) ...or any other specified eq() in the radio sequence.

Trying to figure out a way from a radio button to alter a variable (easy part) to update a value or change the value in the eq() so both radio sets have the same selected value.

Currently trying this with no success, first I'm just trying to state the value in a variable....

var myVar = 2;  (tried in and out of single quotes)

          jQuery("[name=ShippingOptionId]").eq(' + myVar + ').attr("checked", "true").trigger("click");