Tree-Structured Modelling of Varying Coefficients
Moritz Berger, Gerhard Tutz, Matthias Schmid

TL;DR
This paper introduces a recursive partitioning method for tree-structured varying-coefficient models, enabling visualization and identification of complex interactions among variables in generalized regression.
Contribution
It proposes a novel recursive partitioning strategy to handle variable modification detection in varying-coefficient models, addressing complex selection issues.
Findings
Method performs well in simulations
Effective in real data applications
Visualizes variable interactions clearly
Abstract
The varying-coefficient model is a strong tool for the modelling of interactions in generalized regression. It is easy to apply if both the variables that are modified as well as the effect modifiers are known. However, in general one has a set of explanatory variables and it is unknown which variables are modified by which covariates. A recursive partitioning strategy is proposed that is able to deal with the complex selection problem. The tree-structured modelling yields for each covariate, which is modified by other variables, a tree that visualizes the modified effects. The performance of the method is investigated in simulations and two applications illustrate its usefulness.
| Scenario 1 | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | |
| 0.020 | 0.045 | 0.040 | 0.020 | 0.045 | 0.040 | 0.020 | 0.045 | 0.040 | |
| Scenario 1 | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | |
| 0.762 | 0.912 | 0.997 | 0.520 | 0.757 | 0.922 | 0.362 | 0.632 | 0.810 | |
| Scenario 2 | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | |
| 0.785 | 0.900 | 0.970 | 0.635 | 0.790 | 0.920 | 0.555 | 0.680 | 0.855 | |
| 0.785 | 0.900 | 0.970 | 0.635 | 0.790 | 0.920 | 0.555 | 0.675 | 0.855 | |
| 0.070 | 0.060 | 0.030 | 0.055 | 0.055 | 0.040 | 0.045 | 0.050 | 0.020 | |
| 0.017 | 0.022 | 0.012 | 0.014 | 0.019 | 0.014 | 0.011 | 0.014 | 0.013 | |
| n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | n=100 | n=250 | n=500 | |
| Scenario 3 | |||||||||
| 0.140 | 0.365 | 0.490 | 0.060 | 0.175 | 0.360 | 0.045 | 0.140 | 0.215 | |
| 0.115 | 0.335 | 0.470 | 0.040 | 0.130 | 0.330 | 0.025 | 0.085 | 0.175 | |
| 0.020 | 0.020 | 0.025 | 0.015 | 0.020 | 0.025 | 0.015 | 0.020 | 0.020 | |
| 0.009 | 0.018 | 0.020 | 0.007 | 0.018 | 0.016 | 0.007 | 0.017 | 0.014 | |
| Scenario 4 | |||||||||
| 0.115 | 0.295 | 0.465 | 0.055 | 0.160 | 0.285 | 0.045 | 0.100 | 0.170 | |
| 0.080 | 0.265 | 0.440 | 0.025 | 0.115 | 0.250 | 0.015 | 0.065 | 0.130 | |
| 0.026 | 0.041 | 0.0250 | 0.021 | 0.038 | 0.028 | 0.028 | 0.041 | 0.030 | |
| 0.004 | 0.006 | 0.004 | 0.003 | 0.006 | 0.005 | 0.004 | 0.006 | 0.005 | |
| Scenario 5 | |||||||||
| 0.315 | 0.495 | 0.535 | 0.135 | 0.350 | 0.500 | 0.075 | 0.250 | 0.425 | |
| 0.170 | 0.340 | 0.482 | 0.062 | 0.192 | 0.350 | 0.035 | 0.122 | 0.275 | |
| 0.025 | 0.030 | 0.035 | 0.020 | 0.020 | 0.030 | 0.025 | 0.020 | 0.030 | |
| 0.011 | 0.017 | 0.020 | 0.008 | 0.012 | 0.016 | 0.008 | 0.012 | 0.016 | |
| covariate | summary statistics | |||||
|---|---|---|---|---|---|---|
| participation | 0: 471 | 1: 401 | ||||
| income ($) | 1322 | 35320 | 41900 | 47730 | 53470 | 237000 |
| age (years) | 20 | 32 | 39 | 39.96 | 48 | 62 |
| education | 1 | 8 | 9 | 9.307 | 12 | 21 |
| youngkids | 0 | 0 | 0 | 0.311 | 0 | 3 |
| oldkids | 0 | 0 | 1 | 0.983 | 2 | 6 |
| foreign | 0: 656 | 1: 216 | ||||
| covariate | estimate | std error | z value |
|---|---|---|---|
| income | -0.815 | 0.205 | -3.966 |
| age | -0.510 | 0.090 | -5.638 |
| education | 0.031 | 0.029 | 1.093 |
| youngkids | -1.330 | 0.180 | -7.386 |
| oldkids | -0.021 | 0.073 | -0.298 |
| foreign | 1.310 | 0.199 | 6.560 |
| deviance | 1052.8 | ||
| AIC | 1066.8 |
| covariate | estimate |
|---|---|
| income | |
| age | -1.042 |
| education | — |
| youngkids | |
| oldkids | -0.230 |
| foreign | 1.058 |
| deviance | 1004.8 |
| AIC | 1022.8 |
| covariate | summary statistics | |||||
| visits | 0 | 0 | 0 | 0.302 | 0 | 9 |
| income ($) | 0 | 2500 | 5500 | 5832 | 9000 | 15000 |
| age (years) | 19 | 22 | 32 | 40.640 | 62 | 72 |
| illness | 0 | 0 | 1 | 1.432 | 2 | 5 |
| reduced | 0 | 0 | 0 | 0.862 | 0 | 14 |
| health | 0 | 0 | 0 | 1.218 | 2 | 12 |
| gender | 0: 2488 | 1: 2702 | ||||
| private | 0: 2892 | 1: 2298 | ||||
| freepoor | 0: 4968 | 1: 2220 | ||||
| lchronic | 0: 4585 | 1: 6050 | ||||
| covariate | estimate | std error | z value |
|---|---|---|---|
| gender | 0.170 | 0.055 | 3.055 |
| income | -0.199 | 0.084 | -2.364 |
| age | 0.042 | 0.013 | 3.123 |
| illness | 0.194 | 0.017 | 11.007 |
| reduced | 0.126 | 0.005 | 25.180 |
| health | 0.031 | 0.010 | 3.099 |
| private | 0.087 | 0.053 | 1.626 |
| freepoor | -0.465 | 0.176 | -2.641 |
| lchronic | 0.071 | 0.066 | 1.081 |
| deviance | 4384.3 | ||
| AIC | 6735.9 |
| covariate | estimate |
|---|---|
| gender | — |
| income | |
| age | |
| illness | 0.111 |
| reduced | 0.161 |
| health | 0.042 |
| private | — |
| freepoor | -0.499 |
| lchronic | |
| deviance | 4089.9 |
| AIC | 6447.5 |
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.
Tree-Structured Modelling of Varying Coefficients
Moritz Berger, Gerhard Tutz & Matthias Schmid
Abstract
The varying-coefficient model is a strong tool for the modelling of interactions in generalized regression. It is easy to apply if both the variables that are modified as well as the effect modifiers are known. However, in general one has a set of explanatory variables and it is unknown which variables are modified by which covariates. A recursive partitioning strategy is proposed that is able to deal with the complex selection problem. The tree-structured modelling yields for each covariate, which is modified by other variables, a tree that visualizes the modified effects. The performance of the method is investigated in simulations and two applications illustrate its usefulness.
Keywords: Varying-coefficient models; Interactions; Recursive partitioning; Tree-based models
1 Introduction
The generalized linear model is an established tool, which has been widely applied in regression problems. However, it is rather restricted when interactions are needed. The inclusion of classical interaction terms in the form still assumes a very rigid form of interactions. More severe, they become awkward to interpret for higher order interaction terms that include more than two variables, in particular if they are on different scales.
An alternative concept of interactions are effect modifiers or varying-coefficient models that were first introduced by Hastie and Tibshirani (1993). The estimation of varying-coefficient models has been studied extensively in the literature. Fan and Zhang (2008) give an comprehensive review on the varying-coefficient model and discuss several estimation approaches. Here, we consider alternative strategies how to set up regression models including varying coefficients defined by one or several effect modifiers. In particular we propose a tree-based strategy to determine which variables act as effect modifiers. In most applications of varying-coefficient models the effect modifiers are assumed to be known. However, in practice they are typically unknown and have to be selected from the pool of available variables. The proposed tree-structured approach (Section 2.2) enables to simultaneously detect predictors with varying coefficients and the corresponding effect modifiers.
A tree-based approach to model varying coefficients using the traditional CART algorithm was proposed by Su et al. (2011). They use their method to asses the effect of an intervention program in a longitudinal breast cancer study. In the used model only the corresponding treatment effect was modified by other explanatory variables. Therefore, the result is exactly one tree. More recently, Bürgin and Ritschard (2015) also proposed a tree-based model for varying coefficients. Their approach is similar in spirit to ours, but there are two crucial differences. First, the set of predictors and the set of effect modifiers (called moderators) are different and therefore have to be specified beforehand. Second, the model is explicitly designed for longitudinal studies only. Wang and Hastie (2014) use a boosted tree-based varying coefficient model with pre-specified effect modifiers in an application on product pricing.
Further related literature on varying-coefficient models refers mainly on regularization methods for the selection of smooth effect modifiers (see also Section 2.1). Wang et al. (2008) and Zhao and Xue (2009) proposed to use the smoothly clipped absolute deviation penalty, Leng (2009) use a penalized likelihood method for smoothing spline ANOVA models and Wang and Xia (2009) combine local polynomial smoothing and LASSO. Wong et al. (2009) moreover deal with concepts for missing data.
The rest of the article is organized as follows: In Section 2 we introduce the basic varying-coefficient model and the extended tree-structured model. Section 3 contains an illustrative example based on artificial data. Details on the fitting procedure are given in Section 4. In Section 5 we show the results of several simulations examining the performance of the proposed model. Finally, in Section 6 the tree-structured model is illustrated by means of two applications.
2 Varying-Coefficient Models
Let the data be given by , where denotes the response and is a covariate vector of length . In generalized linear models it is assumed that the response given follows a simple exponential family. In addition, it is assumed that the mean response is linked to the explanatory variables by a link function in the form , where is a linear predictor. In the following modelling approaches the linear predictor is replaced by a more flexible predictor including varying coefficients.
2.1 Smooth and Categorical Effect Modifiers
In varying-coefficient models, as proposed by Hastie and Tibshirani (1993) the predictor has the general form
[TABLE]
where denote additional predictors. It is assumed that change the coefficients of the predictors through unspecified functions . Thus the -variables have a linear effect, but the effects are modified by the so-called effect modifiers .
The effect modifiers can be continuous or categorical variables. If is continuous it is typically assumed that is a smooth function of unspecified form. Several strategies have been proposed for the estimation of these smooth functions, for example, by penalization, localization or boosting methods, see Hoover et al. (1998), Fan and Zhang (1999), Lu et al. (2008), Wu et al. (1998), Kauermann and Tutz (2000) and Hofner et al. (2013). If the effect modifier is a categorical variable the functions are step functions of the form , with indicator function and parameters yielding the predictor component
[TABLE]
Thus the coefficient on depends on the value of . Since for categorical effect modifiers the number of parameters can become very large, tailored estimation strategies are needed for this kind of models. Penalization techniques for the estimation of models with categorical effect modifiers were proposed by Gertheiss and Tutz (2012) for classical linear models and extended to generalized linear models by Oelker et al. (2014). In the categorical case one can additionally identify clusters of categories that share the same effect.
All the traditional approaches have in common that they aim at distinguishing between varying and non-varying coefficients. Given a specific effect modifier one wants to know if the effects of is constant over the whole range of or varies across values of . Thus, typically it is assumed that one knows which variable is a potential effect modifier. Then one determines the way it modifies coefficients.
2.2 Tree-Structured Modelling of Varying Coefficients
The models and estimation strategies described in the previous section have some limitations and drawbacks. If one uses these models the effect modifier has to be specified beforehand. However, usually it is totally unclear which variable should be considered as a relevant effect modifier. Moreover, it is not known if a varying coefficient is determined by just one variable or if more than one effect modifier determine the varying coefficient. It is even possible that varying coefficients are caused by the interaction of several effect modifiers. The recursive partitioning method proposed in the following provides a solution to these problems. By recursive splitting the method itself identifies the effect modifiers that induce varying coefficients if they are present.
Since we do not assume that the effect modifiers are known, we consider only the set of covariates . If effect modifiers are present they are from this set and modify coefficients on covariates from this set. A simple example with just one effect modifier is given by the predictor
[TABLE]
where we define . That means, if the effect modifier is identical to the covariate that is modified by it, it is fixed. Therefore, the predictor is
[TABLE]
In particular, we assume that the predictor contains a main effect of , if modifies the other variables. The predictor specified by equation (1) is understood as a generic form of the predictor. If a variable is categorical with values (on a nominal scale) the corresponding variable typically contains dummy variables.
The principle of recursive partitioning or tree-based modelling is that the predictor space is recursively split into a set of rectangles. Within each rectangle a simple model (for example, a constant) is fitted. The most popular version goes back to Breiman et al. (1984) and is known as classification and regression trees (CART). Trees for varying-coefficients work in the same way. However, the splits refer to the coefficients. Therefore, successively one chooses a coefficient (corresponding to a predictor), a variable (the effect modifier) and a split point to split the coefficient into two disjoint regions. In each region the coefficient is then fitted by a constant.
Models with Three Covariates
For simplicity we first consider three covariates , and that are metrically scaled or ordinal. Suppose that is an effect modifier that changes the effect of . Then a split in the coefficient of the covariate generated by the effect modifier at split point means to fit a model with predictor
[TABLE]
where denotes the indicator function with if is true and otherwise. The parameter denotes the effect of in the (left) region and denotes the effect of in the (right) region . If is a binary covariate, like gender, one obtains the two effects
[TABLE]
If the effects of covariate are further modified by , a second split (for example in the left node) with regard to and split point yields the two daughter nodes
[TABLE]
and the model with predictor
[TABLE]
where and are the new effects in the regions built by the second split. After further splits in the coefficients of covariate regarding and the resulting model has the form
[TABLE]
where represents a tree determined by splits in and . Each node is defined by a product of several indicator functions of the form
[TABLE]
where is the total number of branches, is the selected split point in variable and indicates which of the two indicator functions is involved. The terminal nodes contain the varying coefficients of covariate .
The model specified by equation (2) contains the two main effects of the effect modifiers and . If and (or one of the two) have an effect on the response, the relation can be simply linear or again varying over the other two variables, respectively. More specifically, the effect of can be modified by and and the effect of can be modified by and . Hence, the tree-structured model with three covariates has the form
[TABLE]
which is composed of three potential trees defined by splits in at most two variables, respectively.
The General Model with p Covariates
In the general case one has covariates and the coefficients of each one can be modified by all the other variables . The tree component of the model regarding is then given by
[TABLE]
To determine the first split for a fixed covariate , means to select the best model among all possible effect modifiers and corresponding split points . This corresponds to examine all the null hypotheses . If cannot be rejected for any combination of effect modifier and split point the covariate is considered to have a linear effect on the response. To examine the null hypotheses, likelihood ratio (LR) tests are used in our procedure. In the very first step one chooses the combination of coefficient, effect modifier and split point with the smallest -value. If a significant effect is found, the first split is carried out for the selected covariate. In Section 4 details are given on the splitting criterion.
The second split is either in the coefficients of the same or another covariate, with regard to the same or another effect modifier. As is in all later steps the search is the same, but for predictors that have already been split one starts from already built nodes. If a predictor is never selected for splitting it is assumed to have the simple linear effect . The procedure stops if no significant effect is found anymore (see Section 4).
After termination of the algorithm, let denote the subset of covariates that have been selected for splitting, denote the subset of covariates with a linear effect on the response (not selected for splitting) and the subset of effect modifiers for covariate . For covariates that have never been selected for splitting is an empty set. If no split is performed at all, that is the simple linear model without varying coefficients is valid, is an empty set. On the other hand, if the coefficients of all covariates are modified by at least one other variable, is an empty set. In the extreme case, without any influential covariate (pure intercept model), both and are empty.
Using this notation, the tree-structured model in its most general form can be written by
[TABLE]
The method yields an individual tree for each covariate that shows varying coefficients. If varying coefficients are present the relevant effect modifiers are selected simultaneously. In the last step of the proposed algorithm (described in Section 4) the linear effects of covariates that were not chosen for splitting during iteration and do not serve as effect modifier for any other covariate are tested for significance. Nevertheless, to follow the hierarchical principle, a linear effect of a variable that was chosen as effect modifier will remain in the model. Therefore, it is ensured that the model includes a (linear or non linear) main effect of each effect modifier.
In the following we use the abbreviation TSVC for tree-structured varying coefficient model.
3 An Illustrative Example
To illustrate the proposed TSVC we make use of artificial data. We consider data with normally distributed response . The linear predictor of the model is composed of two continuous covariates and two binary covariates . The predictor of the model is given by . It is assumed that the effects of and on the response are simply linear. But, the effect of is modified by and and is determined by the tree component
[TABLE]
The effect of is modified by and and determined by
[TABLE]
The true coefficients are and . Figure 1 shows the resulting trees for one exemplary estimation. In this example the true underlying tree structure is detected for both covariates and no further split is performed in the coefficients of any other covariate. The estimates of the linear terms are , and and therefore close to the true values. It is seen from the trees that there are three groups represented by three terminal nodes, respectively. For covariate it is distinguished between and , and within this group between and . Together with the estimates given in the leafs of tree, these results are exactly in line with the true simulated effects. This also holds for covariate , see right part of Figure 1. Due to the data generating process the simulated split points regarding the continuous covariates and must not necessarily be present in the data, but the detected ones are very close to them.
4 Fitting Procedure
In this section we give a detailed description of the algorithm that yields the proposed TSVC.
4.1 Concepts
When building trees, the most important parameter is the number of splits that determines the depth and hence the size of the trees. There are several strategies to determine the adequate size of the trees. In traditional approaches one typically grows large trees and prunes them to an adequate size afterward, see Breiman et al. (1984) and Ripley (1996). An alternative strategy, which is applied here, is to directly control the size of the trees by early stopping. In each step of the tree growing one decides if a further split is needed or not. For an introduction into the basic concept of so-called conditional inference trees, see Hothorn et al. (2006).
In each step of the algorithm one selects the best split among all the predictors, effect modifiers and corresponding split points. This is done by examining all the null hypotheses against the alternatives and by choosing the combination with the smallest -value of the corresponding LR-test. A simple criterion is to stop splitting when the -value exceeds a pre-specified threshold . However, when is intended to have meaningful interpretation as a global type I error level (see below), one should adapt for multiple testing errors because in each split a huge number of hypotheses is tested. In the presence of many covariates and a potentially large number of splits, procedures like the Bonferroni correction will lead to local significance levels close to zero and hence will be not suited for tree construction. Therefore, we apply a concept based on maximally selected statistics. The idea is to investigate the dependence of the response and the selected effect modifier at a global level that takes the number of splits into account.
Let us focus on one predictor and one effect modifier with possible split points . When a split point is selected based on the LR test statistic one investigates the distribution of . Typically the test statistics are strongly correlated. The -value that can be obtained by the distribution of provides a measure for the relevance of effect modifier . The result is not influenced by the number of split points, see Hothorn and Lausen (2003), Shih (2004), Shih and Tsai (2004). During tree building splitting is stopped when the global hypothesis of independence between the response and the selected effect modifier cannot be rejected. Similar to the unified framework proposed by Hothorn et al. (2006), the method explicitly accounts for the involved multiple testing problem and provides an unbiased recursive partitioning scheme that avoids the selection bias toward variables with many possible splits. To calculate the asymptotic distribution under the null hypothesis of and to derive a test decision a permutation test is used. That means one permutes the values of effect modifier in the original data and computes the corresponding value of the test statistic. For a huge number of permutations one obtains an approximation of the distribution under the null hypothesis and a corresponding -value. To determine the -values with sufficient accuracy, the number of permutations should increase with the number of variables (potential effect modifiers) in the model.
Meaning of the Threshold
Given overall significance level , the local significance level for one permutation test is set to , where corresponds to the number of potential effect modifiers. With this adaption the probability to falsely identify varying coefficients for each predictor is controlled by . If one has predictors without varying coefficients, one can expect predictors to be falsely selected for splitting. Using at the same time ensures that on the level of the predictor the family-wise error rate is under control. That means, the probability of falsely identifying at least one effect modifier (for fixed predictor) is controlled by .
4.2 Basic Algorithm
Basic Algorithm
Step 1 (Initialization)
Set counter
- (a)
Estimation
For all covariates , fit all the candidate models with predictor
[TABLE]
- (b)
Selection
Select the model that has the best fit. Let denote the best split, which is found for covariate and effect modifier .
- (c)
Splitting Decision
Select the predictor and effect modifier with the largest value of . Carry out permutation test for this combination with significance level . If significant, fit the selected model yielding estimates , , and , and nodes , . If not, stop, no varying coefficients detected.
Step 2 (Iteration)
- (a)
Estimation
For all covariates , and already built nodes , fit all the candidate models with new coefficients (while the rest of the model remains the same)
[TABLE]
for all and remaining, possible split points .
- (b)
Selection
Select the model that has the best fit yielding the split point , which is found for covariate in node and effect modifier
- (c)
Splitting Decision
Select the node and effect modifier with the largest value of . Carry out permutation test for this combination with significance level . If significant, fit the selected model yielding the additional estimates , set . If not, stop.
Step 3 (Linear Term)
Collect the selected covariates in and set . Collect the effect modifiers for the -th covariate in and set .
- (a)
Selection
For all covariates , examine the null hypothesis , by use of a permutation test with significance level . If not significant, exclude from .
- (b)
Estimation
Estimate final model with components , and , where comprises all effect modifiers for which holds.
5 Numerical Experiments
In the following we investigate the performance of the proposed TSVC. We are in particular interested in the ability of the procedure to detect the predictors with varying coefficients and the corresponding effect modifiers. In all simulation scenarios the responses , are normally distributed with noise variable . The models include two standard normally distributed covariates, and two binary covariates, . We consider scenarios with observations and standard deviation . In each setting 100 data sets were generated. During estimation each permutation test was based on 1000 permutations.
Evaluation Criteria
In order to evaluate the proposed model (3) we compute true positive rates (TPR) and false positive rates (FPR). We distinguish between TPR and FPR on the covariate level and for the combination of covariate and effect modifier. Let , be the indicator, with if covariate exhibits varying coefficients induced by any effect modifier and otherwise. In addition, let be the indicator, with if covariate exhibits varying coefficients with regard to effect modifier and otherwise. With indicator function , criteria to judge the identification of varying coefficients are:
True positive rate on the covariate level:
- -
False positive rate on the covariate level:
- -
True positive rate for the combination of covariate and effect modifier:
- -
False positive rate for the combination of covariate and effect modifier:
5.1 Models without Varying Coefficients
We start with simulations, where the data generating model is a simple linear model, that is no varying coefficients are present (scenario 1). The true model has the form , with coefficients and . This results in a simulated of (), () and (). The absence of varying coefficients is a baseline situation to check a possible inflation of the false positive rate on the covariate level, which is explicitly controlled for by the significance level in the algorithm (see Section 4.1). Table 1 shows the false positive rates on the covariate level () for the nine settings with varying error variance and sample size, as the average over the 100 repetitions, respectively. It is seen, that the significance level is kept in all settings. For a small sample size () the approach is even conservative. Conspicuously the results do not differ with the error variance.
In addition, the proportion of covariates (PoC) that were included in the model (either with a main effect or split in a tree) is given in Table 2. The values correspond to the average probabilities over the 100 repetitions, respectively. With four predictors , the value means, that on average one covariate (with a true main effect) was excluded from the model. Except for the setting with and the proportion of covariates in the model is quite high , which indicates a good performance of the TSVC.
5.2 Models with Smooth Effect Modifier
In a second simulation we consider data with smooth effect modifiers (scenario 2). Here, the true, underlying model has the form , with coefficients and and smooth functions
[TABLE]
By definition, there are sigmoidal relations between and the regression coefficients of and between and the regression coefficients of . The data generating process is determined by smooth functions, so that by successive splitting in one covariate the algorithm should be able to capture the underlying functional form.
Average true positive rates and false positive rates on the covariate level (first and third row) as well as for the combination of covariate and effect modifier (second and fourth row) are given in Table 3. It is seen from the true positive rates that the method shows good overall performance: For all settings the and are higher than . It is noteworthy that the TPRs for the combination of covariate and effect modifier are almost exactly the same as those for covariates only. Therefore, if a significant split is found, it is always with regard to the right effect modifier. False positive rates are very small throughout all settings, in particular the global significance level (approximately) holds.
Figure 2 visualizes the true functions and (solid lines) and the estimated trees and (dashed lines) for 10 randomly chosen replications of the simulation with and for the range . It is seen that in both cases the estimated step functions approximate the true smooth functions.
5.3 Varying Coefficients Induced by Discrete Splits
In this section we consider three scenarios with varying coefficients that are induced by splits with regard to one or more effect modifiers. First we assume the two binary covariates and as effect modifiers (scenario 3) and simulate data from the model , where and . The regression coefficients are set the same as in the previous simulations. Subsequently we increase the number of covariates in the model (scenario 4). We add and . The four additional covariates are not influential with . Hence the selection of covariates and effect modifiers might be more challenging. In a last simulation (scenario 5) we consider a more complex structure, where the effects of and are additionally modified by . The simulated trees have the form
[TABLE]
An overview of all the results for the scenarios 3, 4 and 5 is given in Table 4. Each value again corresponds to the average over 100 replications. As the overall strength of the effects is weaker than in scenario 2, the true positive rates are considerably smaller throughout all settings. The false positive rates on the covariate level are consistently very small, in particular the global significance level holds (with a tendency of the method to be conservative). It is also seen that, in particular in scenario 5, the hit rates for the combination of covariate and effect modifier () are a little smaller than the hit rates for covariates. Thus the algorithm is not always able to detect both effect modifiers.
6 Applications
In order to demonstrate the utility and the potential of the proposed TSVC we show the results of two real data examples.
6.1 Swiss Labour Market
We consider data from the health survey SOMIPOPS for Switzerland in 1981. The data set is available in the R package AER (Kleiber and Zeileis, 2008) and was analysed before by Gerfin (1996). The data consists of a sample of 872 married women living in Switzerland. The response that is investigated is the binary outcome if the individual participates in the labour market () or not (). The response is modelled by a logistic regression model of the form . The explanatory variables that are included in the model are the logarithm of the yearly non-labour income, the age in decades (centered around 40), the years of formal education, the number of young children under 7 years of age, the number of older children over 7 years of age and an indicator if the individual is a foreigner (not Swiss). The summary statistics of the response and the original covariates are given in Table 5. With working and non-working women, the response is rather balanced.
The estimates, standard errors and values obtained by a simple logistic regression model are given in Table 6. It is seen that there are significant effects for all the covariates except for the education of the women and the number of children older than 7 years of age (oldkids). The parameter estimates indicate that the chance to participate in the labour market decreases with increasing non-labour income, increasing age and with the number of young children. Interestingly, non-Swiss women () are more likely to participate in the labour market than Swiss women.
When fitting the proposed TSVC model the results differ considerably (see the overview in Table 7). The algorithm performs three splits with regard to the coefficients of income and youngkids, until further splits are not significant (). In addition there are linear effects of age, foreign and oldkids. Hence, in contrast to the model with a linear predictor the TSVC indicates that the number of older children is also significantly associated with the response. The covariate education is completely excluded from the model.
The resulting trees for income and youngkids are shown in Figure 3. The varying coefficients of income are induced by age (left panel). Generally, non-labour income has a negative effect on the probability to participate in the labour market, but the effect is even stronger for younger women (). The varying coefficients in youngkids are induced by the effect modifiers age and foreign (right panel). As already seen from the model with a linear predictor, the chance to participate in the labour market decreases with the number of young children. However, the strength of the effects are much more differentiated, depending on the sub-group. The effect is strongest for comparably young women () with Swiss citizenship (), but is much attenuated for older women ().
For the TSVC model one obtains the residual deviance and AIC , which are substantially smaller values than those for the model with linear predictor (compare Table 6). Therefore, the tree-structured model is to be preferred over the simple model.
6.2 Australian Health Service Utilization
In a second application we consider cross-section data originating from the Australian Health Survey (AHS). The original data set was used before by Cameron and Trivedi (1986, 1998) and is also available from the R package AER (Kleiber and Zeileis, 2008). The data set contains information on the number of visits to a doctor or specialist for 5190 individuals over 18 years of age in the two-week period before an interview (visits). The response is modeled by a Poisson model of the form . Explanatory variables, which are used for modelling, are the gender, the income in tens of thousands of dollars, the age in decades (centered around 40), the number of illnesses in the past two weeks (illness), the number of days of reduced activity in the past two weeks due to illness or injury (reduced), the health questionnaire score by Goldberg’s method (health) and the three indicators if the individual has a private health insurance (private), if the individual has free government health insurance due to low income (freepoor) as well as if there is a chronic condition limiting activity (lchronic). The dummy variable private represents a higher level of insurance cover, whereas freepoor represents just a basic insurance cover. Table 8 shows a descriptive overview on the response and the explanatory variables. About of the respondents had zero consultations, indicating overdispersion in the data. For simplicity, this fact will be omitted in the models discussed in the following.
The results when using a simple Poisson model with a linear predictor are given in Table 9. As expected, it is seen from the values that the number of illnesses and the number of days of reduced activity are strongest associated with the number of visits to a doctor. Respondents holding a free government health insurance (freepoor) are expected to visit the doctor less often. By contrast, there is no significant effect for the group of respondents holding a private health insurance. A chronic condition limiting activity also does not show a significant association with the response.
An overview on the results of the proposed TSVC model is given in Table 10. It is seen that private and gender (which shows a significant effect in the simple model) are completely excluded from the tree-structured model. Influential covariates that are still in the model as linear effects are illness and reduced. They additionally serve as effect modifiers for the coefficients of income and lchronic. Furthermore, there is a positive linear effect for health and again a strong negative effect for freepoor.
The estimated trees are pictured in Figure 4. The upper left tree for age shows, that the expected number of visits increases with the age of the respondents if the number of days of reduced activity is low (), otherwise the effect does not appear. From the tree for lchronic in the upper right (which was not significant in the simple model) it is seen, that a chronic condition increases the expected number of doctor’s visits for all respondents with up to one week of reduced activity (). Interestingly, there is exactly the opposite effect if the period of reduced activity is longer. This difference is canceled out in the simple model (see Table 9) and is therefore not visible.
Remarkable differences occur for the effect of income as seen from the tree in the lower panel of Figure 4. An increasing income strongly reduces the expected number of doctor’s visits for all the respondents without reduced activity and without an illness (, ). The effect of income is also reduced if the period of reduced activity lasts the entire two weeks (). The estimate means a reduction of the expected mean by the factor . However, for all respondents that do not fall into one of the extreme sub-groups an increasing income only has a small negative or even a favorably effect on the frequency of doctor’s visits.
In terms of the residual deviance () and the AIC () the tree-structured model performs much better than the simple Poisson model with a linear predictor. As it is seen from Figure 4 the trees are able to capture relations that are hidden by a simple linear predictor.
7 Concluding Remarks
We propose a new tree-based algorithm for the modelling of complex predictor-response relationships using varying coefficients. By recursive partitioning, the method itself identifies the predictors to be modified and the relevant effect modifiers. Main innovations compared to existing approaches are (i) the potential effect modifiers do not have to be specified beforehand, they are automatically chosen from the set of available covariates, and (ii) the linear effect of a covariate is allowed to depend on values of several effect modifiers, in particular on their combination. The visualization of the results as a small tree for each covariate that is modified, enables a simple interpretation of effects and makes it easily accessible to practitioners.
Although in this article the focus is on generalized linear models with responses from the simple exponential family, the algorithm can easily be extended to more general models. An example are quasi-likelihood models introduced by Wedderburn (1974), which account for overdispersion in the data. Moreover, the assumption of linear predictors can be weakened, for example, by including polynomial terms. However, one needs to be careful when selecting possible effect modifiers, if variables are present in more than one column in the data matrix.
All the results of the simulations and applications in this article were obtained by a program that is available from the authors and will soon be made publicly available in an R add-on package.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Breiman et al. (1984) Breiman, L., J. H. Friedman, R. A. Olshen, and J. C. Stone (1984). Classification and Regression Trees . Monterey, CA: Wadsworth.
- 2Bürgin and Ritschard (2015) Bürgin, R. and G. Ritschard (2015). Tree-based varying coefficient regression for longitudinal ordinal responses. Computational Statistics & Data Analysis 86 (C), 65–80.
- 3Cameron and Trivedi (1986) Cameron, A. C. and P. K. Trivedi (1986). Econometric models based on count data: Comparisons and applications of some estimators and tests. Journal of Applied Econometrics 1 (1), 29–53.
- 4Cameron and Trivedi (1998) Cameron, A. C. and P. K. Trivedi (1998). Regression Analysis of Count Data. Econometric Society Monographs No. 30 . Cambridge: Cambridge University Press.
- 5Fan and Zhang (1999) Fan, J. and W. Zhang (1999). Statistical estimation in varying coefficient models. Annals of Statistics 27 (5), 1491–1518.
- 6Fan and Zhang (2008) Fan, J. and W. Zhang (2008). Statistical methods with varying coefficient models. Statistics and its Interface 1 (1), 179–195.
- 7Gerfin (1996) Gerfin, M. (1996). Parametric and semi-parametric estimation of the binary response model of labour market participation. Journal of Applied Econometrics 11 (3), 321–339.
- 8Gertheiss and Tutz (2012) Gertheiss, J. and G. Tutz (2012). Regularization and model selection with categorial effect modifiers. Statistica Sinica 22 (3), 957–982.
