Cluster Analysis as a Strategy of Grouping to Construct Goodness-of-Fit Tests when the Continuous Covariates Present in the Logistic Regression Model

When continuous covariates are present, classical Pearson and deviance goodness-of-fit tests to assess logistic model fit break down. Many goodness-of-fit (GOF) tests such as Hosmer–Lemeshow tests can be used in these situations. Meanwhile, it is simple to perform and widely used, it does not have desirable power in many cases and provides no further information on the source of any detectable lack-of-fit. We propose a new strategy of grouping based on a very general partitional clustering in the covariate space to construct two goodness-of-fit test statistics. Many simulation studies are implemented and clinical data set is analyzed to examine the performance of the proposed strategy of grouping and the developed GOF test statistics. The results show that the proposed strategy of grouping and GOF test statistics based on it has a potential for use in practice as a recommended strategy of grouping and as GOF test statistics to assess the adequacy of the logistic regression model.


Introduction
Nowadays, logistic regression model (LRM) is part of the standard empirical research and it is commonly employed in several disciplines including medical research, health research, and social research [1]. Overall goodness-of-fit (GOF) test for the LRM is considered as the principal activity in the modeling process. GOF test reflects whether the predicted values are an accurate representation of the observed values. GOF refers also to the adequacy of the fitted model. It is defined as an evaluation of how well model predicted outcomes agree with the observed data [2]. GOF test, on the other hand, widely referred to as lack-of-fit, because it is measuring how far the model is from the data; more than how much the model is good [3]. Omitted predictors, a misspecified form of the predictor, or an inappropriate link function can all result in poor fitting.
Assessing GOF for the LRM is widely studied and many strategies of grouping and GOF test statistics based on them have been proposed in the last three decades. Two strategies of grouping were proposed by Hosmer and Lemeshow (HL) [4][5], deciles of risk and the fixed cut-off points respectively, to group the range of the estimated dependent variable. In order to construct GOF test, the ranked estimated probabilities are grouped into groups according to either deciles of risk or prespecified fixed cut-off points. The test statistic is calculated by comparing the observed frequency ( ) to the average predicted frequency ( ) in the group, = 1, 2, . . . , , via the familiar form of the statistic: HL's GOF test statistic is widely used due to its following properties: (a) it is naturally attractive and easy to compute; (b) it has sound support from simulation studies; (c) it is widely available in computer packages; and (d) In addition to these properties, lack of a better approach also contributes to its popularity. However, it has the following limitations [6][7][8]: (a) its limiting distribution has not been carefully derived; (b) it is a conservative test and has low power to detect specific types of lack-of-fit (such as nonlinearity in an explanatory variable); (c) it is highly dependent on how the observations are grouped; (d) if too few groups are used to calculate the statistic (for instance, five or fewer groups), it will almost always indicate that the model fits the data; and (e) when the HL GOF statistic indicates a lack of fit, it may be difficult to identify what types of subjects are not modeled well.
Many other researchers proposed different strategies based on HL's strategies of grouping such as [9] proposed a strategy of grouping based on assigning a score to the dependent variable categories. A chisquared type GOF test was proposed by Zhang [10] for LRM using the fixed cut-off points strategy of grouping and the case-control data. The deciles of risk strategy of grouping was used by [11] to construct the GOF test when the correlated or grouped binary data are analyzed by using the logistic generalized estimating equations (GEE) model. Also, the fixed cut-off points strategy of grouping was adapted by [12] to propose a data-driven strategy for grouping data and a new chi-square type GOF test statistic based on casecontrol data for testing LRM by adapting the Zhang [10] test.
Note that ′ models all the original covariates and ′ models the regional shifts; (c) a score statistic is then constructed to test that : = = · · · = = 0. Tsiatis's approach is conceptually elegant, but its lack a general rule for how to partition the covariate space, especially when continuous covariates are present. How to choose the number of distinct groups K has also remained largely unstudied. Many researchers proposed other strategies based on the idea of Tsiatis's strategy of grouping such as [14] proposed strategy of grouping based on categories of the covariates and constructed GOF test statistics based on this strategy to assess the adequacy of the multinomial LRM.
The deficiencies of the above strategies and GOF tests based on them motivated Pulkstenis, and Robinson [2] to propose a two-stage modification of the HL's strategy of grouping where in the first stage all dependents are sorted by model-based estimated probabilities within each unique covariate pattern, as defined by only the categorical covariates, and then in the second stage creating two sub categories within each covariate pattern, essentially splitting the category in two cells based on the median of estimated probabilities within each of the k row. This additional stratification basically doubles the number of covariate patterns to incorporate information related to all continuous covariates in the model. Model-based expected counts are computed exactly as before, and the proposed test statistics are a Pearson chisquare test given by: and the deviance which is calculated by comparing the expected and the observed counts in the resulting contingency table as: where k denotes covariate patterns, h denotes the sub stratification due to ordering by fitted probabilities, and j denotes the categories of the dependent variable. The degrees of freedom for these statistics are given by 2 − − 2 , where 2 refers to the number of rows in the new stratification splitting each row of contingency table and p is the number of categorical variables in the model. These GOF test statistics may be more powerful than the HL GOF test in some situations due to the fact that the structure of individual covariate patterns is kept intact rather than collapsed. The main limitations of these GOF test statistics are not recommended by authors when only continuous variables are modeled and HL GOF test would be preferable, or when only categorical variables are modeled and the standard Pearson or deviance chi-square would be appropriate.
All the reviewed works above are based on the subjective grouping to either the space of the estimated response variable or the space of the covariates. Recently, Xie et al. [15] proposed to use hierarchical clustering analysis (specifically Ward's Method) to group the space of the covariates into clusters of similarity. This has the advantage of identifying groups in which the observations are similarly profiled with respect to their covariate values. They assumed that ( , , ⋯ , ) be the set of covariate values for the observation, = 1,2, ⋯ , . They proposed to use Ward's method of clustering to partition the space of the covariates into groups, denoted by , , ⋯ , and they defined an indicator function for the group by ( ) = 1 if ( , ⋯ , ) ′ ∈ , and 0 otherwise. Consequently, they proposed two GOF tests to assess the adequacy of LRM based on this strategy of grouping. The first GOF test is a Pearson chi-square statistic ( * ) similar to the HL GOF test to assess the lack-of-fit of LRM, given by: where is the number of observations in , is the observed number of events/successes in , and = ∑ ⁄ is the average estimated probability in , which has covariate patterns with observations in the covariate pattern. For abbreviation the second proposed GOF test is exactly same as Tsiatis's GOF test which is discussed above. They considered the distribution of the proposed GOF test closes to chi-square distribution with = − ( 2 ⁄ ) − 1 based on several assumptions about the true distribution of the observations and the parameter estimators.
Xie, et al. [15] pointed out that: (a) both GOF tests for decisions on model fit in their study are applicable to a wide range of model scenarios (data settings) when continuous covariates are present. (b) for all the simulation scenarios, the GOF tests show reasonably well-controlled type I error rate. (c) both GOF tests demonstrate at least equal, if not much higher power in detecting missing quadratic term or missing interaction term, as compared to currently widely used HL GOF test. (d) when both continuous and categorical covariates are present, the two GOF tests along with the HL GOF test outperform the Pulkstenis and Robinson tests in detecting missing quadratic term. But the Pulkstenis and Robinson tests appear to outperform the two proposed tests and the HL GOF test in detecting missing interaction term. (e) these comparisons provide an example in practice that both GOF tests demonstrate better properties.
In spite of these good properties of the strategy of grouping and GOF tests proposed by Xie, et al. [15] they have some disadvantages such as: (a) hierarchical clustering has a general disadvantage since it contains no condition for reallocation of elements which may have poorly classified at an early stage in the analysis [16]. (b) the output of this method of clustering necessarily represent hierarchical relationship among the elements, thus this method of clustering does not appropriate to handling large data sets. (c) when both continuous and categorical covariates are present, the proposed strategy of Xie, et al. [15] treated the dichotomous and ordinal covariates as interval data. (d) as it was known that the Ward's method is an automatic method in clustering the observation started with n clusters and end with one cluster or in reverse direction, Xie et al. [15] did not show how are they used the number of clusters K. (e) they recommended more studies for determining the degrees of freedom for the approximated Pearson chi-square statistic and for improving the clustering process by choosing another clustering method better than the method is used.
All these strategies of grouping and GOF test statistics based on them have their limitations. These limitations of currently available strategies of grouping and GOF test statistics based on them are motivated us to propose a new strategy of grouping based on partitional clustering and constructing two GOF test statistics based on the proposed strategy to assess the adequacy of LRM. Consequently, the main objectives of this study are proposing a new strategy of grouping based on partitional cluster analysis, constructing two GOF test statistics of chi-square type (clustering chi-square and clustering chi-square deviance ) based on the proposed strategy of grouping to assess the adequacy of the LRM and evaluating the performance of the proposed strategy of grouping and the developed GOF tests.
The paper is organized as follows. Proposed strategy of grouping and GOF test statistics are given in Section 2. Thereafter in Section 3, we present some results of analyzing the simulation studies to evaluate the performance of the proposed strategy of grouping and the developed GOF test statistics. An application using real data set from the survival times of patients with prostate cancer who are randomly allocated to a treatment with an estrogen is presented in Section 4. Brief conclusions are presented in the last Section.

Proposed Strategy of Grouping
The proposed strategy of grouping is based on cluster analysis. The term "Cluster Analysis" consists of two main branches of clustering; Hierarchical and Partitional. Partitional clustering involves partitioning a given set of quantitative individuals or elements into a number of distinct groups, called clusters [17]. Also, [18] defined Partitional clustering as the process of organizing the quantitative elements in a dataset into clusters or groups so that the elements within the same cluster have a high degree of similarity, while the elements belonging to different clusters have a high degree of dissimilarity according to some defined similarity criteria. We construct GOF statistics based on the strategy of grouping combine the ideas of the partitional clustering to partition the quantitative covariates spaces in the first stage and to partition the categories of the observed dependent variable space in the second stage of the proposed strategy of grouping. The proposed strategy of grouping combined the ideas of partitional cluster technique ( -Means) [19] to partition the spaces of the continuous covariates and the categories of the dependent variable to partition each group into two subgroups. The proposed strategy of grouping based on the mixed partitioning to divide the range of the covariates and the range of the observed and the estimated dependent variables into clusters of similarity. This enables us to avoid the subjective partitioning disadvantages, and has the advantage of identifying clusters which have the same observations with respect to their covariate and dependent variable values.
Hence, suppose X is a matrix of × covariates and Y is a vector of binary dependent variable in the data set with two categories (0 or 1). = , , ⋯ , ′ , = 1, 2, ⋯ , and = 1, 2, ⋯ , is the covariate in the matrix. The proposed strategy of grouping attempts to partition the elements of the covariates in the matrix X of the covariates into distinct clusters denoted by , , ⋯ , as follows:

Select the Number of Clusters
The first step is selecting the number of clusters (groups) because the proposed strategy of clustering is affected by the fundamental and unresolved problem in cluster analysis. The problem is how many clusters are present in a given data set? This problem was widely studied. Several methods are proposed to identify the number of clusters statistically from a given data set which includes methods such as the gap statistic [20]; a simulated annealing clustering based method [21]; cluster isolation criterion [22]; cluster stability [23] and Rand's statistic [24]. All these methods are based on prior knowledge about the data without any constraint on this number; this means the number of clusters can be any number. Thus, there is no completely satisfactory method for determining the number of clusters for any type of cluster analysis.
These methods are not suitable to use in the strategy of grouping because (a) choosing any number of clusters is irrelevant in constructing the GOF tests and (b) there are some constraints on the number of clusters (groups) when the chi-square type GOF tests are constructed. For example [25] stated that the smallest number of clusters K must be greater than or equal to 6 to ensure that 80% of the expected frequencies are greater than 5. Meanwhile [26] did not specify any number of clusters but instead he stated that "the important point is that K should be larger when n is large. But it is not recommended that one use a very large value of K, and a choice in the range 5-15 seems right". Therefore, we will compare the results of multiple runs with different K number of clusters in the range 5-15 and choose the best one according to the above criterion (expected frequencies) and other two criteria (CC and R 2 ) will discuss later.

Partition the Space of Covariates
In the second step we partition the space of covariates into distinct clusters , , ⋯ , using the idea of K-means cluster analysis [17][18][19][20][21][22][23][24][25][26][27]. The clustering is done on the basis of distance measures and according to the following basic requirements of the clustering process [28]: then the association function ( , ) is defined as follows: where is the vector of covariates and is the cluster. Then, the clustered covariates in this stage are used to fit the appropriate LRM to estimate the probabilities , for more details of how to estimate the probabilities see [25,29].

Cross-classify the Observed Dependent Variable and the Estimated Probabilities
In the last step of the strategy of clustering, a cross-classification table for the observed dependent variable and the estimated probabilities is created by partitioning each cluster into two parts based on the categories of the observed dependent variable (0 and 1). Each observation then belongs to one of 2 distinct clusters as in Table 1.
Three criteria are used to assess the efficiency of the proposed strategy of grouping. The first criterion is the frequency in each cluster (group) where [25] stated that it must be insure that 80% of the expected frequencies are greater than 5. The second criterion is the Clustering Criterion (CC) which is equal to the mean of the squared error or the mean of the distance measurement between the elements of data set and their cluster centers given by: where ‖. ‖ is the Euclidean norm, is the vector of covariates, is the cluster, is the centriod of the cluster ( , ) is as defined in Eq. (7) and is the number of clusters (groups). The small value of the CC means the clustering process was efficient. The third criterion is the dissimilarity criterion. The clustering process aims to produce disjoint or dissimilar clusters. Consequently, the third criterion is used to measure the dissimilarity between clusters is [20].
where = ∑ ∑ − ̅ is the total sum squares which are resulting from comparing the individual observations for each variable against ̅ = ∑ ̃ ⁄ the grand mean for the variable and is the sum squared error resulting from comparing the element in the variable of the group against the group mean ̃ for the variable. The value of is interpreted as a measurement of dissimilarity between clusters. Therefore, we have a clustering process gives disjoint or dissimilar clusters when we have large value of .

Construct the Proposed GOF Test Statistics
The proposed strategy of clustering is an automatic process that often yields clusters (groups) with unequal sizes, where ≠ ≠ ≠ ⋯ ≠ ; here is the number of observations in the cluster. Then, the assumption of the groups with equal size is avoided. Consequently, the importance of large clusters must be considered by calculating the proportional weight of each cluster and using this weight to calculate the weighted observed and weighted estimated frequencies for each cell in Table 1. Therefore, the weighted observed frequency of category of dependent variable in cluster is calculated as: where is the observation of the dependent variable in the category and in cluster; is the number of the observations into category of dependent variable and cluster; = 1 if belong to g category in k cluster and 0 otherwise and = ⁄ is the proportional weight of cluster.
Meanwhile, the weighted expected frequency of category in cluster is calculated as follows: where = 1 if π belong to category in cluster and 0 otherwise, is the observation of the estimated probability in the category and in cluster, and is the number of observations of the estimated probabilities in the category of the dependent variable and in cluster. After that, a crossclassification table consists of the weighted observed frequencies which is calculated as in Eq. (10) and the weighted expected frequencies which is calculated as in Eq. (11) is created as in Table 1.
The chi-square type GOF test statistics are constructed by comparing the weighted observed and the weighted expected frequencies in category of dependent variable in cluster. Hence, the first proposed GOF test statistic is the clustered chi-square which is calculated as follows: and the second proposed GOF test statistic is the clustered deviance is given: The proposed GOF test statistics and are designed to allow us to assess the GOF of the LRM. They differ from the existing GOF test statistics in their construction based on efficient strategy of grouping and weighted observed and expected frequencies for each cluster. Hence, the criteria discussed above are used to investigate the performance of the proposed strategy of grouping as in simulation study 1, and the other simulation studies are used to investigate the performance of the proposed GOF test statistics. Also, clinical dataset is analyzed to investigate the performance of the proposed GOF tests as shown in the next Sections.

Simulation Results and Discussion
Extensive simulation studies are conducted to assess the performance of the proposed strategy of grouping and to investigate the properties of the proposed GOF tests. The objectives are to assess the adequacy of the proposed strategy of grouping to give disjoint groups, to assess the power of the GOF test statistics to detect a variety of departures from the LRM and to compare the performance of the proposed GOF test with some of existing GOF test (when appropriate). Both of the proposed GOF test statistics are based on the chi-square approach with additional stratification; it follows that both tests should follow asymptotically chi-square distribution with 2 − − 2 degrees of freedom, where is the number of clusters (groups) and is the number of parameters in the model.
In all simulation studies, a given model is assumed for both the true underlying linear predictor and the joint distribution of the covariates. Random sample of vectors of uncorrelated covariates in each replication was generated, and ′ computed for each independent sampling unit. The response was determined by comparing the underlying model ( ) = ′ 1 + ′ to a uniform random variable ~ (0,1) , assigning = 1 if ≤ ( ) and 0 otherwise, = 1, 2, . . . , . This process gives a matrix X of × covariates and Y is a vector of binary dependent variable in the data set with two categories (0 or 1). The proposed strategy of grouping attempts to partition the elements of the covariates in the matrix X into distinct clusters denoted by , , ⋯ , in the first stage and in the second stage the categories of the dependent variable are used to partition the observations of each cluster into two sub clusters. Therefore, the following simulation studies are implemented under the null hypothesis that the fitted model is the correct model to provide the above objectives.

Assess the Performance of the Proposed Strategy of Grouping
The idea of this simulation study is taken from [6] with some modification. Two data settings are considered to examine the performance of the proposed strategy of grouping when the following fitted LRMs are the correct model: Model (2) These models represent an increasing in complexity according to the number of covariates and differ in the distributions. The first model in Eq. (14) consists of only continuous covariates ~ (−6,6) and ~ (0,2). The second model in Eq. (15) consists of discrete covariate ~ (6) in addition to the covariates in the first model to evaluate the effect of the discrete covariate on the strategy of clustering. Therefore, these models represent the expected cases that may occur in practice.
The distribution of ( ) is considered as a transformation of the distribution of . For example the Uniform distribution (− 6, 6) produces a symmetric distribution with mostly small or large probabilities; while the covariate has a highly skewed right distribution such as the (4) distribution results mostly small but a few large probabilities. Other choices for the distribution produce a more uniform distribution of probabilities [6]. The values are chosen in these models according to the following properties [29]: (a) the signs of determine whether ( ) is increasing or decreasing as increases. (b) When → the curve of ( ) is flatten to a horizontal straight line. (c) When = Y is independent of X. (d) for quantitative X when > the curve of ( ) have the shape of the cumulative distribution function ( ) of the logistic distribution.
According to these considerations we choose the distributions of the covariates. Also, we choose the beta coefficients of the models according to these characteristics. Consequently, the beta coefficients are chosen as = 0, = 0.8, = 0.75, and = 0.60 to give approximately same importance for the covariates. In this simulation study, the performance of the proposed strategy of grouping is assessed. Therefore, the first step is generating sample of size = 200 values of the covariates according to their properties in both data settings. The proposed strategy of grouping is used to partition the covariates space into clusters in the first step. The results in Table 2 show the values of the criteria (frequency of each cluster, cluster criterion CC and dissimilarity criterion ) for = 5, 10 or 15 in both models.
These criteria will be used to evaluate the performance of the proposed strategy of clustering. All these criteria show that the value of CC decreases when the number of clusters increases, on the other hand, the value of increases when the number of clusters increases. These results also show that the number of clusters = 15 is inappropriate to be used in construction of GOF test of chi-square type because it gives more than one frequency less than 5 in spite of the low value of CC and a high value of .
At the same time these results show that the number of clusters = 10 shows a potential use where all the three criteria agree that this number is the best to be used in constructing a chi-square type GOF tests. In brief, these results (large frequency in each group, small value of CC and large value of ) show that the proposed strategy of clustering has adequate efficiency to give separate clusters (groups) regardless of the number of clusters or the number of covariates.

Assess the Performance of the Proposed GOF Tests ( )
The performance of the proposed GOF tests ( and ) is assessed in the second step. Extensive simulation studies were conducted to assess the power of the proposed GOF tests ( and ) to detect the particular types of departure from LRMs under a relatively wide variety of data settings. The power of a statistical test is the probability that it will correctly lead to the rejection of a false null hypothesis [30], and also, he defined the statistical power as the ability of a test to detect an effect, if the effect actually exists. Conventionally a test with a power greater than 80% is considered statistically powerful [31]. The detection power of the proposed GOF test statistics are evaluated by simulating data from several LRMs, and then the models are fitted with purposely exclude terms.

The detection power of omitting the quadratic term
In the first data setting, we use the idea of the data setting that was modified by Xie et al. [15] from the one used in Hosmer et al. [6] to investigate the effect of deleting a quadratic term in a continuous covariate on the performance of the proposed GOF tests. The model has two continuous covariates ( and ) and the quadratic term of as follows: where ~ (−3,3) , we used three different distributions for : ~ (−1,1), ~ (0,4) and ~ (4,2). The values of the coefficients of the model are defined as in the above modified study. These values are chosen as: = −3.2324, = 0.5583, = 0.5002 and = 1. In this simulation study we assess the effect of deleting the quadratic term from the model on the performance of the new GOF test statistics and compare the performance of the proposed GOF tests with the performance of and HL GOF test ( ) and the GOF tests proposed by Xie et al. [15] using these reduced models. Table 3 shows the test size (type I error rates) and the percent of times each of the tests rejected the hypothesis of fit (test power) at the = 0.05 level using sample sizes = 200 and = 500 with 500 replications.
The results in Table 3 show that the estimated Type I error rates for the proposed GOF tests ( and ) appear to be on the conventional side for the supposed level = 0.05 of the test in both sample sizes and for all the distributions. These results also show that HL GOF test does not control the Type I error in both sample sizes and in most distributions. In this case, HL GOF test has an inflated Type I error rates in both sample sizes and most distributions. Furthermore, these results show that the estimated Type I error rates for the Pearson chi-square type statistic * which is proposed by Xie et al. [15] appears to be on the conventional side for the supposed level = 0.05 of the test. Meanwhile the score test statistic * which is proposed by Xie et al. [15] has inflated Type I error rates in both sample sizes and most distributions.
According to these estimated Type I error rates, it is important to make detection power comparisons between the proposed GOF tests and the other tests. Consequently, Table 3 shows the results for different distributions. For all these distributions, the detection powers of the two proposed GOF tests are higher than the detection power of HL GOF test. This is in addition to the lack of control on the Type I error of this test. Meanwhile, the detection powers of the proposed GOF tests are similar to the detection powers of chi-square test proposed by Xie et al. [15] but higher than the detection powers of the score test T * , in spite of the detection powers for * test when the distribution is uniform in both sample sizes are questionable according to their Type I error rates.  [15] In general, the detection powers of the proposed GOF tests are somewhat higher than that of HL GOF test and somewhat similar to the detection powers of Xie et al. [15] GOF tests. The increase in the sample size and the skewness in the distribution of the deleted quadratic terms do not affect the detection powers of the proposed GOF tests but the detection powers of other GOF tests are increased as sample size increases. The skewness in the distribution of the deleted quadratic term decreases the detection powers of other GOF tests and inflated the Type I error rates. The proposed GOF tests maintain higher or at least equal power as the other GOF tests.

The detection power of omitting the interaction between dichotomous and continuous variables
The idea of the second model is taken from [2] to investigate the performance of the new GOF test statistics and the ability to detect the omission of the interaction between dichotomous and continuous variables. The model is given by: and . The performance of the proposed GOF test statistics is compared to the HL GOF test and Pulkstenis-Robinson GOF test statistics ( and ) using these reduced models. The data is generated with the above model and then the model is fitted with omitting only the interaction term. A total of 500 iterations were performed for sample sizes = 100 and = 500 subjects and the detection powers are provided in Table 4.
These results indicate that all GOF test statistics have detection powers that increase with both sample size and the strength of the interaction. Also, for this simulation study, the proposed GOF test statistics and have somewhat higher detection powers than the other GOF test statistics.

The detection power of omitting the main effect term
In addition to the ability to detect the omission of the interaction term, it is of interest to evaluate the power to detect the omission of the main effect term. This was done by generating data from the following model [2] and then the model is fitted after excluding :  Table 5. The results given in Table 5 indicate that none of these GOF tests are particularly powerful to detect this kind of misspecification in the model.

The detection power of a misspecification link function
Lastly, we examined the ability to detect a misspecification of the link function by generating data from the following complimentary log-log model and incorrectly fitting a logit model [2]: where = −1.0 , = 0.5 , = −0.5 , = 0.10 , ~ (−6,6) and ~ (0,15) . A total of 500 replications were performed for sample sizes of = 200; = 400 and = 800 elements and the power of detection from fitting the model in Eq. (19) with a misspecification link function are provided in Table 6. The results given in Table 6 again indicate a fairly low power to detect this type of lack-of-fit in the model.

Clinical Data Set
As an example in real situation, the survival times of 501 patients with prostate cancer who are randomly allocated to a treatment with an estrogen are considered. This data set was considered by several authors such as [32][33] and more recently by [34]. In this data set, the value of the outcome variable status classifies the cause of death as 1 = cancer (the event of interest) and 0 = other. The patients are considered treated if they received at least 1 mg of estrogen daily and the other covariates as described in Table 7. This data set will be used to assess the performance of the proposed strategy of grouping based on partitional clustering in the first step and in the second step the performance of the developed GOF tests is assessed as in the following subsections.

Assess the Performance of the Proposed Strategy of Clustering
We used the proposed strategy of grouping to partition the space of the continuous covariates in this data set for different number of clusters = 5, 10 or 15 and assess the performance of this strategy based on the criteria discussed above. The results in Table 8 present the estimated values of these criteria. The results in Table 8 show the values of the criteria which are used to assess the performance of the proposed strategy of grouping in this data set. All these results show that the values of CC decreased and the values of increased when the number of clusters K increased. Also all these results show that the number of clusters = 15 is not suitable to be used in constructing GOF tests of chi-square type because it gives more than one frequency less than 5 in spite of it gives a smaller value of CC and higher value of . At the same time these results show that the number of clusters = 10 shows a potential use where all these criteria agree that this number is the best to be used in constructing GOF tests of chi-square type. In brief these results show that the proposed strategy of clustering has adequate efficiency to give separate clusters (groups) with a moderate number of clusters.

Assess the performance of the proposed GOF tests
The performance of the proposed GOF tests ( and ) is assessed in the second step. In order to do this, the outcome variable status ( ) classified the cause of death as 1 = cancer (the event of interest) and 0 = others. The objective of this study is to model this outcome as a function of various covariates. Thus, two LRMs are candidates to associate this outcome variable with the different covariates in this clinical data set as follows: Model 2 where ( ) = ( = 1| ) and the covariates X are described as in Table 8. Model 1 represents the relationship between outcome variable and the continuous covariates in the data set. Model 2 represents the relationship between the outcome variable and the combined covariates (continuous and categorical). Since Model 1 is nested in Model 2, the likelihood ratio test was used to compare the two models and the result showed that Model 1 is a significant departure from Model 2 ( − = 0.0223). Table 9 represents the decisions of the proposed GOF tests along with the HL GOF test to assess these two models.
The results in Table 9 show that while the HLGOF test accepts the two models, both of the proposed GOF tests reject Model 1, but none of these GOF tests finds evidence to reject Model 2. These decisions to reject Model 1 are also supported by the likelihood ratio test, which indicates that Model 1 is nested in Model 2. Also, these results show, based on clinical considerations and the original analysis of this data set, that Model 2 with all the covariates is an adequate model to associate the outcome variable status with the covariates in this clinical data set.

Conclusions
The results from implementing the simulation studies and analyzing the clinical data set assist to conclude that the proposed strategy of grouping has adequate efficiency in giving separate clusters. It is more flexible in determining the number of clusters. It is appropriate to construct the GOF test statistics of chi-square type. It helps to avoid the problems with the similarity measurements in the categorical data and it does not need to convert the continuous covariates, so that the information is not lost.
On the other hand, two GOF test statistics and are constructed based on the proposed strategy of grouping. The results from conducting the simulation studies and analyzing the clinical data set assist to conclude that the proposed GOF test statistics have a wide range of detection to detect any departure in the fitting model from the true model. They have adequate power of detection higher than the existing GOF test statistics for different factors such as sample size and the departure from the true model. They have a high power of detection when the simple LRM (with one covariate) or multiple LRM (with more than one covariate) are used to fit the data set and they have adequate performance when the sample size is large.
In this paper, the problems of partitioning the space of the covariates and developing GOF tests are studied for the binary LRM. Thus, for improvement and future works the strategy of clustering and the GOF test statistics based on it can be adapted to apply to the other logistic regression models, such as ordinal or multinomial LRMs. Also, another area of research is adapting this strategy of grouping and the GOF test statistics for use in the other GLMs such as Poisson regression model and log-linear model. The proposed strategy is based on partitioning the range of continuous covariates using -means and multiple comparisons to determine the appropriate number of clusters . Further study may result in a better or optimal rule in determining K and choice of clustering method. Another future study, a partitional clustering process may be developed to cluster the combined data set (continuous and categorical) covariates at the same time, when both continuous and categorical covariates are present. Adapting the strategy of clustering to partition the data set with categorical covariates only is also, another area of future work.