Varies from program to program. Several (Penn, Pitt, UNC, etc.) have research positions designated with each resident group (2/8 for Penn, 4/8 for Pitt, etc). You have to rank the postions with/without a research year separately. Some programs select the research residents from all those accepted. Pitt formerly did this, but they don't any longer, and I'm not sure who still does this. In Pitt's case you would show up for your first day, and they would tell you then if you were there for 5 or 6 years. To my understanding, at least with the Eastern US programs, if you are asked to do research you have no option to decline.