Life course analysis and multistate demography: an application to marriage divorce and remarriage