A hierarchical model to identify prognostic factors in survival analysis