Any analysis after miscarriage/s?

Mirjana
I had 2 miscarriages and I am so worried to try again. I'm wondering if there are any analysis I can do to prevent the same for next time? I know that sometimes it just happens even everything is ok, but what if it's not? 
So, if anyone have done anything please tell us about it.