Semiparametric Regression Analysis of Survival and Longitudinal Data