You are on page 1of 5

# Economic Data Analysis

Exercise 1: Regression with Time Series Data using Microfit
Microfit Software This assignment aims to familiarise you with basic elements of Microfit, a user-friendly but powerful software package designed for the analysis of time series data. Manuals and software may be purchased from Timberlake Consultants http://www.timberlake.co.uk/software/softhome.html but since the program is available on any University-networked machine (via the Novell Network Application Launcher) and there are multiple copies of the manual in the Hallward library, purchase is not necessary. The manual contains many useful examples/explanations/tutorials and is extremely well-presented. However, the programme has a very extensive help menu which is simple to use and sufficient for most users, so you may not even need to consult the manual when conducting your statistical analysis. The software can be accessed from the NAL. Log on to Novell, double click on the nal icon, and navigate through School and Departmental, followed by Economics, and then double click on the Microfit 4.1 XP icon. Today’s Exercise This class makes use of real GDP data to examine the behaviour of economic growth through time. In particular, we will construct growth rate series using GDP data, and estimate some simple time series regressions to examine the average growth rate of US real GDP, and also the cross-country relationship between Canadian and US growth. The data we will use is contained in an Excel file on WebCT and the module homepage, entitled GDP.xls. Save this file to your userspace and open the file in Excel. The two series are data on real GDP (i.e. nominal GDP deflated by prices 1 ) for the US and Canada, observed quarterly over the period 1973-2007 inclusive. Transferring the Data to Microfit In Excel, highlight the data (not the dates or the series labels), then click on Copy. Now in Microfit, go to the Edit menu and click on Paste Data. You now need to enter the frequency, dates and number of variables in the dataset you are about to paste in, so click on Quarterly, enter the date range (1973Q1 to 2007Q4), and set the number of variables to 2. Then click on OK. On the next screen, select the Data only options and click OK. Then type in variable names for the two series (USGDP and CAGDP), plus descriptions of the series if you wish, before clicking GO twice. You should then see the data in Microfit and all the buttons at the top of the screen should be available. This screen presents data on all the variables currently loaded into Microfit, and as we create
‘Deflating’ time series data is commonplace because it allows us to evaluate monetary changes over time in real terms (i.e. at constant prices). Although a wide number of deflators are widely available, you may need to construct you own from an appropriate measure of inflation. To find out more about deflators, go to http://www.hm-treasury.gov.uk/data_gdp_index.htm
1

1

In the Command Editor the growth rate series can be created as follows: USGRW = LUSGDP – LUSGDP(–1) GO Plot the growth rate series and observe its behaviour over time. since this can linearise the time series. transformation of existing variables. and also gives you the opportunity to get familiar with its important characteristics. type: PLOT USGDP GO A time series plot is generated. The Variables button provides a quick link to a list of the series in the dataset. In the Command Editor. you are not going to be to develop a particularly good model of them. features that we will want to model in due course.g. showing that we have 140 observations. (ii) take logs and plot the logged data. Here. but the different commands must be separated by a semi-colon. 2 2 . If you do not known what the features of your data are. for example. along with their descriptions.g. create a new variable LUSGDP by typing: LUSGDP = LOG(USGDP) GO View this new series in the dataset by clicking on Data. showing the historical behaviour of the series.e. To plot the US real GDP series. Commands are executed by typing in the Command Editor window and then clicking Go. linearise relationships between different series. growth rates). The current sample is given at the top. It is vital to check your data is what you think it is. creation of new variables. then return to the Command Editor by clicking on Process and plot the log of US real GDP: PLOT LUSGDP GO The growth of US real GDP can now be constructed by taking first differences of the log real GDP series. Viewing and Transforming the Data Click on the Process button. and (iii) create and examine the growth rate series. the decimal place has been placed correctly!).transformations of these variables (e. you can execute a number of commands which allow. 2 Macro-economic time series such as real GDP are usually analysed in log form. Whenever you enter data (especially if you have typed it in) always check it carefully and plot it to ensure that it looks sensible and that obvious errors are not present (e. Multiple commands can be typed before clicking on Go. which always takes you to the Command Editor area of Microfit. i. Now take natural logs of the US real GDP series. (i) plot the raw series. and plots. We can also obtain summary statistics for this series by using the COR command in the Command Editor: COR USGRW GO Now repeat the above analysis for the Canadian real GDP data. they will also appear here. This database area can be returned to at any time by clicking on the Data button at the top of the screen. and can provide useful interpretations in terms of elasticity and growth rates.

Note that when you do this you are asked to specify the number of observations for Chow’s (predictive failure) test of parameter stability. 3 3 . type: PLOT USGRW GO Now click on the second icon: Image to file and give the file a name. To save as text. e. Word. the text in the results window can be copied to the clipboard and pasted into a Word document directly. You can then view these two deterministic variables in the dataset. Alternatively. again start with the relevant graph on the screen. First we need to create a constant and time trend variable. choosing either the bitmap format (. first start with the desired results window open on the screen. click on File then Save As… in the usual way.g. Estimation by ordinary least squares can then be done by clicking on Single to enter the single equation estimation part of Microfit. The file that is created is a simple text file so can be opened in Word and copied/edited.fit file which can subsequently be reopened in Microfit. and then interpreting the coefficient on the time trend variable. Estimating Regression Equations We shall first consider how we can use a very simple regression equation to measure the underlying growth in US real GDP. go to the Command Editor and type: LIST GO The data is displayed as a results file which can then be either saved as a text/output file or copied and pasted into a Word document. Either of these formats can be imported into Word as a picture. To save graphs. e.e. Data and Graphs The dataset and output (results and graphs) produced by Microfit can be saved and then imported into other software. For example.wmf extension). We can do this by regressing the US real GDP series in logs on a constant and a time trend. Label the constant C and the time trend T. to save the summary statistics of the US growth series. Alternatively.g. Ignore this (specify 0) unless you want this test to be conducted.bmp extension) or the Windows metafile format (. first get the results up by typing: COR USGRW GO Now click on the second icon: Save to a new results file and give the file a name. To save results. if you do not need to save the file but just import it directly into Word. This saves all the data in a Microfit . To save the current dataset. i. and then entering the dependent variable followed by the constant and trend term. which can be done using the buttons at the bottom of the Command Editor screen.Saving Results. typing: 3 LUSGDP C T Start You can use the start of period and end of period drop-down menus to change the sample size. you can click on the fourth icon: Copy graph to clipboard and simply paste it into an open Word document.

plot the two series on the same graph by typing: PLOT CAGRW USGRW GO Observe that the two series broadly move together. the null is rejected in favour of the alternative.10. along with their standard errors. if it is less than 0. for a coefficient βi.e. we can see that the t-ratio is very large and that the null is rejected at practically any significance level. In general. In our example. First. the t-ratio is the t-test statistic for the following hypothesis: H 0 : βi = 0 H1 : β i ≠ 0 If. we start by estimating a static regression. we can reject the null at the 5% significance level.e. i. the estimated coefficient on the trend term gives an estimate of the average quarterly growth rate of US real GDP. We will now conduct a simple analysis of the cross-country relationship between real GDP growth in Canada and the US. US real GDP has grown at 0. Regression-Based Hypothesis Testing The t-ratios are particularly useful in examining the relationship between the dependent variable and explanatory variable(s). if we reject the null that β2 = 0. A quick way of working out whether or not the null is rejected at a given significance level is to look at the prob value (p-value) associated with the t-ratio. i. roughly 3% per annum.e. the t-ratio is greater than the critical value in absolute terms. for example in a simple bivariate regression. we would conclude that a significant relationship exists between yt and xt. and so on. and these can be obtained by closing the regression results window and then selected option 3 from the Post Regression Menu. plus t-ratios for testing significance of the relevant coefficient estimate. This value gives the significance level at which the null can be rejected. at a chosen significance level. Plot the actual and fitted values together to see the estimated trend line super-imposed on the data. so we can conclude that there is a highly significant relationship between Canadian 4 . The result can then be given some meaning. we can reject the null at the 10% significance level. estimating the regression: y t = β 1 + β 2 xt + u t In the single equation estimation part of Microfit. The fitted values from this regression represent the estimated trend line. as we might expect. suggesting that the growth rates in the two countries are related over time. Now consider regressing Canadian real GDP growth (yt) on a constant and US real GDP growth (xt). As can be seen.Since the dependent variable is measured in logs.05. enter the dependent variable followed by the constant and the explanatory variable: CAGRW C USGRW Start Estimates of the regression coefficients β1 and β2 are reported. if it is less than 0.79% per quarter on average over this period. To examine this relationship more formally. i.