Credibility analysis of a general hierarchical model