Next Article in Journal
Stable-GARCH Models for Financial Returns: Fast Estimation and Tests for Stability
Previous Article in Journal
Building a Structural Model: Parameterization and Structurality
Previous Article in Special Issue
Functional-Coefficient Spatial Durbin Models with Nonparametric Spatial Weights: An Application to Economic Growth
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Bayesian Bandwidth Selection for a Nonparametric Regression Model with Mixed Types of Regressors

1
Department of Econometrics and Business Statistics, Monash Business School, Monash University, 900 Dandenong Road, Caulfield East, VIC 3145, Australia
2
Research School of Finance, Actuarial Studies and Statistics, Australian National University, Canberra, ACT 2601, Australia
*
Author to whom correspondence should be addressed.
Econometrics 2016, 4(2), 24; https://doi.org/10.3390/econometrics4020024
Submission received: 8 December 2015 / Revised: 5 April 2016 / Accepted: 6 April 2016 / Published: 22 April 2016
(This article belongs to the Special Issue Nonparametric Methods in Econometrics)

Abstract

:
This paper develops a sampling algorithm for bandwidth estimation in a nonparametric regression model with continuous and discrete regressors under an unknown error density. The error density is approximated by the kernel density estimator of the unobserved errors, while the regression function is estimated using the Nadaraya-Watson estimator admitting continuous and discrete regressors. We derive an approximate likelihood and posterior for bandwidth parameters, followed by a sampling algorithm. Simulation results show that the proposed approach typically leads to better accuracy of the resulting estimates than cross-validation, particularly for smaller sample sizes. This bandwidth estimation approach is applied to nonparametric regression model of the Australian All Ordinaries returns and the kernel density estimation of gross domestic product (GDP) growth rates among the organisation for economic co-operation and development (OECD) and non-OECD countries.

1. Introduction

Nonparametric regression is an important tool for exploring the unknown relationship between a response variable and a set of explanatory variables also known as regressors. A simple and commonly used estimator of the regression function is the Nadaraya-Watson (NW) estimator proposed by [1,2]. In many empirical applications of nonparametric regression models, regressors are often of mixed types such as continuous and categorical. In such a situation, [3] proposed estimating the regression function by the NW-type estimator with different types of regressors being assigned different kernel functions. Since their seminal work, there have been many theoretical and methodological investigations on nonparametric regression with mixed types of regressors (see for example, [4,5,6,7,8,9,10,11]). It has been generally accepted that the performance of the NW estimator is mainly determined by its bandwidths. In the current literature, the cross-validation (CV) technique is often used for choosing bandwidths. Following the recent work by [12], this paper aims to investigate a Bayesian sampling approach to bandwidth estimation for the NW estimator in a nonparametric regression model, where regressors can be continuous and discrete variables.
The popularity of CV is accredited to its simplicity and reasonably good performance. However, this bandwidth selection method has some limitations. First, the CV technique tends to choose a too small bandwidth. As discussed by [13], there are necessary and sufficient conditions to ensure the optimality of CV for bandwidth selection in nonparametric regression models. It may not be possible to examine whether these conditions hold in practice. Second, even though the CV method does not require an assumption about the error density, it provides no direct solutions to error density estimation. However, error density estimation is important for assessing the goodness of fit of a specified error distribution [14,15,16]; for testing symmetry, skewness and kurtosis of the residual distribution [17,18,19]; for statistical inference, prediction and model validation [20,21]; and for estimating the density of the response variable [22,23]. Therefore, being able to estimate the error density is as important as being able to estimate the regression function.
We present a Bayesian sampling approach to bandwidth estimation for the NW estimator involving mixed types of regressors, where the errors are independent identically distributed (iid) and follow a kernel-form error density studied previously by [24] for GARCH models, and [12] for nonparametric regression models with only continuous regressors. We develop a sampling algorithm, which is an extension to the algorithm proposed by [12] in the sense that the regressors are of mixed types. It leads to a posterior estimate of the response density, where the response variable is modeled as an unknown function of continuous and discrete explanatory variables. The importance of such models can be explained through finance and economic data examples.1
Suppose we are interested in the distribution of daily returns of the All Ordinaries (Aord) index of the Australian stock market. Many analysts believe that since the beginning of the global financial crisis, the Australian stock market generally follows the overnight performance of the US and several European markets. As the US stock market is thought to have a leading effect on other markets worldwide, we may choose the daily return of the S&P 500 index as a regressor, and a binary variable indicating the sign of the daily return of FTSE index as another regressor. With our proposed sampling algorithm, we are able to not only estimate bandwidths for the NW estimator and the kernel-form error density, but also derive a posterior estimate of the response density. When CV is used to choose bandwidths for the NW estimator, one might have to apply likelihood cross-validation to the residuals so as to derive a kernel density estimator of residuals. This would result in a two-stage procedure for choosing bandwidths in the regression and error-density estimators, and we show that it is empirically inferior to our sampling procedure through a series of simulation studies.
We conduct Monte Carlo simulation studies to compare the in-sample and out-of-sample performances between Bayesian sampling and CV in choosing bandwidths for the regression estimator and error density estimator. Our Bayesian sampling approach to bandwidth estimation leads to more accurate estimators than CV in most situations and in particular for smaller sample sizes, while the latter performs as well as the former in only a few occasions.
Our sampling algorithm is empirically validated through an application to bandwidth estimation in the nonparametric regression of the Aord daily return on the overnight S&P 500 return and a binary variable showing the sign of overnight FTSE return. An important and very useful output from this sampling algorithm is the one-day-ahead posterior predictive density of the Aord daily return, which we use to calculate value-at-risk (VaR). Given the close relationship between conditional mean regression and conditional density estimation, we also modify the sampling algorithm for the purpose of choosing bandwidths in kernel condition density estimation of GDP growth rate of a country given its OECD status and the year value of growth-rate observations.
The rest of the paper is organized as follows. Section 2 presents a brief description of the NW estimator when the regressors include continuous and discrete variables. In Section 3, we derive the likelihood and posterior for bandwidth parameters. A sampling algorithm is also presented. Section 4 presents Monte Carlo simulation studies that examine the performance of the proposed sampling method for bandwidth estimation. In Section 5, we use the sampling method to estimate bandwidths for a nonparametric regression model of stock returns. We modify the proposed sampling algorithm to estimate bandwidths in kernel conditional density estimation of a country’s GDP growth rate in Section 6. Section 7 concludes the paper.

2. Nadaraya-Watson Estimator with Mixed Types of Regressors

We present a brief description of the NW estimator of the unknown regression function that contains continuous and discrete explanatory variables. More details can be found in [6]. We consider the nonparametric regression model given by
y i = m ( x i ) + ε i , i = 1 , 2 , , n ,
where y i is an observation of a scalar response, x i = x i ( c ) , x i ( d ) with x i ( c ) being a vector of p continuous variables and x i ( d ) a vector of q discrete variables, and ε 1 , ε 2 , , ε n are iid errors with an unknown probability density function denoted as f ( ε ) . The discrete variables can be either ordered or unordered, which in turn affects the choice of kernel functions.
The flexibility of model (1) stems from the fact that the unknown regression function m ( · ) does not need to have a specific functional form. With some smoothness properties, m ( · ) is estimated by the NW estimator of the form given by
m ^ x ; h , λ = i = 1 n K h , λ x , x i y i i = 1 n K h , λ x , x i ,
where K h , λ x , x i = K h ( c ) x ( c ) - x i ( c ) × K λ ( d ) x ( d ) , x i ( d ) is a generalized product kernel that admits continuous and discrete regressors. There is a wide range of kernel functions for continuous type of variables (see for example, [6]), and kernel functions for discrete type of variables (see for example, [27]). Here, the kernel function for continuous regressors is a product of p identical Gaussian kernel functions expressed as
K h ( c ) x ( c ) - x i ( c ) = j = 1 p 1 h j ϕ x j ( c ) - x i , j ( c ) h j ,
where x j ( c ) and x i , j ( c ) are respectively, the jth elements of x ( c ) and x i ( c ) , h = ( h 1 , h 2 , , h p ) is a vector of bandwidths associated with the p continuous regressors, and ϕ ( · ) is the standard Gaussian density being used as the kernel function for a continuous variable throughout this paper.
The kernel function for discrete regressors is a product of q identical discrete kernel functions expressed as
K λ ( d ) x ( d ) , x i ( d ) = j = 1 q K λ j ( d ) x j ( d ) , x i j ( d ) .
If the jth element of x ( d ) is nominal, the kernel function is Aitchison and Aitken’s kernel [28] given by
K λ j ( d ) x j ( d ) , x i , j ( d ) = 1 - λ j if x j ( d ) = x i , j ( d ) λ j / ( c - 1 ) otherwise ,
where x j ( d ) and x i , j ( d ) are respectively, the jth elements of x ( d ) and x i ( d ) , and λ j ( 0 , ( c - 1 ) / c ) is the bandwidth, for j = 1 , 2 , , q , and c denotes the number of discrete outcomes. Note that this kernel function can be used for either unordered categorical variables or unequal-interval ordered variables.
If the jth element of x ( d ) is ordinal, its kernel is Li and Racine’s kernel [6] kernel expressed as
K λ j ( d ) x j ( d ) , x i , j ( d ) = 1 if x j ( d ) = x i , j ( d ) λ j x j ( d ) - x i , j ( d ) otherwise ,
for j = 1 , 2 , , q , and i = 1 , 2 , , n , where λ = ( λ 1 , λ 2 , , λ q ) is a vector of bandwidths assigned to the corresponding q discrete regressors. These bandwidths are restricted to be within ( 0 , 1 ) .
For the case where discrete explanatory variables are included in a nonparametric regression model, there exists a conventional frequency estimator of the regression function in the literature. This frequency approach involves splitting data into cells based on different values of the discrete variables and using the data in each cell to derive an estimator of the regression function. Li and Racine [6] found that the NW estimator given by (2) is strongly supported against the frequency estimator for both theoretical and practical reasons.
It is noteworthy that if λ j = 0 for all j = 1 , 2 , , q , then K λ j ( d ) x j ( d ) , x i , j ( d ) becomes an indicator function taking values 1 and 0, corresponding to the conventional frequency estimator. When λ j = 1 , this indicates that x j ( d ) is “smoothed out” and becomes an irrelevant variable [5]. Similarly, if h j is very large in the kernel function given by (2), it indicates that x j ( c ) is smoothed out and has no explanatory effect on the response variable. As a by-product, the ability of distinguishing irrelevant variables from relevant variables makes the resulting NW estimator very attractive, in comparison to the conventional frequency estimator.
The performance of the NW estimator is mainly determined by its bandwidths, and in the current literature, bandwidths are often chosen through CV with the CV function defined as
CV ( h , λ ) = 1 n i = 1 n y i - m ^ ( - i ) x i ; h , λ 2 w ( x i ) ,
where m ^ ( - i ) ( x i ; h , λ ) is the leave-one-out NW estimator given by
m ^ ( - i ) ( x i ; h , λ ) = j = 1 ; j i n K h , λ x i , x j y j j = 1 ; j i n K h , λ x i , x j ,
and w ( · ) is a weight function taking values in [ 0 , 1 ] . The purpose of the weight function in CV ( h , λ ) is to avoid difficulties caused either by division by zero or by the slow convergence rate when x i is near the boundary of the support of x (see [13]). We follow [10] and choose
w ( x i ) = j = 1 p + q I x i , j - x ¯ j 1 . 5 s j ,
where I ( · ) is an indicator function, and x ¯ j and s j are the sample mean and standard deviation of { x i , j : 1 i n } .
In some empirical studies, CV tends to choose too small a bandwidth. Li and Zhou [13] observed that there are some conditions to ensure the optimality of the CV function. However, it is impossible to check whether all these conditions hold due to the unknown regression function. This problem has motivated us to investigate an alternative approach to bandwidth estimation, namely a Bayesian sampling approach.

3. Bayesian Estimation of Bandwidths

We consider the nonparametric regression model given by (1) and assume that the iid errors follow an unknown distribution with its density approximated by
f ˜ ( ε ; b ) = 1 n i = 1 n 1 b ϕ ε - ε i b ,
where ϕ ( · ) is the standard Gaussian probability density function. Being previously introduced by [24] in GARCH models, this density function of errors is a mixture of n identical standard Gaussian densities with different means located at individual errors and a common standard deviation b. Moreover, from the view of kernel smoothing, this error density can be regarded as a kernel density based on independent errors, where b plays the role of bandwidth or smoothing parameter. Note that the error density given by (6) is different from the one proposed by [29], who used residuals as proxies of errors and employed the kernel density estimator of residuals to approximate the true error density.
In order to conduct Bayesian sampling for the purpose of estimating bandwidths, we treat the bandwidths in the NW estimator of the regression function and the kernel-form error density as parameters. Even though chosen bandwidths depend on sample size as revealed by existing asymptotic results, such a treatment will not cause problems for a fixed-size sample (see also [30,31,32]).
Let ( y i , x i ) , for i = 1 , 2 , , n , denote the observations of ( y , x ) . Under the error density given by (6), we have
y i f ˜ y i - m ( x i ) ; b ,
for i = 1 , 2 , , n . As m ( · ) is unknown, we replace it with its leave-one-out NW estimator. Thus, the density of y i is approximated by
f ˜ y i - m ^ ( - i ) ( x i ; h , λ ) ; b 1 n j = 1 n 1 b ϕ y i - m ^ ( - i ) ( x i ; h , λ ) - y j - m ^ ( - j ) ( x j ; h , λ ) b ,
for i = 1 , 2 , , n .

3.1. An Approximate Likelihood

The vector of all bandwidths denoted as h , λ , b are treated as parameters, given which we wish to derive an approximate likelihood of y = ( y 1 , y 2 , , y n ) . For this purpose, we cannot use the approximate density of y i given by (7) directly because it contains ϕ ( 0 ) / b for j = i . When b is a parameter and is estimated based on a fixed-size sample, numerical optimization of the likelihood built up through (7) may end up with an arbitrarily small bandwidth due to the existence of ϕ ( 0 ) / b . Therefore, any pair of observations that leads to a zero argument of ϕ ( · ) should be excluded from the summation given by (7). Following the suggestion of [12], we exclude the jth term when y j - m ^ ( - j ) ( x j ; h , λ ) = y i - m ^ ( - i ) ( x i ; h , λ ) , from the summation given in (7). Let
J i = j : y j - m ^ ( - j ) ( x j ; h , λ ) y i - m ^ ( - i ) ( x i ; h , λ ) , for j = 1 , 2 , , n ,
and n i is the number of terms excluded from the sum given in (7). Although the response variable is continuous, by chance, the set J i may contain more than one element. Therefore, the density of y i is approximated by
f ˜ y i - m ^ ( - i ) ( x i ; h , λ ) ; b 1 n - n i j J i 1 b ϕ y i - m ^ ( - i ) ( x i ; h , λ ) - y j - m ^ ( - j ) ( x j ; h , λ ) b ,
for i = 1 , 2 , , n .
Let h 2 denote a row vector whose elements are the squared elements of h. Thus, given ( h 2 , λ , b 2 ) , the likelihood of y is approximated by
y | h 2 , λ , b 2 i = 1 n 1 n - n i j J i 1 b ϕ y i - m ^ ( - i ) ( x i ; h , λ ) - y j - m ^ ( - j ) ( x j ; h , λ ) b .
Note that if n i = 1 , this likelihood function reduces to the leave-one-out likelihood.

3.2. Priors

We follow [12] choices of priors of bandwidths for continuous regressors and the kernel-form error density. Let π ( h j 2 ) denote the prior of h j 2 , for j = 1 , 2 , , p , and π ( b 2 ) the prior of b 2 . The priors of h j 2 and b 2 can be chosen from a variety of densities with a positive domain, such as log normal and inverse Gamma densities. As the Gaussian kernel is used for each variate in this situation, each bandwidth is also considered as the standard deviation of the corresponding Gaussian density. Therefore, the prior of each squared bandwidth can be chosen to be an inverse Gamma density, which is a frequently used proper prior for the variance parameter. Thus, the prior of h j 2 is
π h j 2 = ( β h ) α h Γ ( α h ) 1 h j 2 α h + 1 exp - β h h j 2 , for j = 1 , 2 , , p ,
and the prior of b 2 is
π b 2 = ( β b ) α b Γ ( α b ) 1 b 2 α b + 1 exp - β b b 2 ,
where the hyperparameters are chosen as α h = α b = 1 and β h = β b = 0 . 05 (see for example, [33] and [34] pp. 38–39).
Let π ( λ j ) denote the prior of λ j , the bandwidth assigned to the jth discrete regressor, for j = 1 , 2 , , q . The prior of λ j is assumed to be a uniform density defined on ( z a , z b ) . For nominal regressors, z a = 0 and z b = ( c - 1 ) / c ; and for ordered categorical regressors, z a = 0 and z b = 1 . See for example, [8], for discussion of restrictions on these smoothing parameters.
The joint prior of h 2 , λ , b 2 is the product of all the marginal priors and is denoted as π h 2 , λ , b 2 .

3.3. An Approximate Posterior

An approximate posterior of h 2 , λ , b 2 is obtained as the product of the approximate likelihood given by (8) and the joint prior, and is expressed as (up to a normalizing constant)
π h 2 , λ , b 2 | y y | h 2 , λ , b 2 × π h 2 , λ , b 2 .
The random-walk Metropolis algorithm can be used to carry out the simulation, where the acceptance rate of random-walk Metropolis algorithm is targeted at 0.234 for multivariate draws and 0.44 for univariate draws [35,36]. In order to achieve similar levels of acceptance rates, we use the adaptive random-walk Metropolis algorithm proposed by [36]. This algorithm is capable of selecting appropriate scales, and achieves the targeted acceptance rates without manual adjustment. The sampling procedure is described as follows.
Step 1:
Specify a Gaussian proposal distribution, and start the sampling iteration process by choosing an arbitrary value of ( h 2 , λ , b 2 ) and denoting it as ( h ( 0 ) 2 , λ ( 0 ) , b ( 0 ) 2 ) . For example, the elements of h ( 0 ) 2 and b ( 0 ) 2 can be any values on ( 0 , 1 ) and the elements of λ ( 0 ) can be any values on ( 0 , ( c - 1 ) / c ) for nominal regressors and ( 0 , 1 ) for categorical regressors.
Step 2:
At the kth iteration, the current state h ( k ) 2 is updated as h ( k ) 2 = h ( k - 1 ) 2 + γ ( k - 1 ) u / | | u | | , where u is drawn from the proposal density which is the p dimensional standard Gaussian density, and γ ( k - 1 ) is an adaptive tuning parameter with an arbitrary initial value γ ( 0 ) . The updated h ( k ) 2 is accepted with a probability given by
min π h ( k ) 2 , λ ( k - 1 ) , b ( k - 1 ) 2 | y π h ( k - 1 ) 2 , λ ( k - 1 ) , b ( k - 1 ) 2 | y , 1 .
Step 3:
The tuning parameter for the next iteration is set to
γ ( k ) = γ k - 1 + c 1 - ξ / k if h ( k ) 2 is   accepted γ k - 1 - c ξ / k if h ( k ) 2 is   rejected ,
where c = γ ( k - 1 ) / ξ - ξ 2 is a constant, and ξ is the optimal target acceptance probability, which is 0.234 for multivariate updating and 0.44 for univariate updating (see for example, [35,36]).
Step 4:
Update λ ( k - 1 ) and b ( k - 1 ) 2 in the same way as described by Steps 2 and 3.
Step 5:
Repeat Steps 2–4, discard the burn-in period of iterations, and the draws after the burn-in period are recorded and denoted as h ( k ) , λ ( k ) , b ( k ) : k = 1 , 2 , , M .
Upon completing the above iterations, we use the ergodic mean (or posterior mean) of each simulated chain as an estimate of each bandwidth. The mixing performance of each simulated chain is monitored by the simulation inefficiency factor (SIF). As each simulated chain is a Markov chain, its SIF can be interpreted as the number of draws required so as to derive independent draws from the simulated chain (see for example, [33,37,38,39]).
In the following analyses, the burn-in period is taken as 1000 iterations and the number of recorded iterations after the burn-in period is 10 , 000 . The number of batches is 200, and there are 50 draws within each batch.

4. Monte Carlo Simulation Study

A Monte Carlo simulation study was conducted to investigate the properties of the proposed Bayesian sampling approach to bandwidth estimation in comparison to the CV method for bandwidth selection in the NW regression estimator. The conventional frequency estimator, which is equivalent to setting the bandwidths for all discrete and continuous regressors to zero in the NW estimator [6] (Chapter 3) was also included in the comparison.
A range of different simulation experiments were conducted using seven different data generating processes (DGPs), five of which were discussed in [4]. To assess the performance of each approach, at each iteration we generated 2 n observations denoted as y i , x i ( d ) , x i ( c ) : 1 i 2 n , where y i is calculated via the DGP, x i ( d ) is the vector of discrete regressors and x i ( c ) is the vector of continuous regressors. The first n observations were used for estimation and in-sample evaluation, and the last n observations for out-of-sample evaluation (see also [10]). We used the average squared error (ASE) as an evaluation measure for both in-sample and out-of-sample evaluation:
ASE in = 1 n i = 1 n m x i ( d ) , x i ( c ) - m ^ x i ( d ) , x i ( c ) ; θ ^ 2 w x i , ASE out = 1 n i = 1 n m x n + i ( d ) , x n + i ( c ) - m ^ x n + i ( d ) , x n + i ( c ) ; θ ^ 2 w x i ,
where θ = ( h , λ , b ) under the Bayesian method, θ = ( h , λ ) under CV, and θ = h for the frequency estimator; m ^ x i ( d ) , x i ( c ) ; θ is the NW estimator of m based on the sample of the first n observations, and w ( x i ) is the weight function given by (5) for the in-sample and out-of-sample evaluation. The purpose of the weight function is to trim those extreme observations that lie outside most of the data points in the continuous regressors [4]. We calculated the mean, median, standard deviation (SD) and interquartile range (IQR) of each ASE averaged over the 1000 Monte Carlo replications.
In order to test whether variations in in-sample ASE between the different estimation methods are significantly different, we conducted the Kruskal-Wallis test [40]. When the Kruskal-Wallis test rejects the null hypothesis of no difference among the methods considered, we implement a posthoc multiple comparison, which is Dunn’s test [41] with Bonferroni correction, to examine which method differs significantly from others. Differences in out-of-sample ASEs were assessed using the model confidence set (MCS) procedure of [42].

4.1. Accuracy of Regression Estimator

4.1.1. Experiment 1: Binary and Continuous Regressors

This experiment involves three DGPs. The first DGP is given by
y i = j = 1 4 x i , j ( d ) + j = 1 4 k j k = 1 4 1 2 x i , j ( d ) x i , k ( d ) + j = 1 4 x i , j ( d ) m 1 x i ( c ) + m 2 x i ( c ) + u i ,
for i = 1 , 2 , , n , where x i , j ( d ) takes values of 0 and 1 with an equal probability of 0.5, j = 1 , 2 , , 4 , x i ( c ) is drawn from the uniform distribution on [ 0 , 2 ] , m 1 x i ( c ) = sin x i ( c ) π ; m 2 x i ( c ) = x i ( c ) - 0 . 5 x i ( c ) 2 + 0 . 3 x i ( c ) 3 , and u i is drawn from N ( 0 , 1 ) . Sample sizes of n = 100 , 200 and 500 were used, and the results are presented in Table 1.
The NW estimator with bandwidths estimated through Bayesian sampling slightly outperforms the same estimator with bandwidths selected through CV, and these methods outperform the conventional frequency estimator in terms of all four summary statistics. The differences decline as n increases. The Kruskal-Wallis test has a p value of zero for each value of n implying that there are significant differences in performance between at least one pair of methods. According to Dunn’s test with Bonferroni correction, the Bayesian method differs significantly from the frequency method for all sample sizes, but differs significantly from the CV method for n = 100 only. For n = 200 and 500, differences between the Bayesian and CV methods are insignificant. Based on the out-of-sample ASE values, the MCS procedure determines that the Bayesian method performs best for all values of n.
The second and third DGPs are given by
y i = x i , 1 ( d ) + x i , 2 ( d ) + x i , 1 ( c ) + x i , 2 ( c ) + u i ,
and
y i = x i , 1 ( d ) + x i , 2 ( d ) + x i , 1 ( d ) x i , 2 ( d ) + x i , 1 ( c ) + x i , 2 ( c ) + x i , 1 ( c ) x i , 2 ( c ) + u i ,
for i = 1 , 2 , , n , where x i , 1 ( d ) and x i , 2 ( d ) take values from { 0 , 1 } with equal probabilities of 0.5, x i , 1 ( c ) and x i , 2 ( c ) are drawn from N ( 0 , 1 ) , and u i is drawn from N ( 0 , 1 ) . The third DGP differs from the second by the inclusion of two interaction terms. Again, sample sizes of n = 100 , 250 and 500 were used. The results are presented in Table 2.
To estimate the regression functions for the two DGPs, we employed the NW estimator with bandwidths estimated through Bayesian sampling and CV, as well as the conventional frequency estimator. The summary statistics for the in-sample and out-of-sample ASE values for both DGPs are tabulated in Table 2.
For the second DGP, Bayesian sampling leads to a slightly better NW estimator than CV in most cases based on the summary statistics of ASE values, but these differences are not significant because the Kruskal-Wallis test cannot reject the null hypothesis of no differences between the three methods for all three sample sizes. Using the out-of-sample ASE values, the MCS procedure finds in favour of the Bayesian approach for n = 100 and the CV method for n = 200 and 500.
For the third DGP, the Kruskal-Wallis test clearly rejects the null hypothesis of no difference between the three methods for all values of n. Using Dunn’s test with Bonferroni correction, we found that the Bayesian method differs significantly from the CV and frequency methods respectively. However, the CV method does not differ significantly from the frequency method. The MCS procedure finds that under the out-of-sample ASE, the Bayesian method performs better than the CV method, and both methods outperform the frequency approach.

4.1.2. Experiment 2: Ordered and Unordered Categorical Regressors

The fourth and fifth DGPs were used to examine the difference between kernel functions for ordered categorical variables given by (4) and those for unordered categorical variables given by (3). The fourth DGP includes ordered categorical and continuous variables and is expressed by
y i = x i , 1 ( c ) + x i , 2 ( c ) + x i , 1 ( d ) + x i , 2 ( d ) + u i ,
where x i , j ( c ) is drawn from N ( 0 , 1 ) , for j = 1 and 2, x i , j ( d ) takes values from { 0 , 1 , , 5 } with an equal probability of 1 / 6 , for j = 1 and 2, and the error term u i is drawn from N ( 0 , 1 ) , for i = 1 , 2 , , n .
Let x ( c ) denote the vector of two continuous regressors and x ( d ) the vector of two discrete regressors. The relationship between the response and regressors is modeled by
y i = m x i ( c ) , x i ( d ) + u i ,
where u i , for i = 1 , 2 , , n , are assumed to be independent. Bandwidths in the NW regression estimator are estimated through the proposed Bayesian method and the CV approach each applied in two different ways; first using the kernel for ordered categorical variables given by (4) and then using the kernel for unordered categorical variables given by (3). Together with the conventional frequency estimator, this means that we are now evaluating five different estimators. We expect that the use of the ordered kernel should dominate the use of the unordered kernel because the observations of the discrete regressors have a natural order. Sample sizes of n = 100 , 200, 500 and 1000 were used and the results are presented in Table 3.
The Kruskal-Wallis test has a p value of zero for all values of n thus rejecting the null hypothesis of no difference in performance among the five estimators. According to the in-sample and out-of-sample ASE measures, the Bayesian method performs slightly better than the corresponding CV method, and the use of the kernel function for the ordered variables outperforms the use of the kernel function for the unordered variables. The Bayesian method using the ordered kernel almost always has the lowest values of all four summary statistics for both in-sample and out-of-sample ASEs. Applying Dunn’s test with Bonferroni correction to the in-sample ASEs, we found that the Bayesian method with ordered kernel is similar to the Bayesian method with unordered kernel and CV with ordered kernel, but differs from the CV method with unordered kernel and frequency method for all sample sizes. The Bayesian method with unordered kernel differs from the CV method with ordered and unordered kernels and frequency method when n = 100 . As n increases, the Bayesian method differs only from the CV with unordered kernel and frequency method. There are significant differences between the CV method with ordered and unordered kernels and frequency method. The MCS procedure finds that the ordered kernel should be used for ordered categorical variables, and the Bayesian method performs better than the CV method.
The fifth DGP includes ordered categorical and continuous regressors and is given by
y i = 1 + x i ( d ) + x i ( c ) + u i , for i = 1 , 2 , , n ,
where x i ( d ) is drawn from { 0 , 1 , , 4 } with an equal probability of 1/5, x i ( c ) is drawn from N ( 0 , 1 ) , and the error term u i is drawn from N ( 0 , 1 ) . As the response variable is affected by the discrete regressor through its square root, the actual distance between categories 0 and 1 is 1, between categories 1 and 2 is 2 - 1 0 . 41 , between categories 2 and 3 is 3 - 2 0 . 32 , and between categories 3 and 4 is 4 - 3 0 . 27 (see also [4]).
The purpose of this simulation is to investigate the five estimators in a situation where the distance between any pair of successive observations is not a fixed constant. Sample sizes of n = 50 , 100 and 200 were used, and the results are presented in Table 4.
Again the Kruskal-Wallis test has a p value of zero for all values of n thus rejecting the null hypothesis of no difference in performance among the five estimators. This time the Bayesian method using the unordered kernel almost always has the lowest values of all four summary statistics for both in-sample and out-of-sample ASEs. Differences diminish as n increases. According to Dunn’s test with Bonferroni criterion, the Bayesian method with ordered and unordered kernels behave similarly, while the CV method with unordered kernel performs similarly to the frequency method. There are significant differences among the Bayesian method with unordered kernel, CV with ordered and unordered kernels, and frequency methods. Based on the in-sample ASEs, the ordered Bayesian method is also better than both CV methods and the frequency approach for all values of n. Not surprisingly, the MCS procedure finds in favour of the Bayesian method using the unordered kernel for all n values.
What is surprising is that differences between the CV method with unordered kernel and the frequency approach are not significant. In order to examine the role of the choice of kernel in the relative performance of the various estimators, we repeated the last simulation using Wang and Van Ryzin’s kernel function [43], where bandwidths were estimated through Bayesian, CV and frequency approaches. Table 5 presents a summary of descriptive statistics of the in-sample and out-of-sample ASE values. Under the criterion of in-sample ASE, the frequency approach is comparable to the Bayesian method, but both perform poorer than CV. However, under the criterion of out-of-sample ASE, the Bayesian approach is comparable to CV, but both perform better than the frequency approach. The Kruskal-Wallis test reveals no significant differences between the three methods for all values of n.

4.1.3. Experiment 3: Time Series Regression with Continuous and Binary Regressors

The sixth DGP includes a time series response variable explained by its lagged variable, a continuous time series regressor x t and a binary regressor I t , which is generated based on another time series. This model is expressed as
y t = 0 . 25 y t - 1 + 0 . 6 x t + r ( I t - 0 . 5 ) + ε t , ε t = σ y , t e t , σ y , t 2 = 0 . 02 + 0 . 05 ε t - 1 2 + 0 . 9 σ y , t - 1 2 ,
for t = 1 , 2 , , n , where r is a random number that follows the uniform distribution on ( 0 , 1 ) , and e 1 , e 2 , , e n are iid N ( 0 , 0 . 49 ) . The continuous regressor x t is generated as
x t = σ x , t u t , σ x , t 2 = 0 . 02 + 0 . 05 x t - 1 2 + 0 . 9 σ x , t - 1 2 ,
where u 1 , u 2 , , u n are iid N ( 0 , 1 ) . The binary regressor I t is an indicator of z t and equals one with a positive z t and zero otherwise, where z t is generated as
z t = σ z , t v t , σ z , t 2 = 0 . 02 + 0 . 05 z t - 1 2 + 0 . 9 σ z , t - 1 2 ,
where v 1 , v 2 , , v n are iid N ( 0 , 1 ) . The variance-covariance matrix of ( e t , u t , v t ) , for t = 1 , 2 , , n , is
0 . 49 0 . 25 0 . 25 0 . 25 1 0 . 25 0 . 25 0 . 25 1 .
Sample sizes of n = 100 , 200 and 500 were used in this experiment and the results are presented in Table 6.
The Kruskal-Wallis test rejects the null hypothesis of no difference between the ASEs of the three methods for n = 100 but not for n = 200 and 500. The Bayesian method always has the smallest mean ASE and almost always has the smallest median across both in-sample and out-of-sample ASEs. According to Dunn’s test with Bonferroni correction, the Bayesian method significantly differs from the frequency method, while the CV method performs similarly to the Bayesian and frequency methods for n = 100 . For this sample size, the in-sample and out-of-sample mean ASEs obtained through CV are respectively, 8.8% and 23.2% larger than those for the Bayesian method. Based on the MCS procedure applied to the out-of-sample ASEs, the Bayesian method is significantly better than its two counterparts.

4.1.4. Experiment 4: The Presence of Irrelevant Regressors

In a nonparametric regression model, the NW estimator has the ability to smooth out irrelevant regressors through a data-driven bandwidth selection method such as CV by choosing very large bandwidth parameters for those regressors. This has important implications for variable selection (see [5]). This experiment compares the Bayesian and CV methods in the presence of two irrelevant regressors.
The seventh DGP generates variables as follows. Binary variables z 1 , i and z 2 , i were generated so that Pr { z 1 , i = 1 } = 0 . 69 and Pr { z 2 , i = 1 } = 0 . 73 and continuous variables x 1 , i and x 2 , i were generated as independent standard normal values for i = 1 , 2 , , n . They were generated so there is no correlation between any pair of regressors. The response variable was generated via
y i = z 1 , i + x 1 , i + ϵ i ,
where ϵ i N ( 0 , 1 ) , for i = 1 , 2 , , n . In order to examine whether irrelevant regressors can be smoothed out by assigning them large bandwidths, we estimate the following model:
y i = z 1 , i + z 2 , i + x 1 , i + x 2 , i + ϵ i ,
for i = 1 , 2 , , n . This model means that z 2 and x 2 are irrelevant regressors. Samples sizes of n = 100 and 250 were used. Summary statistics of the estimated bandwidths for 1000 iterations are presented in Table 7 with the summary statistics for the ASEs of the two methods given in Table 8.
For the proposed Bayesian bandwidth selection method, the average bandwidth chosen for z 2 is larger than that chosen for z 1 by 1.47 times when n = 100 (3.87 times when n = 250 ), and the average bandwidth chosen for x 2 is larger than that chosen for x 1 by 3.92 times when n = 100 (3.87 times when n = 250 ). This shows that due to their large bandwidths, irrelevant regressors may not explain too much about the response variable in comparison to their corresponding relevant regressors.
When CV is used for bandwidth choice, we find that the average bandwidth chosen for z 2 is larger than the one chosen for z 1 by 5.23 times when n = 100 (12.13 times when n = 250 ). Moreover, the average bandwidth chosen for x 2 is larger than that chosen for x 1 by 1 . 79 × 10 7 times when n = 100 ( 1 . 34 × 10 7 times when n = 250 ). Clearly, CV leads to a larger bandwidth than the Bayesian approach for each irrelevant regressor.
With respect to the ASE measure of accuracy, the proposed Bayesian sampling method leads to slightly better accuracy than CV when n = 100 with CV being better when n = 250 . The Kruskal-Wallis test rejects the null hypothesis at the 5% significance level of no difference between the two methods for both sample sizes. Having implemented Dunn’s test with Bonferroni criterion, we found that the Bayesian method differs significantly from the CV method for all sample sizes. The MCS procedure applied to the out-of-sample ASEs finds the Bayesian method is significantly better when n = 100 and CV is significantly better when n = 250 .
In the above seven simulation studies, we only consider certain types of discrete variables such as binary and categorical variables. We have not considered DGPs that allow for other possible types of discrete variables. In terms of other types of discrete variables, [44,45] studied performance of several associate kernels including the binomial kernel for count data in nonparametric regression models.

4.2. Accuracy of the Error Density Estimator

The proposed Bayesian sampling algorithm is based on the assumption of a kernel-form error density given by (6), whose bandwidth is sampled at the same time as when bandwidths of the NW estimator are sampled. Upon completion of the sampling algorithm, we also obtain a kernel density estimator of the error density. However, when CV is used for selecting bandwidths for the NW estimator, one may obtain the kernel density estimator of residuals, but its bandwidth has to be selected based on residuals through an existing bandwidth selector such as likelihood cross-validation. Thus, it requires two stages of using the cross-validation method to select bandwidths for the NW estimator and the kernel density estimator of residuals, and we call it two-stage CV.
The performance of a kernel estimator of the error density denoted as f ^ ( · ) , is examined by its integrated squared errors (ISE). In our Monte Carlo simulation studies, the ISE was numerically approximated at 1001 equally spaced grid points on [ - 5 , 5 ] :
ISE i = 1 1001 f - 5 + i - 1 100 - f ^ - 5 + i - 1 100 2 × 10 1000 .
The mean ISE (MISE) was approximated by the mean of ISE values derived from the 1000 Monte Carlo replications for each DGP. The in-sample MISE of the kernel estimator of error density with its bandwidth chosen through Bayesian sampling or the two-stage CV for all seven DGPs are presented in Table 9. For any DGP and any sample size considered, Bayesian sampling obviously outperforms the two-stage CV in estimating the bandwidth for the kernel estimator of the error density, based on the mean of in-sample ISE values. For the third and fifth DGPs, the Bayesian method outperforms the two-stage CV in all four summary statistics.
With all the bandwidths chosen based on in-sample observations for each DGP, we calculated the out-of-sample MISE of the kernel estimator of the error density. All the out-of-sample MISE values were tabulated in Table 10. We found that for the second, fifth and sixth DGPs, Bayesian sampling slightly outperforms two-stage CV in terms of all four summary statistics, and for the other three DGPs, results obtained from Bayesian sampling are comparable to those obtained from two-stage CV. Out of all 19 cases of different DGPs and different sample sizes, Bayesian sampling performs better than the two-stage CV for 12 cases, while the latter performs better in 2 cases. Both perform similarly in 5 cases.
To summarize, we have found that for all seven DGPs considered, our Bayesian sampling approach outperforms its competitor, the two-stage CV, in estimating bandwidths for the NW estimator of the regression function and kernel estimator of error density.

4.3. Sensitivity of Prior Choices

To examine the sensitivity of prior choices, we change the priors in two ways. First, we keep the same prior densities, namely inverse Gamma, as before but alter the values of hyperparameters. Second, we change the prior densities for squared bandwidth parameters from the inverse Gamma density to log normal density. When we focus on bandwidth parameters, the use of Cauchy prior densities has been considered by [46]. With one sample of size 500 generated through the first DGP, we derived the Markov chain Monte Carlo (MCMC) simulation results using different priors. The results are summarized in Table 11. We use the SIF to monitor the mixing performance of a simulated chain. The last column of Table 11 shows that the mixing performance is not particularly sensitive to different choices of the prior density.

5. An Application to Modeling Stock Returns

The purpose of this study is to demonstrate the benefit of the proposed sampling algorithm for bandwidth estimation in comparison with the existing bandwidth selection method. We are interested in modeling the daily return of the All Ordinaries (Aord) index in the Australian stock market, where one explanatory variable is the overnight daily return of the S&P 500 index because from the beginning of 2007 onwards, the US has had a leading effect on other markets worldwide. Such a nonparametric regression model was previously studied by [12] to demonstrate their sampling algorithm for bandwidth estimation.
Although the Australian stock market typically followed the overnight market movement in the US, there are some exceptions where the Australian market moves in the opposite direction. This motivated us to look for another explanatory variable, and one such variable is an indicator of a major stock market in the European zone. The indicator was expected to suggest the market movement in Australia because the US stock market was also supposed to have a leading effect on European stock markets. Therefore, we model the Aord daily return as an unknown function of the overnight S&P 500 return and a binary variable indicating whether the overnight FTSE index went up or down. This nonparametric regression model should better reveal the actual relationship between the Australian stock market and the US market than the model investigated by [12], where only a continuous regressor was considered.

5.1. Data

We downloaded daily closing index values of the Aord, S&P 500 and FTSE between January 3, 2007 and October 1, 2012 from Yahoo Finance. Each value of the Aord index was matched to the corresponding overnight values of the S&P 500 and FTSE indices. Whenever one market experienced a non-trading day, the trading data collected from all three markets on that day were excluded. The sample contains n = 1373 observations of the daily continuously compounded return of each index.
We fitted the nonparametric regression model given by
y i = m ( x 1 , i , x 2 , i ) + ε i , for i = 1 , 2 , , n ,
to the sample data, where y i is the Aord daily return, x i , 1 is the S&P 500 daily return, x i , 2 is a binary regressor taking the value of one if the FTSE daily return is positive and zero otherwise, and ε 1 , ε 2 , , ε n are assumed to be iid and follow a distribution with its density given by (6).

5.2. Results

The proposed Bayesian sampling algorithm was employed to estimate bandwidths in the NW estimator and the kernel–form error density. The first row panel of Table 12 presents the estimates of bandwidths, their 95% Bayesian credible intervals and associated SIF values. These small SIF values indicate that the sampler achieved very good mixing. In our experience, a SIF value of no more than 100 usually indicates reasonable mixing.
The second row panel of Table 12 presents the bandwidths selected through two-stage CV. The bandwidths for the continuous regressor and the kernel-form error density derived through two-stage CV are clearly different from those derived through Bayesian sampling.
With the first pair of out-of-sample observations of S&P 500 and FTSE returns, we can make the one-day-ahead forecast of the Aord return before the Australian stock market opens its trading. We collected observations of the S&P 500 and FTSE returns on October 1, 2012 (local time), and then used the nonparametric regression model given by (12) to make a point forecast of the Aord return on October 2, 2012. Such a point forecast was made at each iteration of the MCMC sampling procedure. Upon finishing the sampling procedure, we derived a posterior point forecast of the Aord return by averaging these forecasts made at all iterations. The point posterior forecast of the Aord return is 0.1984%, and its 95% Bayesian credible interval is ( 0 . 1553 % , 0 . 2382 % ) . The actual Aord return on October 2, 2012 is 0.9842%. In comparison to the point forecast of the Aord return of 0.0416% obtained by the same nonparametric kernel regression with bandwidth selected by CV, the proposed Bayesian method leads to a closer forecast than CV.
The kernel-form error density given by (6) allows us to forecast the one-day-ahead density of the Aord return. According to (7), the density of y n + 1 is
f ˜ y y n + 1 | h 2 , λ , b 2 = 1 n j = 1 n 1 b ϕ y n + 1 - m ^ x n + 1 ; h , λ - y j - m ^ x j ; h , λ b ,
where x n + 1 is the vector of first out-of-sample observations of S&P 500 and FTSE returns. The one-day-ahead posterior predictive density is given by
f y y n + 1 | y = f ˜ y y n + 1 | h 2 , λ , b 2 π h 2 , λ , b 2 | y d h 2 d λ d b 2 ,
which we approximate by averaging (13) over the simulated chain of h 2 , λ , b 2 . At each iteration during the sampling procedure, we calculated f ˜ y y n + 1 | h 2 , λ , b 2 at 25,000 grid points with the simulated values of h 2 , λ and b 2 being plugged-in. Upon finishing the sampling procedure, we calculated the average of these calculated density values at each grid point. The posterior predictive cumulative density function (CDF) of the Aord daily return was obtained similarly. The posterior predictive density of the Aord return and its CDF are plotted in blue solid lines in Figure 1 and Figure 2, respectively.
At the 95% and 99% confidence levels, the one-day-ahead VaRs were computed through the posterior predictive CDF. With bandwidths estimated through Bayesian sampling for the nonparametric regression model given by (12), the VaRs for a $100 investment on the Aord index are respectively, $1.4861 and $2.5176 at the 95% and 99% confidence levels.
With bandwidths selected through the two–stage CV for the nonparametric regression model given by (12), the graphs of the one-day-ahead density forecast of the Aord return and its CDF are also plotted in red dot-dash lines in Figure 1 and Figure 2, respectively. The 95% and 99% VaRs for a $100 investment on the Aord index are respectively, $1.6048 and $2.5523, which are larger than the corresponding VaRs derived through Bayesian sampling.
It seems that the two-stage CV leads to an over-estimated VaR in comparison to its Bayesian counterpart. However, the above results were derived based on forecasted densities of one day’s Aord return only. To further justify the empirical importance of our method, we checked the relative frequency of exceedance through rolling samples.

5.3. Relative Frequency of Exceedance

The concept of exceedance refers to the phenomenon that the actual daily loss exceeds the estimated daily VaR during the same period of holding the invested asset. The relative frequency of exceedance is a measure of the accuracy of a VaR estimate. Therefore, we use this measure to evaluate the performance of the proposed Bayesian bandwidth estimation method in comparison to the two-stage CV for the nonparametric regression model with both continuous and binary regressors. The performance of the one-day-ahead forecasted VaR was examined by the relative frequency of exceedance derived through rolling samples. Let α denote the confidence level for computing VaRs. If the relative frequency of exceedance is close to ( 1 - α ) , the underlying method for computing the VaR can be regarded as appropriate. The closer the relative frequency of exceedance is to ( 1 - α ) , the better the underlying VaR estimation method would be.
In order to calculate the relative frequency of exceedance, the samples have a fixed size of 1000. During the whole sample period, the first sample contains the first 1000 observed vectors of the Aord, S&P 500 and FTSE returns, based on which we estimated bandwidths through Bayesian sampling and computed the VaRs at the 95% and 99% confidence levels. The second sample was derived by rolling the first sample forward one day. Based on the second sample, we did the same as for the previous sample. This procedure continued until the second last observation was included in the sample for estimating bandwidths. There are a total of 373 samples for forecasting the one-day-ahead VaRs.
With the daily VaRs forecasted through rolling samples, we calculated the relative frequency of exceedance at different α values with bandwidths chosen through Bayesian sampling and the two-stage CV. With Bayesian sampling, the resultant relative frequencies are respectively, 0.80% and 4.81% at the 99% and 95% confidence levels. However, with two-stage CV method, the corresponding relative frequencies of exceedance are 1.07% and 6.95%, respectively. It shows that two-stage CV for bandwidth selection leads to under-estimated VaRs in comparison to our proposed sampling method, particularly at the 95% confidence level.

6. Conditional Density Estimation of GDP Growth Rates

Given the close relationship between the conditional mean regression and conditional density estimation, the sampling algorithm proposed in Section 3 can be modified for the purpose of choosing bandwidths in kernel density estimation of continuous and discrete variables. Maasoumi, Racine, and Stengos [7] investigated kernel density estimation of the gross domestic product (GDP) growth rate among OECD and non-OECD countries from 1965 to 1995, where the OECD status of the country and the year of the observed growth rate are included in the data matrix. They aimed to estimate the trivariate density of growth rates (denoted as x ( c ) ), OECD status and year (denoted as x ( d ) ), where the last two variables are respectively, binary and ordered categorical. Their primary purpose was to explore the dynamic evolution of OECD and non-OECD countries’ distributions of GDP growth rates across different years. Maasoumi et al. [7] proposed using the kernel estimator with unordered and ordered discrete kernels assigned to the discrete variables to estimate such trivariate densities, where bandwidths were selected through the likelihood cross-validation (LCV) (see also [7,47]).
We are interested in choosing bandwidths for the kernel estimator of x = x ( c ) , x ( d ) , which is expressed as
f ^ x ( c ) , x ( d ) ; h , λ = 1 n j = 1 n K h ( c ) x ( c ) - x j ( c ) × K λ ( d ) x ( d ) , x j ( d ) .
where x i ( c ) and x i ( d ) , for i = 1 , 2 , , n , are observations of x ( c ) and x ( d ) , respectively. The kernel function for GDP growth rates is the Gaussian kernel, while the OECD status is assigned with a kernel function given by (3), and the kernel for years is given by (4).
The likelihood of x = x i ( c ) , x i ( d ) : i = 1 , 2 , , n for given ( h , λ ) is approximately
x | h , λ i = 1 n f ^ ( - i ) x i ( c ) , x i ( d ) ; h , λ ,
where f ^ ( - i ) is the leave–one–out version of f ^ (see for example, [48]).
The priors of bandwidth parameters are the same as those discussed in Section 3.2. The posterior of ( h , λ ) is proportional to the product of x | h , λ and the priors of bandwidths. The adaptive random-walk Metropolis algorithm was used to implement the posterior simulation, where the proposal density is the standard trivariate Gaussian, and the tuning parameter was chosen to make the acceptance rate around 0.234. The posterior mean of each simulated chain is used as an estimate of the corresponding bandwidth.
With the estimated bandwidths, we derived the joint density of GDP growth rate, OECD status and years. The conditional density of GDP growth rates for given values of OECD status and year is the joint density estimator divided by the marginal density estimator of OECD status and year. Note that bandwidths estimated for the joint trivariate kernel density estimator can be used for the kernel conditional density estimator.
Given different values of OECD status and year, we calculated the conditional densities and CDFs of GDP growth rates with their graphs presented in Figure 3 and Figure 4. It shows that Bayesian sampling and LCV lead to clearly different density functions of growth rates. The probability density estimates obtained from LCV have higher peaks than those obtained from the Bayesian method, although they both center at about the same points. The growth-rate distributions of an OECD country and a non-OECD country are very different from 1965 to 1995. Second, the growth-rate density of an OECD country is almost symmetrical and less dispersed than that of a non-OECD country, and this phenomenon becomes obvious over time. The growth-rate density of a non-OECD country is asymmetrical and has larger variation than that of an OECD country. It appears to manifest bimodality and indicate “polarization” within non-OECD countries. The results re-confirm the findings of [7]. Figure 5 presents the stacked plots of OECD and non-OECD density and distribution functions of growth rates for all years, where bandwidths were estimated through Bayesian sampling.
We found the following empirical evidence. First, given the year value at either 1965 or 1970, the conditional growth-rate distribution of an OECD country (purple dotted line on the two top right graphs of Figure 3) stochastically dominates that of a non-OECD country (blue solid line). However, there has been no such stochastic dominance since 1975. Second, given the OECD status of a country, the country’s growth-rate distribution in 1965 (black solid line on the top right graph of Figure 5) stochastically dominates its growth-rate distributions in the other years; and its growth-rate distribution in 1990 (pink long- and short-dashed line) stochastically dominates its growth-rate distributions in 1980 (blue dot-dash line), 1985 (brown dashed line) and 1995 (purple solid line), respectively.

7. Conclusions

We have presented a Bayesian sampling approach to the estimation of bandwidths in a nonparametric regression model with continuous and discrete regressors, where the regression function is estimated by the NW estimator and the unknown error density is approximated by a kernel-form error density. Monte Carlo simulation results show that the proposed Bayesian sampling method typically performs better than, or at least on par in only a few occasions with, cross-validation for choosing bandwidths. In particular, the Bayesian method performs better than the CV method when the sample size is small. The advantage of the proposed Bayesian approach over cross-validation is its ability to estimate the error density. As measured by the MISE, the Bayesian method outperforms the two-stage cross-validation method for estimating the bandwidth in the kernel-form error density. Thus, the proposed sampling method is recommended for estimating bandwidths in the regression-function and kernel-form error density estimators.
The proposed Bayesian sampling algorithm is used to estimate bandwidths for the nonparametric regression of All Ordinaries (Aord) daily return on the overnight S&P 500 return and an indicator of the FTSE return. In comparison to cross-validation for bandwidth selection, the proposed sampling method leads to a different one-step-ahead forecasted density of the Aord return. Consequently, the resulting value-at-risk measure, as well as the relative frequency of exceedance, is different from the one derived with bandwidths selected through cross-validation. In this example, Bayesian sampling for bandwidth estimation in the nonparametric regression of mixed regressors leads to better results than cross-validation. In an application that involves of kernel density estimation of a country’s GDP growth rate conditional on its OECD status and the year of observations, Bayesian sampling for bandwidth estimation leads to different density estimates from those with bandwidths selected through likelihood cross-validation.
There are several ways, along which this paper can be extended. First, the proposed Bayesian algorithm can be extended to several other models, one of which is the nonparametric regression model with conditional heteroscedastic errors or correlated errors. Second, it is possible to consider using asymmetric kernel functions for continuous variables, such as the beta and gamma kernels discussed by in [45], as well as other kernels for discrete variables, such as the binomial and Poisson kernels discussed by [44]. We leave these extensions for future research.

Acknowledgments

We extend our sincere thanks to the editor, Isabel Casas, and two reviewers whose comments helped us clearly improve the manuscript. The first author wishes to thank Jeffrey Racine for insightful discussion during an early stage of this paper. This research was supported under Australian Research Council’s Discovery Projects funding scheme (project numbers DP1095838 and DP130104229).

Author Contributions

All authors contributed equally to the paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. E.A. Nadaraya. “On estimating regression.” Theory Probab. Its Appl. 9 (1964): 141–142. [Google Scholar] [CrossRef]
  2. G. Watson. “Smooth regression analysis.” Sankhya Indian J. Stat. Ser. A 26 (1964): 359–372. [Google Scholar]
  3. Q. Li, and J.S. Racine. “Nonparametric estimation of distributions with categorical and continuous data.” J. Multivar. Anal. 86 (2003): 266–292. [Google Scholar] [CrossRef]
  4. J. Racine, and Q. Li. “Nonparametric estimation of regression functions with both categorical and continuous data.” J. Econom. 119 (2004): 99–130. [Google Scholar] [CrossRef]
  5. P. Hall, Q. Li, and J.S. Racine. “Nonparametric estimation of regression functions in the presence of irrelevant regressors.” Rev. Econ. Stat. 89 (2007): 784–789. [Google Scholar] [CrossRef]
  6. Q. Li, and J.S. Racine. Nonparametric Econometrics: Theory and Practice. Princeton, NJ, USA: Princeton University Press, 2007. [Google Scholar]
  7. E. Maasoumi, J. Racine, and T. Stengos. “Growth and convergence: A profile of distribution dynamics and mobility.” J. Econom. 136 (2007): 483–508. [Google Scholar] [CrossRef]
  8. T. Hayfield, and J.S. Racine. “Nonparametric econometrics: The np package.” J. Stat. Softw. 27 (2008): 1–32. [Google Scholar] [CrossRef]
  9. C. Li, D. Ouyang, and J.S. Racine. “Nonparametric regression with weakly dependent data: The discrete and continuous regressor case.” J. Nonparametric Stat. 21 (2009): 697–711. [Google Scholar] [CrossRef]
  10. L. Su, Y. Chen, and A. Ullah. “Functional coefficient estimation with both categorical and continuous data.” In Advances in Econometrics. Edited by Q. Li and J. Racine. Bingley, UK: Emerald Group Publishing Limited, 2009, Volume 25, pp. 131–167. [Google Scholar]
  11. S. Ma, and J.S. Racine. “Additive regression splines with irrelevant categorical and continuous regressors.” Stat. Sin. 23 (2013): 515–541. [Google Scholar]
  12. X. Zhang, M.L. King, and H.L. Shang. “A sampling algorithm for bandwidth estimation in a nonparametric regression model with a flexible error density.” Comput. Stat. Data Anal. 78 (2014): 218–234. [Google Scholar] [CrossRef]
  13. Q. Li, and J. Zhou. “The uniqueness of cross-validation selected smoothing parameters in kernel estimation of nonparametric models.” Econom. Theory 21 (2005): 1017–1025. [Google Scholar] [CrossRef]
  14. R.M. Loynes. “The empirical distribution function of residuals from generalised regression.” Ann. Stat. 8 (1980): 285–298. [Google Scholar] [CrossRef]
  15. M.G. Akritas, and I. Van Keilegom. “Non-parameteric estimation of the residual distribution.” Scand. J. Stat. 28 (2001): 549–567. [Google Scholar] [CrossRef]
  16. F. Cheng, and S. Sun. “A goodness of fit test of the errors in nonlinear autoregressive time series models.” Stat. Probab. Lett. 78 (2008): 50–59. [Google Scholar] [CrossRef]
  17. I.A. Ahmad, and Q. Li. “Testing symmetry of an unknown density function by kernel method.” J. Nonparametric Stat. 7 (1997): 279–293. [Google Scholar] [CrossRef]
  18. H. Dette, S. Kusi-Appiah, and N. Neumeyer. “Testing symmetry in nonparametric regression models.” J. Nonparametric Stat. 14 (2002): 477–494. [Google Scholar] [CrossRef]
  19. N. Neumeyer, and H. Dette. “Testing for symmetric error distribution in nonparametric regression models.” Stat. Sin. 17 (2007): 775–795. [Google Scholar]
  20. S. Efromovich. “Estimation of the density of regression errors.” Ann. Stat. 33 (2005): 2194–2227. [Google Scholar] [CrossRef]
  21. B. Muhsal, and N. Neumeyer. “A note on residual-based empirical likelihood kernel density estimation.” Electron. J. Stat. 4 (2010): 1386–1401. [Google Scholar] [CrossRef]
  22. R. Samb. “Nonparametric estimation of the density of regression errors.” Comptes Rendus Math. 349 (2011): 1281–1285. [Google Scholar] [CrossRef]
  23. J.C. Escanciano, and D.T. Jacho-Chávez. “ n uniformly consistent density estimation in nonparametric regression models.” J. Econom. 167 (2012): 305–316. [Google Scholar] [CrossRef]
  24. X. Zhang, and M.L. King. “Gaussian kernel GARCH models. Working paper 19/13, Monash University.” 2013. Aailable online: https://ideas.repec.org/p/msh/ebswps/2013-19.html (accessed on 1 December 2015).
  25. X. Zhang, M.L. King, and H.L. Shang. “Bayesian bandwidth selection for a nonparametric regession model with mixed types of regressors.” Working paper 13/13. Monash University, 2013. Available online: https://ideas.repec.org/p/msh/ebswps/2013-13.html (accessed on 1 December 2015).
  26. H.L. Shang. “Bayesian bandwidth estimation for a functional nonparametric regression model with mixed types of regressors and unknown error density.” J. Nonparametric Stat. 26 (2014): 599–615. [Google Scholar] [CrossRef]
  27. C.C. Kokonendji, and T. Senga Kiessé. “Discrete associated kernels method and extensions.” Stat. Methodol. 8 (2011): 497–516. [Google Scholar] [CrossRef] [Green Version]
  28. J. Aitchison, and C.G.G. Aitken. “Multivariate binary discrimination by the kernel method.” Biometrika 63 (1976): 413–420. [Google Scholar] [CrossRef]
  29. A. Yuan, and J.G. de Gooijer. “Semiparametric regression with kernel error model.” Scand. J. Stat. 34 (2007): 841–869. [Google Scholar] [CrossRef]
  30. C.N. Kuruwita, K.B. Kulasekera, and W.J. Padgett. “Density estimation using asymmetric kernels and Bayes bandwidth with censored data.” J. Stat. Plan. Inference 140 (2010): 1765–1774. [Google Scholar] [CrossRef]
  31. Q. Zheng, K.B. Kulasekera, and C. Gallagher. “Local adaptive smoothing in kernel regression estimation.” Stat. Probab. Lett. 80 (2010): 540–547. [Google Scholar] [CrossRef]
  32. N. Zougab, S. Adjabi, and C.C. Kokonendji. “Binomial kernel and Bayes local bandwidth in discrete function estimation.” J. Nonparametric Stat. 24 (2012): 783–795. [Google Scholar] [CrossRef]
  33. S. Kim, N. Shephard, and S. Chib. “Stochastic volatility: Likelihood inference and comparison with ARCH models.” Rev. Econ. Stud. 65 (1998): 361–393. [Google Scholar] [CrossRef]
  34. J. Geweke. Complete and Incomplete Econometric Models. Princeton, NJ, USA: Princeton University Press, 2009. [Google Scholar]
  35. G.O. Roberts, and J.S. Rosenthal. “Examples of adaptive MCMC.” J. Comput. Graph. Stat. 18 (2009): 349–367. [Google Scholar] [CrossRef]
  36. P.H. Garthwaite, Y. Fan, and S.A. Sisson. “Adaptive optimal scaling of Metropolis-Hastings algorithms using the Robbins-Monro process.” Commun. Stat. Theory Methods., 2015. [Google Scholar] [CrossRef]
  37. G.O. Roberts. “Markov chain concepts related to sampling algorithms.” In Markov Chain Monte Carlo in Practice. Edited by W.R. Gilks, S. Richardson and D.J. Spiegelhalter. London, UK: Chapman & Hall, 1996, pp. 45–57. [Google Scholar]
  38. Y.K. Tse, X. Zhang, and J. Yu. “Estimation of hyperbolic diffusion using the Markov chain Monte Carlo method.” Quant. Finance 4 (2004): 158–169. [Google Scholar] [CrossRef]
  39. D.J. Nott, and R. Kohn. “Adaptive sampling for Bayesian variable selection.” Biometrika 92 (2005): 747–763. [Google Scholar] [CrossRef]
  40. W.H. Kruskal, and W.A. Wallis. “Use of ranks in one-criterion variance analysis.” J. Am. Stat. Assoc. 47 (1952): 583–621. [Google Scholar] [CrossRef]
  41. O.J. Dunn. “Multiple ccomparison using rank sums.” Technometrics 6 (1964): 241–252. [Google Scholar] [CrossRef]
  42. P.R. Hansen, A. Lunde, and J.M. Nason. “The model confidence set.” Econometrica 79 (2011): 453–497. [Google Scholar] [CrossRef]
  43. M.C. Wang, and J. Van Ryzin. “A class of smooth estimators for discrete distributions.” Biometrika 68 (1981): 301–309. [Google Scholar] [CrossRef]
  44. N. Zougab, S. Adjabi, and C.C. Kokonendji. “Bayesian approach in nonparametric count regression with binomial kernel.” Commun. Stat. — Simul. Comput. 43 (2014): 1052–1063. [Google Scholar] [CrossRef]
  45. S.M. Somé, and C.C. Kokonendji. “Effects of associated kernels in nonparametric multiple regressions.” Working paper. University of Franche-Comté, 2015. Available online: arxiv.org/pdf/1502.01488v1.pdf (accessed on 1 December 2015).
  46. X. Zhang, R.D. Brooks, and M.L. King. “A Bayesian approach to bandwidth selection for multivariate kernel regression with an application to state-price density estimation.” J. Econom. 153 (2009): 21–32. [Google Scholar] [CrossRef]
  47. P. Hall. “On Kullback-Leibler loss and density estimation.” Ann. Stat. 15 (1987): 1491–1519. [Google Scholar] [CrossRef]
  48. X. Zhang, M.L. King, and R.J. Hyndman. “A Bayesian approach to bandwidth selection for multivariate kernel density estimation.” Comput. Stat. Data Anal. 50 (2006): 3009–3031. [Google Scholar] [CrossRef]
  • 1.A former version of this paper is [25], based on which [26] studied bandwidth selection for a nonparametric functional regression model with mixed types of regressors, where the distance metric is not well defined in a function space.
Figure 1. Graphs of posterior predictive density of the forecasted All Ordinaries return on October 2, 2012.
Figure 1. Graphs of posterior predictive density of the forecasted All Ordinaries return on October 2, 2012.
Econometrics 04 00024 g001
Figure 2. Graphs of the posterior predictive cumulative density of the forecasted All Ordinaries return on October 2, 2012.
Figure 2. Graphs of the posterior predictive cumulative density of the forecasted All Ordinaries return on October 2, 2012.
Econometrics 04 00024 g002
Figure 3. Density and distribution functions of GDP growth rate by year and OECD status.
Figure 3. Density and distribution functions of GDP growth rate by year and OECD status.
Econometrics 04 00024 g003
Figure 4. Density and distribution functions of GDP growth rate by year and OECD status (continued).
Figure 4. Density and distribution functions of GDP growth rate by year and OECD status (continued).
Econometrics 04 00024 g004
Figure 5. Stacked plots of density and distribution functions of GDP growth rate.
Figure 5. Stacked plots of density and distribution functions of GDP growth rate.
Econometrics 04 00024 g005
Table 1. Mean, median and variation measures of the average squared error (ASE) values derived through 1000 samples simulated according to the first data generating processes (DGP). The bolded numbers represent the minimum summary statistics of ASEs.
Table 1. Mean, median and variation measures of the average squared error (ASE) values derived through 1000 samples simulated according to the first data generating processes (DGP). The bolded numbers represent the minimum summary statistics of ASEs.
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
100Bayesian0.55620.53900.13010.15201.07400.96920.44510.4827
CV0.58770.51920.30170.13201.09900.99270.45250.5230
Frequency0.60980.57070.19310.15901.36801.28400.48580.5990
200Bayesian0.35710.35120.05710.07500.52330.49980.15670.1683
CV0.35770.35200.05670.07270.53550.50700.16170.1740
Frequency0.41150.39520.08650.08770.61320.59270.15330.1947
500Bayesian0.19940.19780.02550.03320.21580.21200.04150.0489
CV0.19970.19890.02530.03330.21750.21460.04110.0506
Frequency0.22980.21690.05620.04360.23320.23000.04200.0529
Table 2. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the second and third DGPs. The bolded numbers represent the minimum summary statistics of ASEs.
Table 2. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the second and third DGPs. The bolded numbers represent the minimum summary statistics of ASEs.
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
Second DGP
100Bayesian0.30820.29470.08840.11420.32960.31110.12200.1455
CV0.31880.30190.10180.12970.33800.31470.14130.1623
Frequency0.31920.30040.10220.12750.38460.36530.13610.1644
200Bayesian0.20980.20370.04920.06680.19900.19320.06060.0791
CV0.21140.20500.05200.06820.19870.19030.06080.0835
Frequency0.21160.20500.05150.06770.22280.21350.06460.0807
500Bayesian0.12770.12580.02360.03050.11000.10330.06420.0331
CV0.12820.12580.02430.03150.10680.10330.02690.0331
Frequency0.12830.12570.02470.03180.11650.11260.02780.0344
Third DGP
100Bayesian0.37510.36430.09200.11720.47150.44380.18660.2401
CV0.61320.58090.20450.24380.49310.46190.19250.2161
Frequency0.61360.57950.20210.24530.49170.46000.17970.2310
200Bayesian0.27070.26470.05570.06960.28290.26910.08700.1139
CV0.42180.40850.10690.13290.29530.28360.09740.1171
Frequency0.42260.40860.10910.13250.29170.27850.08470.1056
500Bayesian0.17270.17060.02890.03670.15330.14900.03570.0481
CV0.26190.25670.04950.06470.15500.15260.03480.0480
Frequency0.26190.25670.04950.06440.15570.15220.03550.0490
Table 3. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fourth DGP, where the bolded numbers represent the minimum summary statistics of ASEs. Note that “order” refers to the kernel function for ordered categorical variables given by (4), and “unorder” refers to the kernel function for unordered categorical variables given by (3).
Table 3. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fourth DGP, where the bolded numbers represent the minimum summary statistics of ASEs. Note that “order” refers to the kernel function for ordered categorical variables given by (4), and “unorder” refers to the kernel function for unordered categorical variables given by (3).
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
100Bayesian (order)0.50350.49250.10440.13060.62360.59030.22550.2993
Bayesian (unorder)0.51270.49950.10960.13710.63820.60030.25880.2948
CV (order)0.55350.48280.10550.13480.65530.61630.24690.3138
CV (unorder)0.63330.62320.10970.14110.79580.76600.29020.3525
Frequency0.89500.85160.25040.30711.98301.91500.61160.7890
200Bayesian (order)0.37580.36890.06150.07930.40850.39780.11280.1525
Bayesian (unorder)0.38450.37940.06190.07900.41240.39980.11340.1554
CV (order)0.38120.37550.06110.07780.42520.40980.12050.1641
CV (unorder)0.49680.49180.06470.08440.54560.53510.14970.1928
Frequency0.64380.62610.13480.17471.06601.04300.28160.3550
500Bayesian (order)0.26100.25800.03150.04200.24660.24340.05260.0726
Bayesian (unorder)0.26460.26060.03810.04410.24890.24410.06000.0734
CV (order)0.26330.25950.03220.04380.25620.25290.05630.0770
CV (unorder)0.34580.34250.03430.04550.33250.32800.06630.0885
Frequency0.42040.41460.06100.07460.48950.48830.09070.1220
1000Bayesian (order)0.19480.19470.01850.02490.17140.17150.02870.0367
Bayesian (unorder)0.19650.19580.02300.02530.17180.17170.02860.0380
CV (order)0.19680.19550.02980.02510.17310.17280.02820.0370
CV (unorder)0.25540.25570.02100.02850.23000.22890.03670.0466
Frequency0.30400.30260.03530.04860.29920.29970.04500.0573
Table 4. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fifth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
Table 4. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fifth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
50Bayesian (order)0.21340.19790.09190.12550.24100.21100.13430.1570
Bayesian (unorder)0.20900.19390.08840.12030.22910.20060.12660.1494
CV (order)0.23110.21350.09940.11700.26700.22600.16740.1780
CV (unorder)0.27850.26280.11160.14160.30230.25400.19960.2267
Frequency0.27970.26380.11300.14230.38860.35250.19820.2371
100Bayesian (order)0.13490.12820.05300.07230.13750.12280.07020.0801
Bayesian (unorder)0.13400.12720.05210.07000.13420.12160.06790.0776
CV (order)0.16050.15230.05300.06840.14800.13000.07950.0915
CV (unorder)0.17550.16760.06280.07930.16100.14120.08980.1041
Frequency0.17580.16770.06280.07940.20020.18520.08900.1069
200Bayesian (order)0.08420.08080.02830.04010.07900.07460.03320.0404
Bayesian (unorder)0.08410.08100.02820.03930.07820.07370.03280.0398
CV (order)0.11780.11510.02980.03830.08460.07860.03820.0434
CV (unorder)0.10750.10440.03480.04500.08840.08150.03900.0478
Frequency0.10770.10480.03490.04500.11550.10330.06970.0538
Table 5. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fifth DGP, where Wang and Van Ryzin’s kernel function [43] is used. The bolded numbers represent the minimum summary statistics of ASEs.
Table 5. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the fifth DGP, where Wang and Van Ryzin’s kernel function [43] is used. The bolded numbers represent the minimum summary statistics of ASEs.
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
50Bayesian0.23150.22020.08650.11530.26010.22960.14170.1660
CV0.21580.19580.09700.11720.26250.22450.16140.1715
Frequency0.23020.21320.09820.11740.39920.35190.21970.2497
100Bayesian0.16390.15540.05160.06820.14920.13220.07810.0920
CV0.14390.13690.05530.06870.14650.13090.07830.0924
Frequency0.16100.15310.05390.07010.21760.19540.11180.1215
200Bayesian0.11910.11620.02880.03830.08300.07720.03540.0429
CV0.09830.09480.03090.03850.08430.07780.03870.0437
Frequency0.11810.11510.03040.03840.12080.10930.05640.0568
Table 6. Mean, median and variation measures of the ASE values derived through 1,000 samples simulated according to the sixth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
Table 6. Mean, median and variation measures of the ASE values derived through 1,000 samples simulated according to the sixth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
100Bayesian0.38250.34640.16770.16930.35580.32330.16520.1656
CV0.41070.35670.20780.19590.44490.37330.27520.2405
Frequency0.41230.35730.20750.19520.43720.36570.26220.2264
200Bayesian0.29300.27730.08540.09540.27690.25680.09250.0950
CV0.30440.27900.10850.10640.32490.29360.14910.1396
Frequency0.30320.27860.10430.10450.32390.29390.13880.1400
500Bayesian0.23670.23090.04170.04640.22890.22160.04240.0484
CV0.23970.22980.04760.05160.25280.23900.06240.0658
Frequency0.23970.22980.04800.05200.25540.24330.06290.0684
Table 7. Summary statistics of the estimated bandwidths derived through 1000 repetitions simulated according to the seventh DGP.  
Table 7. Summary statistics of the estimated bandwidths derived through 1000 repetitions simulated according to the seventh DGP.  
nMethodBandwidthMeanMedianSDQuantile
2.5%97.5%
100Bayesian λ 1 0.12470.10950.07170.03360.3117
λ 2 0.30790.32230.07680.12550.4165
h 1 0.35930.35700.09380.19510.5529
h 2 1.76901.53021.24770.34954.2122
CV λ 1 0.06120.04490.07230.00000.2403
λ 2 0.38100.50000.16020.00400.5000
h 1 0.36540.37960.10940.11960.5472
h 2 6.53 × 10 6 1.41 × 10 6 1.14 × 10 7 0.38293.65 × 10 7
250Bayesian λ 1 0.06760.06140.03020.02650.1449
λ 2 0.32910.34660.07620.15240.4300
h 1 0.31530.31810.06060.19320.4419
h 2 2.23482.14921.11060.50454.5167
CV λ 1 0.03020.02900.02350.00000.0839
λ 2 0.39660.50000.14140.05730.5000
h 1 0.32090.32890.06820.16140.4385
h 2 4.29 × 10 6 1 . 45 × 10 6 7 . 36 × 10 6 0.52362.38 × 10 7
Table 8. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the sixth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
Table 8. Mean, median and variation measures of the ASE values derived through 1000 samples simulated according to the sixth DGP. The bolded numbers represent the minimum summary statistics of ASEs.  
nMethodIn-Sample ASEOut-of-Sample ASE
MeanMedianSDIQRMeanMedianSDIQR
100Bayesian0.14920.13090.08790.09080.12910.10680.10170.0922
CV0.15090.12130.10810.10290.13040.10170.10570.0996
250Bayesian0.06940.06300.04010.03800.05450.04810.04450.0329
CV0.06670.05900.03460.03860.05150.04580.02750.0328
Table 9. Mean, median and variation measures of the in-sample integrated squared errors (ISE) values derived through 1000 repetitions for all seven DGPs, where the bandwidths of the kernel error density estimator were chosen through Bayesian sampling and two-stage cross-validation (CV). The bolded numbers represent the minimum summary statistics of ISEs.  
Table 9. Mean, median and variation measures of the in-sample integrated squared errors (ISE) values derived through 1000 repetitions for all seven DGPs, where the bandwidths of the kernel error density estimator were chosen through Bayesian sampling and two-stage cross-validation (CV). The bolded numbers represent the minimum summary statistics of ISEs.  
DGPnBayesianTwo-Stage CV
MeanMedianSDIQRMeanMedianSDIQR
1000.00850.00550.00850.00710.02410.00900.04210.0219
12000.00390.00300.00310.00310.00470.00280.00570.0041
5000.00150.00120.00120.00120.00180.00150.00120.0012
1000.00990.00560.02950.00730.01650.00670.03470.0107
22000.00410.00290.00370.00310.00470.00280.00590.0032
5000.00200.00140.00710.00110.00330.00130.03430.0011
1000.01020.00590.01610.00740.02200.00860.04490.0163
32000.00430.00300.00580.00330.00620.00360.00860.0047
5000.00170.00140.00140.00120.00190.00140.00170.0014
1000.01990.01070.03050.01610.04680.01810.12080.0394
42000.00650.00400.00920.00440.00720.00460.00900.0062
5000.00230.00170.00200.00160.00240.00180.00190.0019
10000.00130.00110.00100.00090.00180.00130.00560.0012
500.01010.00680.00960.00800.01560.01010.02620.0111
51000.00560.00400.00510.00410.00820.00640.00810.0059
2000.00300.00250.00220.00210.00480.00410.00280.0032
1000.09400.09380.01640.02070.11380.11650.01570.0173
62000.08940.08990.01110.01470.10550.10680.01070.0129
5000.08450.08460.00680.00910.09660.09720.00720.0093
71000.01680.00730.06870.01210.03110.00540.25990.0096
2500.00270.00220.00200.00240.00310.00200.00410.0025
Table 10. Mean, median and variation measures of the out-of-sample ISE values derived through 1000 repetitions for all seven DGPs, where the bandwidths of the kernel error density estimator were chosen through Bayesian sampling and two-stage CV. The bolded numbers represent the minimum summary statistics of ISEs.
Table 10. Mean, median and variation measures of the out-of-sample ISE values derived through 1000 repetitions for all seven DGPs, where the bandwidths of the kernel error density estimator were chosen through Bayesian sampling and two-stage CV. The bolded numbers represent the minimum summary statistics of ISEs.
DGP n BayesianTwo-Stage CV
MeanMedianSDIQRMeanMedianSDIQR
1000.00130.00090.00130.00130.00120.00080.00130.0011
12000.00070.00050.00060.00060.00070.00050.00070.0006
5000.00040.00030.00030.00040.00060.00050.00040.0005
1000.00210.00180.00150.00180.00230.00170.00210.0017
22000.00120.00100.00090.00100.00120.00100.00090.0010
5000.00060.00050.00040.00050.00060.00050.00040.0005
1000.00170.00120.00210.00130.00210.00180.00150.0016
32000.00080.00070.00070.00070.00130.00120.00090.0010
5000.00040.00030.00030.00030.00080.00080.00040.0005
1000.00110.00080.00090.00090.00120.00090.00110.0010
42000.00060.00050.00040.00050.00070.00060.00040.0005
5000.00030.00030.00020.00020.00040.00040.00020.0003
10000.00020.00020.00010.00020.00030.00030.00020.0002
500.00400.00300.00320.00300.00380.00290.00410.0028
51000.00230.00200.00160.00190.00230.00190.00180.0018
2000.00140.00120.00090.00100.00140.00120.00100.0009
1000.09140.08960.02250.02980.10850.10750.02530.0315
62000.08920.08790.01650.02150.10310.10260.01850.0253
5000.08860.08850.01050.01370.09910.09890.01150.0155
71000.05990.05940.01600.02200.06270.06240.01610.0222
2500.05880.05840.01080.01480.06030.06010.01080.0143
Table 11. Arithmetic mean, 95% Bayesian credible interval, standard deviation, batch-mean standard deviation and simulation inefficiency factor (SIF) of each simulated chain obtained under different choices of priors for the first DGP with a sample size of 500.  
Table 11. Arithmetic mean, 95% Bayesian credible interval, standard deviation, batch-mean standard deviation and simulation inefficiency factor (SIF) of each simulated chain obtained under different choices of priors for the first DGP with a sample size of 500.  
PriorParameterMean95% BayesianStandardBatch–meanSIF
Credible IntervalDeviationStandard dev.
IG(1, 0.05) λ 1 0.0295(0.0046, 0.0575)0.01290.000726.32
λ 2 0.0205(0.0007, 0.0428)0.01170.000732.49
λ 3 0.0245(0.0018, 0.0518)0.01340.000833.59
λ 4 0.0318(0.0040, 0.0595)0.01290.000838.90
h0.1349(0.1135, 0.1576)0.01200.000413.18
b0.2685(0.1543, 0.3970)0.06210.00134.23
IG(5, 0.25) λ 1 0.0267(0.0015, 0.0555)0.01350.000836.30
λ 2 0.0216(0.0021, 0.0469)0.01150.000736.89
λ 3 0.0244(0.0020, 0.0522)0.01320.000836.01
λ 4 0.0342(0.0080, 0.0618)0.01350.000727.50
h0.1471(0.1263, 0.1739)0.01240.000410.59
b0.2572(0.1742, 0.3546)0.04810.00126.52
Cauchy(0, 1) λ 1 0.0277(0.0058, 0.0527)0.01240.000846.30
λ 2 0.0210(0.0016, 0.0457)0.01180.000846.55
λ 3 0.0226(0.0011, 0.0479)0.01270.000838.07
λ 4 0.0321(0.0058, 0.0557)0.01330.000834.85
h0.1338(0.1093, 0.1608)0.01300.000411.20
b0.3000(0.1651, 0.4301)0.06610.00155.34
Log N(0,1) λ 1 0.0268(0.0006, 0.0528)0.01230.000728.91
λ 2 0.0204(0.0028, 0.0455)0.01110.000738.04
λ 3 0.0229(0.0012, 0.0503)0.01250.000517.91
λ 4 0.0332(0.0065, 0.0614)0.01340.000622.93
h0.1415(0.1182, 0.1709)0.01350.000512.33
b0.3392(0.2241, 0.4623)0.05880.00135.21
Table 12. Estimated bandwidths for the regressors in the Nadaraya-Watson (NW) estimator and the kernel–form error density.  
Table 12. Estimated bandwidths for the regressors in the Nadaraya-Watson (NW) estimator and the kernel–form error density.  
BandwidthParameterMean95% BayesianStandardBatch-MeanSIF
SelectorCredible Interval Deviation Standard Error
Bayesian h S & P 500 0.6816(0.5850, 0.7887)0.00160.05339.1
λ FTSE 0.2630(0.1221, 0.4076)0.00330.072420.8
b0.4932(0.4375, 0.5517)0.00080.02976.5
Two-stage h S & P 500 0.3354
CV λ FTSE 0.8249
b0.3181

Share and Cite

MDPI and ACS Style

Zhang, X.; King, M.L.; Shang, H.L. Bayesian Bandwidth Selection for a Nonparametric Regression Model with Mixed Types of Regressors. Econometrics 2016, 4, 24. https://doi.org/10.3390/econometrics4020024

AMA Style

Zhang X, King ML, Shang HL. Bayesian Bandwidth Selection for a Nonparametric Regression Model with Mixed Types of Regressors. Econometrics. 2016; 4(2):24. https://doi.org/10.3390/econometrics4020024

Chicago/Turabian Style

Zhang, Xibin, Maxwell L. King, and Han Lin Shang. 2016. "Bayesian Bandwidth Selection for a Nonparametric Regression Model with Mixed Types of Regressors" Econometrics 4, no. 2: 24. https://doi.org/10.3390/econometrics4020024

APA Style

Zhang, X., King, M. L., & Shang, H. L. (2016). Bayesian Bandwidth Selection for a Nonparametric Regression Model with Mixed Types of Regressors. Econometrics, 4(2), 24. https://doi.org/10.3390/econometrics4020024

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop