The statistical problems underlying subgroup identification in clinical studies are to identify the predictors related to the treatment outcome and to determine an algorithm that defines the subgroup of interest based on those predictors. While there are recent advancements in subgroup identification using machine learning techniques, many of them focus on identifying the factors that demonstrate differential predictive values between treatment groups (i.e. predictive factors). However, prognostic factors, which show similar predictive values across treatment groups, can sometimes be of interest. Incorporating them into the subgroup identification procedures potentially can not only improve model performance, but also provide results with more solid clinical and biological interpretations. This paper proposes a stage-wise approach that unifies prognostic and predictive factor identification and subgroup determination with controlled type I error, and presents an example of its application to a phase II study.