经济时间序列问题matlab or Stata 案例Report code实现:Eco
当前位置:以往案例 > >经济时间序列问题matlab or Stata 案例Report code实现:Eco
2018-06-10

Economics 384


Time Series Econometrics





Write a Stata or Matlab code for each of the following parts.


1. Generate …ve di¤erent stationary autoregressive processes of order 1. Consider a sample of 300 observations. For each of them, choose a random normal initial condition with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 3. Plot the corresponding autocorrelation functions and show that they rapidly decay to zero.


2. Generate a random walk with drift. Consider a sample of 300 observations. Choose a random normal initial condition with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 3. Plot the corresponding autocorrelation function and show that the rate of decay to zero is very low. In theory, the autocorrelation function should not decay to zero at all.


3. Consider …ve di¤erent stationary autoregressive processes of order 1 without drift. For each of them, choose a random normal initial condition with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 1. Choose the following values for the slope parameter : 0:15, 0:25, 0:33, 0:42, and 0:76. Generate each process 10; 000 times, using a sample of 200 observations. At each replication, run a standard Dickey-Fuller test on the generated time series and collect the corresponding DF test statistic. In other words, at each replication, run the test regression

image.png


and collect the value of the Dickey-Fuller test statistic

image.png


For each model, plot the histogram representing the distribution of the DF test sta-tistic. Compute the corresponding mean, variance, skewness, and kurtosis.


Consider a random walk without drift. Choose a random normal initial condition with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 1. Generate each model 10; 000 times, using a sample of 200 observations. At each replication, run a standard Dickey-Fuller test on the generated time series and collect the corresponding DF test statistic. In other words, at each replication, run the test regression

image.png


and collect the value of the Dickey-Fuller test statistic

image.png






Plot the histogram representing the distribution of the DF test statistic. Compute the corresponding mean, variance, skewness, and kurtosis.


4. Consider a stationary autoregressive process of order 3. Feel free to choose the coe¢ – cient values, but make sure that the roots of the corresponding characteristic equation all lie outside the unit circle to ensure stationarity of the process. Consider a sample of 300 observations. Choose random normal initial conditions with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 3. Generate the process 10; 000 times. Each time, estimate the values of the autocorre-lation function and the partial autocorrelation function up to lag 16. Compute the means of each autocorrelation coe¢ cient and each partial autocorrelation coe¢ cient over the 10; 000 replications. Plot these means in two graphs as functions of the lag.


5. Consider a moving average process of order 5. Feel free to choose the coe¢ cient val-ues, but make sure that the roots of the corresponding characteristic equation all lie outside the unit circle to ensure invertibility of the process. Consider a sample of 300 observations. Choose random normal initial conditions with mean zero and variance equal to 3. Use normal innovations with mean zero and variance equal to 3. Gener-ate the process 10; 000 times. Each time, estimate the values of the autocorrelation function and the partial autocorrelation function up to lag 16. Compute the means of each autocorrelation coe¢ cient and each partial autocorrelation coe¢ cient over the 10; 000 replications. Plot these means in two graphs as functions of the lag.


6. Generate a stationary time series following the process


image.png


Choose a random normal initial condition with mean zero and variance equal to 1. Use normal innovations with mean zero and variance equal to 2:5. Consider a sample of 25 observations. Run a standard Dickey-Fuller test on the generated time series and collect the corresponding DF test statistic. In other words, run the test regression


image.png


and the Dickey-Fuller test statistic

image.png


Compare the value of the test statistic with the appropriate tabulated critical values (1% : 2:66, 5% : 1:95, 10% : 1:60). Repeat the exercise with a sample of 10; 000 observations. Compare the two cases.


7. Consider a sample of 30 observations, a stationary autoregressive process of order 1 without drift (yt) and a random walk without drift (xt). Choose independent random normal initial conditions with mean zero and variance equal to 1 for the two processes. Use independent normal innovations with mean zero and variance equal to 1 for the two processes. Generate the corresponding two time series and estimate the model

image.png


Report the values of the estimated coe¢ cients, the corresponding t statistics (for a test of statistical signi…cance), and the coe¢ cient of determination of the regression. Plot the autocorrelation function of the residuals. Repeat the exercise with a sample of 2; 000; 000 observations. Compare the two cases.


8. Consider a sample of 1; 000; 000 observations and two independent random walks with drift (yt and xt). Choose independent random normal initial conditions with mean zero and variance equal to 1 for the two processes. Use independent normal innovations with mean zero and variance equal to 1 for the two processes. Set the values of the drifts to 0:5 and 0:25, respectively. Generate the corresponding two time series and estimate the model

image.png


Report the values of the estimated coe¢ cients, the corresponding t statistics (for a test of statistical signi…cance), and the coe¢ cient of determination of the regression. Plot the autocorrelation function of the residuals.


在线提交订单