Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
33,325 characters · 12 sections · 0 citation commands
Estimation of Dynamic Panel Threshold Model using Stata
\affil[a]{ Department of Economics, Seoul National University} \affil[b]{ Department of Economics, University of Maryland} \affil[c]{ Department of Economics, Hongik University}
\affil[a]{Department of Economics, Seoul National University}
\affil[b]{Department of Economics, Hongik University}
The panel model with threshold effects in Hansen (1999) has been widely used in the empirical research. Hansen's fixed effect estimator has been applied to applications on the investment decision of firms under financial constraints, the relation between fiscal deficit and economic growth (Adam and Bevan 2005), inflation and growth (Khan and Ssnhadji 2001) and others. The threshold effect in the model allows for the asymmetric effect of the exogeneous variables depending on whether the threshold variable is above or below the unknown threshold. The threshold variable is typically dictated by the economic model. For instance, in the investment decision problem the size of the firm is often considered as a candidate threshold variable. Wang (2015) has developed Stata command xthreg to compute Hansen's estimator.
Hansen's (1999) model is static and his fixed effect estimator requires the covariates to be strongly exogeneous for the estimator to be consistent. However, the strong exogeneity can be restrictive in many real applications. Thus, the model has been extended to the dynamic panel model with a potentially endogenous threshold variable by Seo and Shin (2016). Their model allows for the lagged dependent variables and endogeneous covariates. Indeed, various applications of Hansen's fixed effect estimation can benefit from dynamic modeling. For instance, the investment decision depends on the previous period's investment and the panel threshold autoregressive model is another example of dynamic models.
We develop Stata commands for the first-differenced generalized method of moments (GMM) estimators and the associated asymptotic variance estimator that are proposed by Seo and Shin (2016) as well as the linearity testing to test for the presence of a threshold effect. While the previous command xthreg computes the fixed-effect estimator and thus it is not consistent under this general setting, our command xthenreg produces a consistent and asymptotically normal estimates.
In addition, we propose a computationally more attractive bootstrap algorithm to implement the linearity test than the nonparametric i.i.d. bootstrap that is originally proposed by Seo and Shin (2016). Furthermore, we present a constrained GMM estimator that reflects the kink restriction that has become more popular recent years, as in e.g. Zhang et al. (2017), along with its asymptotic variance formula and a consistent estimator.
The paper is organized as follows. Section 2 introduces the dynamic threshold panel model and the first-differenced GMM estimator. It also presents the asymptotic variance formula for a kink constrained estimator and a bootstrap algorithm for the linearity test. Section 3 explains the command xthenreg. Its use is illustrated in Section 4 and 5 through Monte Carlo simulations and an application. Section 6 concludes.
The dynamic panel threshold model is given by
where $x_{it}$ may include lagged dependent variables and $q_{it}$ is the threshold variable. We assume $T$ is fixed while the sample size $n$ grows to infinity. Thus, we remove the incidental parameter $\mu _{i}$ by the first difference transformation and estimate the unknown parameters $\theta =\left( \beta ^{\prime },\delta ^{\prime },\gamma \right) ^{\prime }$ through the GMM. The following describes the GMM method as in Seo and Shin (2016).
Specifically, set an $l$-dimensional vector of instrument variables, $\left( z_{it_{0}}^{\prime },....,z_{iT}^{\prime }\right) ^{\prime }$ from the lagged variables and exogenous variables, where $2<t_{0}\leq T.$ Next, construct the sample moment
where
with $\Delta $ signifying the first difference operator and
Then, introduce the GMM criterion function with a weight matrix $W_{n},$
which is minimized to produce a GMM estimate $\hat{\theta}$.
The minimization is done by the grid search since for each fixed $\gamma$ the model becomes the linear panel with a fixed effect, which yields the closed-form solution
and the criterion function $\bar{J}_{n}\left( \theta \right) $ is a step function over $\gamma $ with at most $nT$ jumps. However, it is worthwhile to note that this algorithm is different from splitting the sample into two and applying the linear GMM for each partitioned sample.
For the weight matrix, either $W_{n}=I_{l}$ or
was proposed in the first step and it is updated to
where $\hat{g}_{i}=\left( \widehat{\Delta \varepsilon }_{it_{0}}z_{it_{0}}^{ \prime },...,\widehat{\Delta \varepsilon }_{iT}z_{iT}^{\prime }\right) ^{\prime }$ and $\widehat{\Delta \varepsilon }_{it}$ is the residual from the first step estimation.
It was shown by Seo and Shin (2016) that under suitable regularity conditions \footnote{ One of the conditions allows for $\delta _{0}$ to be both fixed and shrinking toward zero at $ n^{-\alpha }.$} the GMM estimator is asymptotically normal. Specifically,
where $G=\left( G_{\beta },G_{\delta }\left( \gamma _{0}\right) ,G_{\gamma }\left( \gamma _{0}\right) \right) $ with
and
where $\mathrm{E}_{t}\left[ \cdot |\gamma \right] $ denotes the conditional expectation given $q_{it}=\gamma $ and $p_{t}\left( \cdot \right) $ denotes the density of $q_{it}.$
The estimation of the asymptotic variance is standard, that is,
where $g_{i}\left( \theta \right) =g_{1i}+g_{2i}\left( \gamma \right) \left( \beta ^{\prime },\delta ^{\prime }\right) ^{\prime }$, and
which is the Nadaraya-Watson kernel estimator for some kernel $K$ and bandwidth $h$ such as the Gaussian kernel and Silverman's rule of thumb. We plug in $\theta =\hat{\theta}$.
Although the threshold model typically implies the presence of a discontinuity of the regression function, it may mean the presence of a kink not a jump if $\left( 1,x_{it}^{\prime }\right) \delta =\kappa \left( q_{it}-\gamma \right) $ for some $\kappa $. It happens when one element of $ x_{it}$ is $q_{it}$ with the coefficient $\kappa $ and the first element of $ \delta $ equals to $-\gamma \kappa .$ Under these restrictions, the model becomes
Even when the true model is a kink one, it is shown that the asymptotic distribution of the GMM estimator in the preceding section is valid. This is in contrast to the least squares estimator for the linear regression, for which Hidalgo et al. (2019) have shown that the cube root phenomenon appears.
The asymptotic distribution of the constrained GMM estimator of $(\beta ,\kappa ,\gamma )$ that imposes the kink restriction can also be derived for the same reasoning as in Seo and Shin (2016). Specifically, the asymptotic variance is given by redefining $G=\left( G_{\beta },G_{\kappa },G_{\gamma }\right) ,$ where $G_{\beta }$ is the same as above and
The estimation of these terms is analogous to that of $G_{\delta }$ and $ G_{\gamma }$ in the preceding section.
This section proposes a fast bootstrap algorithm to test for the presence of the threshold effect, that is, the null hypothesis
where $\Gamma $ denotes the parameter space for $\gamma $, against the alternative hypothesis
A standard approach is to employ a supremum type statistic to take care of the loss of identification under the null, that is,
where $\mathcal{W}_{n}\left( \gamma \right) $ is the standard Wald statistic for each fixed $\gamma $, that is,
where $\hat{\delta}\left( \gamma \right) $ is the GMM estimator of $\delta $ for a given $\gamma $, and
a consistent asymptotic variance estimator, where $R=\left( \mathbf{0} _{\left( k_{1}+1\right) \times k_{1}}\mathbf{,}I_{k_{1}+1}\right) ,$ and $ \hat{V}_{s}\left( \gamma \right) =\hat{\Omega}\left( \hat{\theta}\left( \gamma \right) \right) ^{-1/2}\left( \hat{G}_{\beta },\hat{G}_{\delta }\left( \hat{\theta}\left( \gamma \right) \right) \right) $.
Since the asymptotic distribution is not pivotal, we propose a bootstrap algorithm, which is faster than the i.i.d. bootstrap proposed in Seo and Shin (2016). Specifically,
\hangindent=1em xthenreg $depvar$ $indepvars$ [$if$] [$in$] \newline [, endogenous($varlist$) inst($varlist$) kink static \newline \texttt{grid_num}($integer$ 20) \texttt{trim_rate}($real$ 0.4) \texttt{h_0}($real$ 1.5) \texttt{boost}($real$ 0)]\\
where $depvar$ is the dependent variable and $indepvars$ are the independent variables. There are several comments for users.
endogenous($varlist$) specifies endogeneous independent variables. The endogeneous variables must be excluded from the list of independent variables before the comma.\\\\ inst($varlist$) specifies the list of additional instrumental variables. \\\\ static sets the model static. The default model is dynamic. In contrast with dynamic model, static model does not automatically include L.y as independent variable. \\\\ kink sets the model kink. \\\\ grid_num($integer$) determines the number of grid points to estimate the threshold $\gamma$. The default is 20.\\\\ \texttt{trim_rate}($real$) determines the trim rate when constructing a grid for estimating r. The default is 0.4.\\\\ \texttt{h_0}($real$) determines a parameter for Silverman's rule of thumb used to kernel estimation. The default is 1.5.\\\\ \texttt{boost}($integer$) The number of bootstrapping for linearity test. The default is 0.\\
xthenreg stores the following results in e( ):\\\\ Scalars
Macros
Matrices
In this section we illustrate the finite sample performance of the bootstrap linearity test. Some simulations for estimation were performed in Seo and Shin (2016). Here the model under $\mathcal{H}_0$ is linear, i.e. $\delta = 0$. We consider the following data generating process. Specific values of coefficients are different across simulations. \[
\] We summarize more details of our simulation design in the following table.
Moreover, $x_{i, t}$ and $\varepsilon_{i, t}$ were drawn independently from the centered normal distribution with standard deviation 1 and 0.25 respectively. For each iteration, we calculate bootstrap $sup \, W^{\ast }$ once following e.g. Giacomini et al. (2013). Consequently, we obtain 500 simulated $sup \, W$ and $sup \, W^{\ast }$ statistics. With this we compute the bootstrap critical value, which is the empirical $\left( 1-\alpha \right) 100$-percentile of those 500 $sup \, W^{\ast }$ statistics, and the rejection probability for the given $\alpha $, which is the proportion of 500 $sup \, W$ statistics bigger than the bootstrap critical value.
Here we impose $(\beta_1, \beta_2, \delta_0, \delta_1, \delta_2) = (0.5, 0.8, 0.0, 0.0, 0.0)$ so that $\mathcal{H}_0: \delta = 0$ holds. This implies the true underlying model is linear. The simulated rejection probability was $0.066$ which is reasonably close to the true $\alpha=0.05$. Empirical distributions of $sup \, W$ and $sup \, W^*$ are as follow.
Here we tested three sets of coefficient choices, maintaining $\mathcal{H}_1: \delta \neq 0$ holds.
We observe that our test has significant power to reject $\mathcal{H}_0$ when $\mathcal{H}_1$ is true, especially when the true $\delta$ is sufficiently far from zero.
We apply our method to evaluate the effect of obesity on worker's productivity. Obesity is measured with Body Mass Index (BMI), weight in kilograms divided by height in meters squared. Individuals whose BMI between 25 and 30 are considered to be overweight, and BMI of 30 or higher are treated as obese. Using data from the British Cohort Study and the methods described in the earlier section, we examine how BMI is associated with work hours. For more detailed discussion, see Kim (2019).
In this example, we consider work hours and BMI of male workers using the following model with a kink in BMI.
where we present work hours as $y_{it}$ for an individual $i$ for a period $ t,$ $x_{it}$ is family size and $q_{it}$ is BMI. We have two period panel data $(t=1,2)$ and take the first difference as follows to remove $\alpha _{i},$ the individual time-invariant charateristics that are associated with work hours.
To implement GMM estimation, we use four instrumental variables, birth weight (bweight) and a worker's own childhood BMI (bmic) and parents' BMI (bmim, bmid), for BMI variables of $\Delta q_{i2},q_{i2},q_{i1}$ in the first differenced model.
After loading data, we first need to declare that the data is panel. The default model for xthenreg is a dynamic model. Since we consider a static model, not a dynamic model, we use static option. We also impose a kink in the model by using kink option.
The information preceding the table is as follows. N is the total number of unique subjects, T is the number of time periods. Number of moment conditions is provided based on the choice of instruments. In this example, we can obtain the same results by collecting all exogenous variables into one place with exo option as follows.
We can also change the set of included and excluded instruments using the inst option. The number of moment conditions varies accordingly.
We can estimate the model with a restriction on the sample.
Next we consider discontinuity in BMI effect without imposing a kink in the model.
By taking first difference, we obtain the following model and estimate it with only static option.