The Impact of Thailand ʹ s Openness on Bilateral Trade between Thailand and Japan: Copula ‐ Based Markov Switching Seemingly Unrelated Regression Model

: The purpose of this paper is to analyze the impact of trade openness and the factors based on the gravity model on the bilateral trade flows between Thailand and Japan. The factors consist of GDP, distance, trade openness, and exchange rate. Bilateral trade is composed of two flows: Thailand’s export flow to Japan, and Thailand’s import flow from Japan. The specified gravity equations are estimated by Copula ‐ based Markov switching seemingly unrelated regression approach. The best ‐ fitting model is chosen based on the lowest Akaike information criterion (AIC) and Bayesian information criterion (BIC). The Normal and Student ʹ s t distributions are for Thailand’s export equation and Thailand’s import equation, respectively. The Student ʹ s t copula is applied for joint distribution. Analyzing the bilateral trade flow is separated into two situations, namely the high and the low growth markets. Empirical results show that distance provides a positive effect on the export in a high growth regime, but a negative impact on the export in a low growth regime. As for Thailand’s import flow, all variables, but especially trade openness, provide strong evidence supporting significance for both regimes. For the GDPs of both Thailand and Japan, trade openness and the exchange rate increase import flow in a high growth market. Meanwhile, the exchange rate decreases import flow in a low growth market. The Markov Switching Probability Estimation notes that Thailand’s trading with Japan is mostly in the fast ‐ growing market.


Introduction
International trade in recent years has become one of the most important factors in developing Thailand's economy. Thailand's exports of goods and services in 2016 accounted for 68.40% of GDP and its imports accounted for 53.62% according to World Bank statistics (World Bank data). From an economic perspective, international trade plays a crucial role in improving the economy of a country. It is stated that the export-led growth (ELG) hypothesis has been largely used in economic explanations by focusing on exports. This is because export expansion leads to a better allocation of scarce resources and generation of economies of scale, while significantly contributing to economic growth. Moreover, foreign currencies from trade provide a number of advantages. For example, more currencies can be converted into capital to invest in machineries with more advanced technology, Anderson and Van Wincoop 2003;Al-Majali and Adayleh 2018) have argued that distance is the friction of trade flows in the gravity model.
Moreover, international trade can be affected by many factors, such as trade-partner demand and supply, laissez-faire policy, the difference in technology, the distance between borders, diplomatic relationship, shared history and culture, and more. Some authors have extended the gravity model by considering other variables, such as exchange rate and infrastructure availability. For example, McKenzie (1998) investigated the impact of exchange-rate volatility on export growth. His empirical results showed that exchange-rate fluctuations could affect trade in either a positive or a negative direction. Baharumshah (2001) investigated the effect of the exchange rate on the bilateral trade balance of Malaysia and Thailand with the US and Japan and found that the real effective exchange rate (REER) is significant in the trade balance equation. In the long run, REER increases the trade balances of both trading partners. Some studies, however, reported no significance regarding the correlation between the exchange rate and export volume (Bahmani-Oskooee and Payestech 1993;Hooper and Kohlhagen 1978). Senadza and Diaba (2017) have found that the exchange rate adversely affects exports in the short run, but found a positive relationship between them in the long run. Nevertheless, there is no significant impact of exchange rate volatility on imports.
The Copula-based Markov switching seemingly unrelated regression (MS-SUR) model is used to estimate bilateral trade between two countries with the gravity model. Conventionally, the errors of the SUR model are assumed to be normal distribution in all equations, which is a strong assumption. Boonyakunakorn et al. (2017) also allow the errors of the gravity trade model to have different distributions by using the copula model. Moreover, with the copula function, a multivariate distribution function can be decomposed into marginal distributions of each random variable and link each marginal distribution. The major advantage of copula is that marginal distribution functions can have different distributions. Finally, we extend SUR to be able to capture the dynamic change in the time series by using Markov switching (MS) since international trade mostly displays a different degree of dependence over time. In this study, we aim to focus further on the understanding of the effects of the trade openness on trade flow. We employ Japan as our case study since Japan is one of Thailand's most crucial economic partners in terms of both trade and investment. The paper consists of five sections. Section 2 outlines methodology. Section 3 discusses data. Section 4 presents unit root test and estimation, and the last section concludes.

Methodology
The factors in this study are GDP, distance, trade openness, and exchange rate. Bilateral trade flows include Thailand's export flows to Japan and Thailand's import flows from Japan.

The Gravity Model
The general form of linear gravity equation for international trade (Tinbergen, 1962) is written by: (1) where is bilateral goods trade flows that are exported and imported between origin and destination .
is the constant and does not depend on origin or destination . is the natural log of the relevant gross domestic product of home country .
is the natural log of the gross domestic product of destination .
is the distance between the capitals of the two countries.
The gravity equation specification of this work takes the form: and , , , where and denote Thailand and Japan, respectively, 1, … , , and are constant terms, , … , and , … , are coefficients, , and , are error terms, , represents the natural log of Thailand's export value to Japan at time , and , represents the natural log of the value of Thailand's imports from Japan at time .
The explanatory variables include:  , and , are the growth of the gross domestic products of Thailand and Japan at time , which represents the economic sizes of Thailand and Japan;  , is the gross domestic product weighted distance between Bangkok, Thailand and Tokyo, Japan.
, is calculated by:  , and , are the level of trade openness of Thailand and Japan at time . Trade openness in this paper is defined as the sum of exports and imports divided by GDP (Harrison 1996;Al-Majali and Adayleh 2018), which can be seen as the following: Total trade openness is the indicator that better represents trade policies and trade relationships (Al-Majali and Adayleh, 2018).  , is the exchange rate between the currency of Thailand (Thai Baht) and Japan (Japanese Yen) at time t. Zellner (1962) introduced the SUR model, which is useful in the study of a broad range of problems. The linear SUR model provides a more efficient parameter than the linear regression by involving a set of observations with cross-equation parameter restrictions and comparing correlated error terms with differing distributions (Zellner and Tomohiro, 2010). The linear SUR equation is:

Seemingly Unrelated Regression (SUR) Model
where 1, … , , 1, … , , is the dependent variable, , is the explanatory variables, , is the coefficient, and , is the error term which denotes normal distribution with zero mean, variance , and variance-covariance matrix Ω. If there are two equations, the linear SUR equations are: and , , , , The variance-covariance matrix is: where Σ , 1, and 2.

Markov Switching Model with Seemingly Unrelated Regression (MS-SUR) Model
From Equations (5) and (6), Markov switching with seemingly unrelated regression equation for the two equations can be written as: and , , where is the unobserved state variable with regimes which follow the first-order Markov process. , is the error term with 2 regimes. The structure of the error term is: The maximum likelihood approach is used to estimate Markov switching with seemingly unrelated regression functions. Suppose is known. Thus, the log-likelihood of Markov switching with seemingly unrelated regression for 2 regimes takes the form: where 1,2 which is the number of the equation. Suppose is unknown. Thus, the loglikelihood of Markov switching with seemingly unrelated regression for 2 regimes takes the form: where Θ , , ∑ in each state, and the likelihood function is weighted by the probabilities of the state. • is a density function corresponding to error assumption. However, the probabilities of the state are unknown. Assessing filter probabilities of each state Pr ℎ is given by Hamilton's filter. Perlin (2015) provided the filter and the smoothing algorithm to calculate the filtered probabilities, which are based on the available data set. The steps for the forward filtering algorithm are as follows: 1. Assume the initial value of transition probabilities . This probability refers to the switching probabilities from regime to regime . The transition probabilities can be written by: where ∑ 1 by , 1, … , ℎ. The transition probabilities in the transition matrix take the form: 2. Update the transition probability in order to compute the likelihood equation in each state | , based on not only previous information, but also on all the parameters which are in the equation consisting of Θ and . The form of the updated probability for each state is: where is the available information at time in the matrix form.

Copula Model
The Copula model is widely used to explain the dependence structure between the variables. Therefore, to allow the marginal distribution functions to have different forms (Sklar, 1973), we apply the copula to a joint distribution of random variables. Joint distribution with d-dimension ( ) of a random variable ( ) is derived by decomposing into marginal distribution and d-copula , as follows: , … , , … , Equation (16) is the multivariate distribution function. The marginal distributions are continuous. In general, the models of the marginal distribution and the joint dependence have separate forms. Thus, copula function takes the form: where is the uniform distribution with range [0,1]. The D-dimension derives form a density copula as follows: The copula families that are used in this paper are Elliptical and Archimedean. The dependency of symmetry on both the left and right tails is captured by the Elliptical copula family. The Archimedean copula family can capture only one tail dependence. The Elliptical copula family includes the "Normal copula and the Studentʹs t copula". The Archimedean copula family includes "Gumbel, Clayton, Joe, and Frank". Hence, this paper uses five copulas, which are two elliptical families (Normal copula and Studentʹs t copula), and three Archimedean families (Clayton, Gumbel, and Joe).

Copula-Based Markov Switching Seemingly Unrelated Regression (MS-SUR) Model
The Copula-based Markov switching seemingly unrelated regression model allows the residuals of any equations to have different distributions (Pastpipatkul et al. 2016;Boonyakunakorn et al. 2017). The gravity of Thailand's export equation (2) and the gravity of Thailand's import equation (3) with 2 regimes can be written as: Using the chain rule to construct the copula-based MS-SUR likelihood: , Assume that and are the marginal distributions, which are either Normal distribution nor Student-t distribution for = 1,2. It is transformed into uniform distribution (0, 1) from Thailand's export and Thailand's import variables. and are the margins of Thailand's export and import variables, while the density function is , of Gaussian, Student-t, Clayton, Gumbel, and Joe for the link between Thailand's export and import equations. The logarithm is used to transform equation (23). The likelihood in Equation (23) is multiplied with the likelihood in Equation (14) in order to have the full likelihood function of the MR-SUR model-based copula. Thus, the log-likelihood function is: where | , Θ is the joint density between equation (23) and Pr φ , which is defined as the probability of filter which comes from Equation (13), and Θ is defined as the parameters from the copula-based MS-SUR model.

Data
The datasets of Thailand and Japan from 1989 to 2017 are on a quarterly basis. Thailand's exports to Japan and Thailand's imports from Japan were collected from the World Integrated Trade Solution (WITS) database. The explanatory variables are GDP, distance, level of trade openness, and exchange rate. The GDP, total import, and total export were obtained from the World Bank database. Distance between Thailand and Japan was measured using Google Maps. Finally, the exchange rate was obtained from the Bank of Thailand (BOT).

Stationary Process
An augmented Dickey-Fuller (ADF) test and Phillips-Perron (PP) test were used to test the unit root in the stationary process. The null hypothesis of the ADF and PP tests is that the time-series is stationary and has a unit root. Table 1 shows the unit root test results of the ADF and PP test statistics at the level and 1st difference. Wasserstein and Lazar (2016) from the American Statistical Association (ASA) demonstrated that p-value does not provide a good measurement in statistic testing. As a consequence, this study presents the Bayes factor as an alternative approach for testing accurate null hypotheses. Overall, the Bayes factor provides some evidence to support that all variables are stationary at the first difference. Note that *** denotes the Augmented Dickey-Fuller test statistic and the Phillips-Perron test statistic significant at 1 level %. p-value is in the (.) and [.] is the Bayes factor computed by exp(1) log p p  for 1/ exp(1) p  (Sellke et al. 2001). The Bayes factor contributes to supporting the level of evidence in which BF < 1 into levels of evidence against. Strength of evidence against includes weak (1-0.333), moderate (0.333-0.1), substantial (0.1-0.033), strong (0.033-0.01), very strong (0.01-0.003), and decisive (<0.003) (Held and Ott, 2016).  Table 2 shows the selecting of the best model for MS-SUR model from the lowest Akaike information criterion (AIC) and Bayesian information criterion (BIC). Hence, the best-fitting model is model 6, obtaining Normal and Student-t distributions for Thailand's export and import equations, respectively, and the student-t copula for joint distribution. Table 3 shows the estimated results of Thailand's exports to Japan in regime 1, which is defined as a high growth market, and regime 2, which is defined as a low growth market. For Thailand's export equation in the high growth market (regime 1), the Thai GDP and Japanese GDP positively affect Thai exports to Japan. The result was according to expectation. The coefficients of the Thai GDP and Japanese GDP are 0.512 and 0.470, respectively. This means that a 1% increase in the Thai GDP and Japanese GDP would lead to an increase in Thailand's exports of 0.512% and 0.470%, respectively. In a low growth market, the Thai GDP and Japanese GDP also positively affect Thai exports to Japan. This means that should the Thai GDP and the Japanese GDP increase by 1%, Thai exports to Japan will increase at 0.527% of Thailand's GDP and 0.029% of Japanʹs GDP. This implies that in a high growth regime, the Thai GDP has more influence on Thai exports than in a low one. Meanwhile, the effect of Japan's GDP on exports in a high growth regime is much lower than in a low growth regime. Thus, this indicates that the amount of Thailand's exports to Japan mainly depends on Japan's economic condition. As Japan's GDP increases, the demand for goods increases, which in turn leads to a rise in the export demand. This result is compatible with the works of Tinbergen (1962) and Anderson and Van Wincoop (2003).  (Held and Ott, 2016).
The distance variable shows a positive and significant estimate in a high growth market. The coefficient for distance is 0.003, thus a 1% increase in distance causes a 0.003% increase in Thailand's exports. On the other hand, a low growth market shows that distance negatively affects exports, with a -0.007 coefficient.
The results from both regimes provide a small value for the coefficients. Hence, it can be concluded that the distance variable has little effect on Thailand's exports, in line with the work of Strømman and Duchin (2006). They reported that the cost of distance has little impact on a regionʹs total imports or exports of a given commodity. In a fast-growing market, a country's exports slightly concern the distance. Thailand still exports more even though the cost of distance increases, while a slow-growing market provides a small decrease in Thailandʹs exports.
The results for trade openness provide a positive impact on Thailand's exports in both high and low growth markets. The coefficients of trade openness are 2.233 and 3.649 for Thailand and Japan respectively. It can be seen that trade openness provides the benefits of trade, especially in a slowgrowth market. Gulzar (2016) demonstrated that trade openness plays a crucial role in bilateral trade. For the exchange rate, the result was found positive and significant in a high growth market, with a coefficient of 0.342. A 1% increase in the exchange rate would correspond to a 0.342% rise of Thailand's exports. By contrast, the result shows a negative effect and significance, with a coefficient of −0.324 in a low growth market. Table 4 shows the estimated result of Thailand's import equation in regime 1 referring to a high growth market, with regime 2 representing the low growth market. For Thailand's import equation in a high growth market, the Japanese GDP and Thai GDP positively affect Thai imports from Japan. The coefficient for the Japanese GDP and Thai GDP are 0.409 and 0.231, respectively. In a low growth market, the Thai GDP and Japanese GDP also positively affect Thai imports from Japan, with coefficients of 0.259 and 0.149, respectively. Since imports always depend on income level, as an increase in domestic income level accelerates the demand for imports (Aqeel and Butt, 2001), the empirical finding seems to go in the direction of the recent work of Martínez-Zarzoso and Nowak 2003;Simwaka 2006;Achay 2006; and Arabi and Ibrahim 2012, which found a positive impact of GDP on the volume of trade. The distance variable shows a positive and significant estimate in a high growth market, where the coefficient for distance is −0.029. On the other hand, in a low growth market, the distance variable positively affects imports, with a coefficient of 0.100. The result of trade openness provides strong and significant positive effects on Thailand's imports in both high and low growth markets. The coefficients for trade openness are 1.048 and 1.808. These results confirm the advantage of the Thailand-Japan free trade agreement for Thailand's imports from Japan. The result for the exchange rate shows positive and significant attributes in a high growth market, with a coefficient of 0.191. However, the result shows a negative effect and significance, with a coefficient of −0.183 in a low growth market. Note that B factor is Bayes factor which BF < 1 into levels of evidence against. Table 5 shows the probability of being in regime 1 and regime 2, which is 0.999 and 0.599, respectively. We can conclude that trade between Thailand and Japan takes place mainly in a high growth economy. As can be seen, in the period of this study Thailand's trade with Japan ranked as the second-largest exporter and the third-largest importer in 2018.

Conclusions
This empirical study examines the impact of trade openness and the factors based on the gravity model on bilateral trade flows between Thailand and Japan from 1989 through 2017 by using the Copula-based Markov switching seemingly unrelated regression approach. The best-fitting model is chosen by the lowest AIC and BIC, which provides the Normal and Student-t distribution for Thailand's export equation and Thailand's import equation, respectively. The Studentʹs t copula is applied for joint distribution. There are two regimes applied in this study, namely a high growth market and a low growth market.
From the estimation of Thailand's exports in the high growth market, all variables provide a positive relationship with Thailand's exports to Japan. In a low growth market, Thailand's exports are negatively affected by distance and exchange rates. However, only distance offers strong evidence in support of significance for both regimes. For the import equation in a high growth market, all variables except for distance have a positive relationship with Thailand's imports. In a low growth market, only the exchange rate presents negative effects on imports. On the other hand, other variables provide a positive influence. Furthermore, the results for both high and low regimes provide strongly supporting significance, especially the trade openness variable. The Markov switching probability estimation notes that Thailand's trading with Japan mostly takes place in the fast-growing regime. The result suggests that the Thai government should support trade openness and promote economic growth, which enhances trade flows in a high growth market. Additionally, the government should encourage the ability of trading in the slow-growing market as well.