**3. Materials and methods**

The data employs quarterly data in all the variables and was sourced from the South African Reserve Bank (SARB). The variables studied are foreign direct investment, exchange rate (EXRATE) and crude oil price (OIL). FDI was used as a dependent variable, while EXRATE and OIL were used as independent variables. Monthly data on these commodities'spot prices cover a 5-year period, from January 2008 to January 2017. E-Views 8 software was used to run the specified models. The table below shows the descriptive statistics of the data (**Table 1**).

The augmented Dickey-Fuller (ADF) test was used to test for a unit root (nonstationary) in the series and to determine the order of integration in the variables. The optimal lag length which removes serial correlation in the residuals as well as determines the deterministic trend for the vector autoregression (VAR) model was determined in order to apply the Johansen test for cointegration analysis. The Johansen test has two likelihood ratio tests of significance, trace test and maximum eigenvalue test. For choosing the lag order for the VAR, the lag selection criteria approach was applied. The vector error correction model approach was used to evaluate the short-term properties of the time series. Adequacy of the model was tested by performing diagnostic and stability tests.

The coefficients obtained from the estimation of the VAR model may not be proper to interpret directly. Hence, both impulse response functions and the variance decomposition were used. Impulse response functions are used to trace out the dynamic interaction among variables. It shows the dynamic response of all the variables in the system to a shock or innovation in each variable. In other words, it focuses more on the increase or decrease in trend rather than the actual value of the variable. On the other hand, variance decomposition is used to detect the causal relationships among the variables. It shows the extent to which a variable is explained by the innovations or shocks in all the variables in the system.


**Table 1.** *Descriptive statistics.*
