I agree with Mike. There's a technicality. 'For' implies "for developing", while 'in' tends to mean "in the progression of".
That's the way it's mostly used in medical circles.
Lack of birth control is a major risk factor for pregnancy.
In pregnancy, it's not a risk factor at all.
Bacterial infections are a risk factor in HIV.
Bacterial infection are not a risk factor for HIV.