An index of goodness-of-fit based on noncentrality