Logistic Box-Cox Regression to Assess the Shape and Median Effect under Uncertainty about Model Specification
Li Xing, Xuekui Zhang, Igor Burstyn, Paul Gustafson

TL;DR
This paper introduces a Logistic Box-Cox regression approach to better understand the shape of exposure-disease relationships and accurately estimate the median effect under model uncertainty in epidemiologic studies.
Contribution
It develops a novel regression method that accounts for shape uncertainty and improves inference of the exposure-disease relationship and median effect.
Findings
The method accurately infers the shape of the relationship.
It provides precise estimates of the median effect.
The approach outperforms traditional two-step methods.
Abstract
The shape of the relationship between a continuous exposure variable and a binary disease variable is often central to epidemiologic investigations. This paper investigates a number of issues surrounding inference and the shape of the relationship. Presuming that the relationship can be expressed in terms of regression coefficients and a shape parameter, we investigate how well the shape can be inferred in settings which might typify epidemiologic investigations and risk assessment. We also consider a suitable definition of the median effect of exposure, and investigate how precisely this can be inferred. This is done both in the case of using a model acknowledging uncertainty about the shape parameter and in the case of ignoring this uncertainty and using a two-step method, where in step one we transform the predictor and in step two we fit a simple linear model with transformed…
| Distribution of | Shape of Relationship | Disease Rarity | Exposure-Disease |
|---|---|---|---|
| 5 | Association | ||
| log | |||
| weakly skewed | square-root | low | weak |
| mild skewed | linear | mild | |
| highly skewed | square | high | strong |
| Logistic Linear Model | Logistic Box-Cox Model | ARE | ||
|---|---|---|---|---|
| value | AIC | Slope (SE) | ||
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsIndustrial Vision Systems and Defect Detection
Logistic Box-Cox Regression to Assess the Shape and Median Effect under Uncertainty about Model Specification
Li Xing
Mathematics and Statistics
University of Victoria
Victoria, BC, Canada
&Xuekui Zhang
Mathematics and Statistics
University of Victoria
Victoria, BC, Canada
&Igor Burstyn
Department of Environmental and Occupational Health
School of Public Health
Drexel University
Philadelphia, PA, USA
&Paul Gustafson
Department of Statistics
University of British Columbia
Vancouver, BC, Canada Correspondence to Paul Gustafson, Department of Statistics, University of British Columbia, 3182 Earth Sciences Building, 2207 Main Mall, Vancouver, BC, Canada, V6T 1Z4. Email: [email protected]
Abstract
The shape of the relationship between a continuous exposure variable and a binary disease variable is often central to epidemiologic investigations. This paper investigates a number of issues surrounding inference and the shape of the relationship. Presuming that the relationship can be expressed in terms of regression coefficients and a shape parameter, we investigate how well the shape can be inferred in settings which might typify epidemiologic investigations and risk assessment. We also consider a suitable definition of the median effect of exposure, and investigate how precisely this can be inferred. This is done both in the case of using a model acknowledging uncertainty about the shape parameter and in the case of ignoring this uncertainty and using a two-step method, where in step one we transform the predictor and in step two we fit a simple linear model with transformed predictor. All these investigations require a family of exposure-disease relationships indexed by a shape parameter. For this purpose, we employ a family based on the Box-Cox transformation.
K****eywords Shape of the Exposure-Disease Relationship Median Predictive Effect Factorial Design Misspecified Model Logistic Box-Cox Model Quasi-Newton Method
1 Introduction
Epidemiologists are often confronted with skewed distribution of exposure or dose-metrics (such as cumulative exposure) that is suspected to be related in a non-linear fashion with commonly employed functions of risk of a health outcome, such as is afforded by logistic regression. For instance, there may be saturation and threshold effects, as well as reversals of direction of association at different doses (e.g. drinking and heart health reported by Doll et al [6]). Therefore, the underlying assumption in the logistic regression about the linearity between the log-odds of disease and exposure may not be valid. As a remedy, researchers transform the exposure measurements using a logarithmic or square-root function and then plug the transformed measurements into a logistic model as the predictor. This data transformation step before model-fitting aims to make the relationship between the log-odds and the transformed exposure closer to linear. However, such two-step approach ignores the uncertainty in the nonlinear association by enforcing a logarithm or square root function, which lacks a theoretical justification for the choice of transformation function. Therefore, we build a parsimonious one-step model for two purposes. First we estimate a shape parameter in the model based on the maximum likelihood (ML) estimation from the data and this shape parameter shows the most likely nonlinear association type. Second the estimated shape parameter is an optimal transformation, which, in practice, provides the theoretical justification for the type of transformation for those who prefer the two step approach. Our discussion focuses on the general risk model for the association between a binary disease outcome, Y , and a continuous exposure variable, X. Assume as is often realistic for environmental exposures [19]. For the -th subject, we have
[TABLE]
where , for , for , and . The function is a Box-Cox transformation [3]. Statistical models involving the Box-Cox transformation are discussed extensively in literature. In linear regression, due to requirement of normality of residuals, the Box-Cox transformation is often employed on the outcome variable [16, 5, 15, 3]. In both linear and logistic regressions, in order to satisfy linearity requirement between log-odds and predictors, the Box-Cox transformation is suggested for predictors [24, 18, 7]. We emphasize two desirable properties of the Box-Cox function: the continuity at and ability to accommodate several familiar transformations ( i.e., the logarithm function at , the linear function at , the square-root function at , and the square function at ).
As a nonlinear model, the gradient of the log-odds of the logistic Box-Cox model is no longer constant. We are interested in this gradient with respect to for some choice of . Particularly, we define
[TABLE]
The quantity represents the instantaneous effect of the predictor on the scale. In the Box-Cox model, if we can correctly specify , represents a constant effect on the scale. For , the value of changes over representing a non-constant effect on . More specifically, follows . Gelman and Pardoe [10] suggested averaging the effect of a predictor over the population distribution of predictors. Examples are shown in linear regression models [21] and in the survival analysis context [13]. We adapt their definitions to the logistic regression context to arrive at a summary of . We define the average effect, , and the median effect, , as summary measurements of the effect of the predictor on the scale in the following.
[TABLE]
and
[TABLE]
Because median is more robust than mean for a long-tailed distribution, going forward we adopt the median effect, , as the representative of the overall gradient of the log-odds.
In Section 2, we provide two propositions on the MLE of the logistic Box-Cox model and propose an optimization algorithm to obtain the MLE. In Section 3, we discuss the misspecified logistic linear model and define a quantity to measure the distance between the median effect and the slope coefficient estimated from the misspecified model. In Section 4, we design and conduct simulation studies to evaluate the accuracy of the parameter estimates of the logistic Box-Cox model based on the quasi-Newton method, to compare the median effect and its approximation from a simple linear model with transformed predictor, and to calculate the asymptotic standard deviations of the model parameter estimates as well as that of the estimated median effect. In Section 5, we apply our model to a real data set and compare this model with three two-step approaches. In Section 6, we summarize our results and draw conclusions.
2 The Logistic Box-Cox Model
In this section, we prove that the log-likelihood function of the logistic Box-Cox model is strictly concave. So to obtain MLE, we only need to find the root of the score function. Based on this property and optimization methods for this model in the literature, we use the quasi-Newton algorithm to compute the MLE. In addition, we use numerical methods to approximate the asymptotic variance of the MLE, which help us understand the precision of the parameter estimates under large samples and also help design our future experiments.
Proposition 1
The Hessian matrix of the log-likelihood function of the logistic Box-Cox model is negative definite for any interior point in the three dimensional space .
Corollary 2.0.1
The log-likelihood function is strictly concave and, therefore, any root of the score function is the unique global maximum of the likelihood function.
The proof of the Proposition 1 is given in the appendix and the proof of the corollary is trivial. In the literature, there are two kinds of optimization methods for this model. Egger [7] mentioned the difficulty of convergence for the Newton-Raphson method in practice and suggested using the profile likelihood (PL) method, where we do a grid search on the shape parameter , use iteratively re-weighted least squares to estimate the regression coefficients, and , given each fixed , and choose the set of estimates based on ML. Guerrero et al [12] suggested a quasi-Newton method to estimate the parameters of the logistic Box-Cox model. Different from the Newton-Raphson method, in the quasi-Newton method, we replace the inverse of the Hessian matrix by an approximation in each iteration. This can reduce the numerical non-stability in getting the inverse of a matrix. As the log-likelihood has such nice properties, we choose the quasi-Newton method, but use the PL method to obtain the initial points. Particularly, the quasi-Newton method that we employ is the Broyden-Fletcher-Goldfarb-Shanno (BFGS) optimization method ([8, 4, 11, 23]), which has been written in a wrapper function in the r package, maxLik [14].
Proposition 2
[TABLE]
The proof of Proposition 2 is also given in the appendix. This proposition demonstrates that, under a weak association between the predictor and outcome variables (i.e. small value of ), in order to get a precise estimate of the shape parameter, we need a large sample size as we know that . We calculate the asymptotic variance of the model parameters based on inverse of the Fisher information matrix through numerical methods, where details are in the appendix, and we calculate the asymptotic variance of the median effect, , based on the multivariate delta method listed below.
[TABLE]
3 The Misspecified Logistic Linear Model
Assume that the true model is a logistic Box-Cox model. We are interested in the bias incurred if we fit a misspecified logistic linear model with a Box-Cox transformed as a predictor. In the misspecified model, the type of Box-Cox transformation is given beforehand, which means the shape parameter, , is a fixed constant. We denote the transformed predictor as , where
[TABLE]
The misspecified model is written as below.
[TABLE]
To obtain the large-sample limit of the estimated coefficients, , we need to solve the following equations:
[TABLE]
where . Due to the misspecified likelihood, the inverse of the Fisher Information matrix is no longer providing the asymptotic variances of the parameter estimates. Therefore, we use the sandwich type estimates [25, 9] for the variance estimates, whereby
[TABLE]
where with representing the likelihood function of the model ( 13) and representing the Hessian matrix, , and is the solution of ( 14). More detailed mathematical work is provided in the appendix.
4 Simulation Studies
In the simulation studies, our aims are three-fold: (1) evaluating the accuracy of the parameter estimates in the logistic Box-Cox model based on the BFGS method, (2) comparing the distance between the median effect from the underlying logistic Box-Cox model with its approximation, the large sample limit of the estimate of the slope parameter from the misspecified linear model, and (3) calculating the asymptotic standard deviations of the model parameter estimates as well as that of the estimated median effect. To achieve these aims we design a factorial experiment, using factors whose levels reflect plausible contexts for epidemiologic investigations.
4.1 Simulation Design
We choose four factors to control our simulation experiment, which are:
the shape of exposure distribution; 2. 2.
the shape of exposure-disease relationship; 3. 3.
the disease rarity; 4. 4.
the strength of exposure-disease association.
Table 1 shows us the levels of each factor. First, without loss of generality, we fix the -th percentile of the distribution of at and vary to control the level of skewness of the distribution of . Second, we vary the shape parameter, , as and , which corresponds to log, square-root, linear and square functions respectively. Third, we use the probability of disease at the -th percentile of the exposure to indicate the disease rarity, varying this as and . Fourth, we consider the ratio of the probability of the disease at -th percentile of the exposure to the probability of the disease at -th percentile, which is denoted as
[TABLE]
We let and to represent weak, medium and strong associations respectively.
Figure 1 shows the disease risk as a function of the exposure in the described 72 settings. In each panel, the distribution of exposure and the disease rarity is fixed. The risk functions vary with the shape parameters in the model and the risk ratios indicating the strength of the association. We can see that given the distribution of exposure, as the exposure-disease association becomes stronger, the risk differences between different shape parameters at the same exposure level become larger. Also, given the association, as the distribution becomes more skewed, the risk differences between different shape parameters at the same exposure level become larger. These indicate that the skewness and the strength of association may be related to the precision in estimating the shape parameter. Also this figure illustrates the magnitude of the risk and the gradient of the log-odds with respect to under different experimental settings. This can help us understand the real data under the similar conditions and also guide our future experiments.
4.2 Simulation Results
4.2.1 Aim 1: Evaluation of the BFGS method
In this simulation, under each setting, we generate data sets, for each of which we generate ’s as , and the corresponding ’s from the Bernoulli distribution with probability . For each data set, we apply the PL method firstly, and use the estimates of the PL method as the initial points for the BFGS method.
Figure 2 demonstrates that the ML estimation implemented with the BFGS algorithm provides fairly accurate estimation of when the exposure variable and disease outcome have some degree of association. When their association is very weak, the bias and RMSE are considerably larger. However, with the medium level of association the bias is much smaller than . This suggests we can easily distinguish a linear transformation from a square-root one or a square-root one from a log one. The stronger the association is the more accurate the estimates are. The results confirm that the BFGS method works well for our model fitting. The figures for bias and RMSE in estimating other parameters are provided in the appendix.
4.2.2 Aim 2: The Gradient Measurement of the Logistic Box-Cox Model and Its Estimate
In the logistic Box-Cox model, we use the median effect, , to represent the gradient of the log-odds with respect to scale. We hope that if the sample is large enough, the estimate of the slope coefficient, from the misspecified logistic linear model with as the predictor can be a good approximation of . Therefore, we define the absolute relative error (ARE) to measure the difference between the large sample limit, , and . That is,
[TABLE]
where is defined in the misspecified model ( 13). Under each of the settings, we fix the level of the other three factors and let the value of vary from [math] to with an increment of . And for each , we generate of ’s from and then we have the corresponding probability . We vary from [math] to with an increment of . For each , we approximate expectation of the functions in equation ( 14) by their sample mean from samples of the of ’s and then solve the equations to get the limiting coefficient, . As we have the true value of , we get the numerically approximated AREs as a function of and under each setting.
Figure 3 shows ARE as a function of and under the settings with rare disease, weak association, and medium skewed distribution. The pattern is similar for all the settings. We can see that for each , when approaches from the right side, ARE monotonically decreases and the rate of decrease is close to constant. When approaches from the left side, ARE behaves like a quadratic function, with a maximum point between [math] and . Therefore, to get smaller ARE, we suggest that it is safer to guess . Though the patterns are similar among all settings, the ARE inflates under conditions of strong association, common disease rarity, and more skewed distribution of .
4.2.3 Aim 3: Calculation of the Asymptotic Standard Deviations
Without loss of generality, we calculate the asymptotic standard deviation (ASD) of for a dataset with one observation based on numerical approximation of the inverse of the expected Fisher information matrix described in the appendix.
Figure 4 demonstrates that decreases when the association becomes stronger, when the disease becomes more common, or when the predictor is more skewed given other conditions do not change. Particularly, under a weak association, , and a rare disease situation, , ) is much larger than in the other situations, which indicates that when information is weak, it is harder to determine of the value of . The numerically approximated can help us design future studies. For example, if we would like to detect the difference of in the estimate of in order to distinguish between a logarithm transformation and a square-root transformation, the standard error (SE) of should be less than . We can achieve this by adding more samples. Under and the weakly skewed exposure, so that the sample size required to make is equal to . Therefore, any sample size larger than can provide us the power to distinguish the difference of in the estimate of under the weakest condition, while this requirement decreases to less than one fourth of the big number when the condition changes to and others maintain the same. Note that in virtually all cases, it is not feasible to recruit around 30 millions participants in a study. To achieve this precision, the least requirement of the sample size among all of the settings of consideration is only , which is under and .
We also calculate for a single-observation dataset based on the sandwich method for the misspecified likelihood and numerical methods, as discussed in Section 3 and the appendix. In addition, we vary and to understand the difference across .
Figure 5 illustrates that inflates under two extreme conditions. One is under weak association, rare disease, mild skewed distribution of and . The other is under strong association, common disease, and . When there is weak association, rare disease and mild skewed condition, we can not get a precise estimate of the slope based on the misspecified linear model on any of the examined scales of . On the other side, when there is strong association and common disease, we can not get a precise estimate of the slope if we enforce a linear pattern on a square scale. In general, with is relatively low under all situations, though the precision worsen slightly when is further from [math]. This implies that when there is little information, a logarithm transformation is a safer guess.
Finally, we calculate based on the multivariate delta method.
Figure 6 illustrates that under all experimental settings, is monotonically increasing as a function of . This makes sense since when becomes smaller, shows the gradient at a slower changing scale. Therefore, is always the smallest for each setting, which indicates precise estimation of the median effect on the log scale.
5 Application
We analyze data from the National Health and Nutrition Examination Survey (NHANES) -, which involves adults aged years and above with measurements of both total blood mercury and depression. The exposure variable, , is the total blood mercury in microgram per liter (ug/L), and the binary outcome, , is dichotomized from the score of the Patient Health Questionnaire- (PHQ-) with [math] indicating no depression (PHQ- score ) and indicating depression (PHQ- score ).
Shown in Figure 7, the total blood mercury is right-skewed. And its distribution is approximated by the log-normal with and . We fit the logistic Box-Cox model relating the blood mercury level to prevalence of depression. The estimated parameters are (SE ), (SE ), and (SE ). Therefore, we can see that the estimated prevalence of depression at is . And the instantaneous risk decline rate of prevalence of depression at certain level of the total blood mercury can be calculated. For instance, at , this rate is
[TABLE]
Plugging in the estimated coefficients, we get its estimate, The estimated median effect on , , is with the point-wise confidence interval , showing an overall negative association between the total blood mercury and depression. Next we would like to compare this fitted Box-Cox model with the misspecified linear model on scale for and . In Table 2, we include the estimated slope coefficients and the Akaike information criterion (AIC) of the misspecified models, the corresponding estimated median effects from the logistic Box-Cox model, and the estimated ARE between the estimated median effect and the estimated slope coefficient from the data. When , we have the minimum AIC, which suggests the square-root model is the best among the three misspecified models. On the other hand, if we look at ARE, the smallest ARE occurs between the log model and the logistic Box-Cox model.
To illustrate the local pattern of the relationship between the total blood mercury level and depression, we use a three-step procedure. First, we sort the data based on the blood mercury level from small to large. Second, we bin every 500 samples based on this order, with the last group contains all the remaining samples. Third, we plot the observed risk over the range of the blood mercury level in Figure 8. From the local pattern, we see that the overall decrease of the risk associated with the increase of the total blood mercury level. The curves of the estimated risks from the logistic Box-Cox model and the three misspecified logistic linear models over the range of the total blood mercury are also added in Figure 8, showing that the estimated risks of the square-root model are closest to those of the logistic Box-Cox model.
In addition to the graphical illustration, we compare the goodness of fit of the four models and also compare their predictions. We conduct the Hosemer and Lemeshow goodness of fit (GOF) test [17] for the four models. This test statistic is the sum of the difference between the expected and the observed risks over pre-defined subgroups. To avoid the result depending on the number of subgroups, we vary the number of subgroups from to and for each partition of subgroups, we conduct the test. The resulting p-values are reported in Figure 9, which demonstrates that the square-root model is comparable to the Box-Cox model, while the logarithmic model is the worst in terms of goodness of fit.
We also compare the predictions of the four models using 10-fold cross-validation, where we split the total samples equally into ten subgroups. Nine of the subgroups are combined as the training set that we use to fit the model, while the remaining one is the test set that we use for prediction based on the fitted model from the training set. When we iterate over all the possible combinations of nine subgroups, the predicted risks from all the test sets become the prediction on all of the samples. We use r package caret [20] for the data partitions, since its functions generate random samples within the level of the outcome and, therefore, the splits have the balanced class distributions. To compare the predictions, since all of the models have the same receiver operating characteristic (ROC) curve, we use two criteria, the mean absolute error and the mean squared error of the estimated risks. The mean absolute errors from the logistic Box-Cox model, the linear, the square-root and the log models are and , while their mean square errors are and . The errors from different models are close to each other, which is mainly due to the low exposure-disease association, ( the estimated risk ratio between the th percentile and the th percentile = ), (Refer to the (2, 2) panel of Figure 1). In summary, we conclude that the square-root model is comparable to the logistic Box-Cox model, and both outperform the log model. It is important to note that our analysis of NHANES data was not meant to illuminate association between mercury and depression, as it is most likely confounded to the degree that makes it impossible to argue that mercury protects against depression [22].
6 Discussion
The logistic Box-Cox model is a formal method, which can accommodate the non-linear relationship between the log-odds and exposure via a shape parameter. The estimate of this parameter is determined based on the ML method. Particularly, we discuss the profile likelihood (PL) and the quasi-Newton methods. The profile likelihood can might lead to a local maximum solution. The quasi-Newton method targets the global maximum, but it is sensitive to the initial point. We recommend the PL method to provide the initial values for the quasi-Newton to guarantee a good starting point. In this way, we borrow strength from both methods in an attempt to obtain a superior overall approach.
As a non-linear model, the gradient of the log-odds with respect to the predictor is not constant. This encourages us to define the median effect, which represents the gradient over the entire distribution of the predictor. We generalize this quantity to the scale. In this way, we can compare it with the slope from the misspecified model based on the power transformation of . The ARE is a measure of the distance between the large sample limiting value of the slope estimate and the median effect on the same scale. We see that even when model is misspecified, when there is little information, the slope estimated from the log transformation is can be close to the median effect relative to the magnitude of the median effect.
We calculate the asymptotic standard deviation of the estimate of the shape parameter, that of the estimated slope parameter given a certain scale, and that of the estimated median effect given a certain scale based on numerical methods. These quantities can help us design future studies. For instance, if we have prior knowledge about nonlinear relationship and skewed exposure, we can estimate the required sample size based on the desired accuracy for the estimate of the shape parameter. For the conducted studies with limited sample size, if disease is rare and association is not strong, the logarithm transformation provides stable measurement since now the more complex logistic Box-Cox model is less helpful due to the large estimated uncertainty on the parameter estimates.
7 Acknowledgements
This research is supported by NSERC through the Discovery Grants program, through the Canada Research Chair program, and through the NSERC Postdoctoral Fellowships Program and by the University of Victoria through a UVic Internal Research Grant and the UVic Faculty of Science.
References
- [1]
Bartle, R.G.,
The elements of integration and Lebesgue measure. Wiley Interscience. (1995).
- [2]
Abramowitz, M and Stegun, I A,
Handbook of Mathematical Functions, 10th printing with corrections. Dover (1972).
Additional Figures
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] M. Abramowitz and I. A. Stegun. Handbook of Mathematical Functions, 10th printing with corrections . Dover, 1972.
- 2[2] R. Bartle. The elements of integration and Lebesgue measure. Wiley Interscience, 1995.
- 3[3] G. Box and D. Cox. An Analysis of Transformations. Journal of the Royal Statistical Society. Series B (Methodological) , 26(2):211–252, 1964.
- 4[4] C. G. Broyden. The Convergence of a Class of Double-rank Minimization Algorithms 1. General Considerations. IMA Journal of Applied Mathematics , 6(1):76–90, 1970.
- 5[5] R. J. Carroll and D. Ruppert. On prediction and the power transformation family. Biometrika , 68(3):609–615, 1981.
- 6[6] R. Doll, R. Peto, E. Hall, K. Wheatley, and R. Gray. Mortality in relation to consumption of alcohol: 13 years’ observations on male british doctors. BMJ , 309(6959):911–918, 1994.
- 7[7] M. J. Egger. Power transformation to achieve symmetry in quantal bioassays. Technical Report Technical Report 47, Stanford University, Division of Biostatistics, 1979.
- 8[8] R. Fletcher. A new approach to variable metric algorithms. The Computer Journal , 13(3):317–322, Jan. 1970.
