Anda di halaman 1dari 11

Professor M.

Hashem Pesaran
Dr Shaun Vahey

2000
INMFW.DOC

Paper 5, Prelim.

Introduction to Microfit 4.0 for Windows


The aim of this handout is to familiarise you with Microfit 4.0 for Windows. It will introduce
you to the most frequently used tools of Microfit. After working through this document, you
should be able to:

read data
transform variables
produce graphs
run univariate regressions, and
carry out hypothesis testing.

This handout should be read in conjunction with the manual of the package, Working with
Microfit 4.0: Interactive Econometric Analysis (Windows Version).

1. Introduction to Microfit
This document has been prepared using the capability of Microfit to produce graphs and tables
that can be imported directly into most word processing packages (here Microsoft Word).
Whenever graphs or tables are produced, Microfit gives the option to save the output to the
clipboard for subsequent pasting into documents. When importing tables into a word
processing package it is best to use a non-scaleable font (such as Courier) .This maintains the
alignment of columns from Microfit output. Graphs and tables can also be saved as files. There
are a variety of formats available to save graphs as files, including bitmap, or as a Microfit
graph file for subsequent use in Microfit.

Introduction to Microfit 4.0 for Windows

1. Reading Data into Microfit


To start Microfit from the main screen of Windows 95, double-click on the Microfit icon and
wait for the program to load. (Alternatively, click the Start button of Windows 95, then select
Programs, and then Microfit for Windows in the Microfit for Windows menu.) You will then
see the initial screen of Microfit:

Microfit has extensive help facilities to guide you through the program. Under the Options
menu you can toggle on or off Bubble help which, when on, displays brief explanations of the
functions available as the mouse moves over the screen. There are also extensive explanatory
notes available via the Help menu. This includes an overview and guidance for using Microfit,
comprehensive explanations of the commands available and their use, and also detailed
explanatory notes for the regression techniques available in the package, including references to
further readings where relevant. Furthermore, general guidelines to help you make the best use
of the options are available throughout the package. The manual Working with Microfit 4.0 also
has comprehensive explanations, guidance and tutorial lessons to help you become familiar
with econometric techniques.

Introduction to Microfit 4.0 for Windows

Microfit can accept data of many different types, including ASCII files, CSV files and
AREMOS files. The following examples demonstrate how to input Excel and Microfit data
files. (A complete description of Microfits options for inputting and saving data files is
contained in Chapter 3 of Working with Microfit 4.0.)

1.1 Reading Microfit Data Files from the Facultys Network


The following data files have been saved previously in Microfit format and are available for use
by students from the Facultys PC network: ER.FIT, INV.FIT, PSIDG.FIT, PSIDH.FIT,
AIDS.FIT, MRW.FIT and YIOECD.FIT. Students are advised to save these files (and modified
versions of them) to their own workspaces for subsequent use. For details on how to save your
data, see Section 6. Note that a special Microfit data file must have the extension .FIT.
For example, to load the file AIDS.FIT from the Facultys network, first click on File and
select the option Open from the drop down menu that appears. You are prompted for the
filename. Type:
M:AIDS.FIT
Microfit now loads the data and opens a screen allowing you to process the data (see Section 2.)

1.2 Reading EXCEL data Files into Microfit


To start Excel, click the Start button of Windows 95, then select Programs, and then Microsoft
Excel. (You may want to minimise the Microfit screen to do this.) In Excel, open the file
M:AIDS.XLS. This worksheet contains annual observations on household expenditure for six
expenditure categories for the Netherlands, 1948-1988.
To cut the data from Excel and paste them into Microfit, place the cursor on cell A1 and click,
then hold down the SHIFT key and click on R42 to block the entire dataset. Click on Edit and
select the option Copy to put the data into the clipboard. Now return to Microfit by clicking on
the Microfit button on the bottom toolbar. (You may find it convenient to expand the Microfit
screen to fill your whole screen.) To paste the data, click on Edit and select the option Paste
Data from the drop down menu that appears. Microfit then opens a screen to specify the
frequency and sample period of the data as well as the number of variables.

Introduction to Microfit 4.0 for Windows

For Data frequency, choose the option Annual.


For the Start year, type 1948
For the End year, type 1988
For the Number of variables, type 18 (the number of columns).
Then click Ok to proceed. Microfit then opens a screen allowing you to specify further
information on how the data has been stored in the clipboard. This indicates the only data
arrangements that will be acceptable to Microfit. Our data are arranged with variable names in
the first row (with optional descriptions) and dates in the first column. Click on the appropriate
choices, and then on Ok. Microfit now reads the data and opens a screen allowing you to make
any editing changes you wish. We do not wish to make any, and so click Close and Microfit
will load the data.
Warning: you cannot import more than 32K of data via the clipboard. For large spreadsheet
data files, you should save the data in Commas Separated Values format in Excel and read the
data into Microfit by using the File and Open commands (describing the format of the dataset
on the screens that appear). See Working with Microfit 4.0, Section 3.1.5 p30 for details.

Introduction to Microfit 4.0 for Windows

2. Data Transformations
When Microfit has read the data successfully, the following screen opens:

You now have the opportunity to make any required transformations of the data before
beginning the econometric analysis. Microfits options for data processing and preliminary data
analysis are described in detail in Chapter 4 of Working with Microfit 4.0. There are also a
number of commands available in the FUNCTIONS and COMMANDS menus that calculate
basic statistics such as the mean, the standard deviation or correlation coefficients, and produce
graphs of the data series. The screen also contains information on the selected sample, the
number of observations and the number of variables that you have imported into Microfit. The
editor window can now be used to create new variables.
The general formula to transform variables is:
new variable = function of old variable(s)
Introduction to Microfit 4.0 for Windows

For instance, to generate the (natural) logarithms of the variables P, PF and PH type:
LP = log(P); LPF = log(PF); LPH = log(PH)
and click Go to process. To check on the variables you have created you can click on the
Variables button. This opens a screen that lists the variable names and any descriptions. To
close this screen click on the Variables button again. Alternatively, by clicking Close on the
VARIABLES window itself, you can hold the variable list as an icon that can be positioned
conveniently on your screen. Double clicking on this icon then reopens the VARIABLES
window to allow you to keep track of your variables and descriptions.
As another example, suppose you wish to create the percentage rate of change of the aggregate
price level. First delete the current contents of the editor window (use Bubble help to identify
the button Delete current contents of editor window), and then type:
RATEP = 100*(P-P(-1))/P(-1)
where (-1) immediately after the variable denotes (and is understood by Microfit to mean) the
value of the variable lagged by one period. To process, click Go. Lead variables can likewise
be declared by (+1) in Microfit.
Alternatively, RATEP can be generated automatically by using the function rate. Type:
RATEP = rate(P)
and click on Go to process.
If you wish to generate fixed variables such as a constant, seasonal dummies, or deterministic
trends, you can use the buttons at the base of the screen to do so.
To create a constant, click on Constant and give (type) a name to the constant that you would
like to generate, for example CONST. Microfit can also generate different types of seasonal
dummies. To create simple 0-1 dummies select the Seasonal (1) button at the base of the
screen. Of course, these are usually used with monthly or quarterly time series data.
To generate period or group-specific dummy variables, use the sample function to mark the
periods/groups and then create the required dummies. For example, type:
sample 1948 1988;

DUM1 = 0;

DUM2 = 0;

sample 1948 1969;

DUM1 = 1; sample 1970 1988;

sample 1948 1988

Introduction to Microfit 4.0 for Windows

DUM2 = 1;

and then click Go. The variables DUM1 and DUM2 now contain zeros except in the case of
observations for the relevant periods where they contain ones. To see exactly what these
variables look like, list them by clicking on the Data button.
If you are performing a number of complex data transformations you should use a batch file
(constructed with the DOS editor or Microsoft Wordpad). The file M:AIDS.BAT contains a
number of transformations useful for estimating Almost Ideal Demand Systems. Click on the
batch button and select the appropriate file to run the batch job. See Working with Microfit
4.0, Section 4.4.3 p54 for details.

3. Graphs and Other Commands


Microfit can produce graphs and calculate basic descriptive statistics from the editor window.
For instance, to see the plot of the variable LP, first clear the editor window, type:
plot LP
and click Go to process. If you wish to print the graph, click the Print button on the toolbar.
Your graph should be identical to the following figure:

PLOT of LP

1.0
0.8
0.6
0.4
LP

0.2
0.0
-0.2
-0.4
-0.6
1960

1965

1970

1975

1980

1985

Years

Microfit has extensive graphics editing facilities that can be accessed by clicking on the Show
Graph Toolbar button on the toolbar. There are numerous options for adjusting the
background, colour, axes, style, titles, etc. of your graph. Each option in the GRAPH
CONTROL menu that opens when you click the Show Graph Toolbar button has its own
property page; click the appropriate page tab to view it. Each property page contains a number
of options; use the appropriate buttons, checkboxes, etc. to make the changes you desire. (More
details on how to alter the display of graphs are provided in Section 5.2.1 of Working with
Microfit 4.0 p64).

Introduction to Microfit 4.0 for Windows

Another useful command which helps you to understand whether there is correlation between
two series is the scatter command. This command plots one series against another. For
instance, to investigate graphically the extent of any correlation between aggregate income
(AGGY) and total expenditure (E), clear the editor window, type:
scatter AGGY E
and then click Go to process.
Scatter plot of AGGY on E

400000

300000

AGGY

200000

100000

0
0

50000

100000

150000

200000

250000

300000

As you can see from this graph, AGGY and E are almost perfectly (positively) correlated.

4. Single Equation Regression Analysis


Having performed the necessary data transformations and the preliminary graphical
investigation, we can move onto regression analysis with Microfit. A comprehensive discussion
of Microfits options for single equation regression analysis is given in Chapter 6 of Working
with Microfit 4.0. The econometric theory underlying these options is presented in Chapter 18
of Working with Microfit 4.0. To carry out a single equation estimation, you can either use the
drop down menu from the Univariate option, or, as a shortcut, click on the Single button at the
top of the editor window. The next screen that appears allows you to specify the regression
model and the sample over which you wish to estimate. The regression is specified by typing
into the editor box the variables of your regression, starting with the dependent variable, and
followed by the constant and the other explanatory variables in the regression.
By clicking on the Help button, help and general guidelines for single equation regression are
available.

Introduction to Microfit 4.0 for Windows

Suppose that the dependent variable is food expenditure as a share of total expenditure on all
commodities, WF. The constant is INPT and the other explanatory variables are the (natural)
logs of the commodity prices, LPF, LPH, LPC, LPM, LPE, LPO, and the (natural) log of real
income, LRY. Type in the editor box:
WF INPT LPF LPH LPC LPM LPE LPO LRY
and then click on the Start button. You will see the following table.
Ordinary Least Squares Estimation
*******************************************************************************
Dependent variable is WF
29 observations used for estimation from 1960 to 1988
*******************************************************************************
Regressor
Coefficient
Standard Error
T-Ratio[Prob]
INPT
.29146
.0018291
159.3440[.000]
LPF
.20056
.046063
4.3541[.000]
LPH
-.018577
.018647
-.99621[.330]
LPC
-.035653
.037559
-.94926[.353]
LPM
.018776
.029345
.63983[.529]
LPE
-.088343
.041091
-2.1499[.043]
LPO
-.084531
.034710
-2.4354[.024]
LRY
-.13313
.017917
-7.4305[.000]
*******************************************************************************
R-Squared
.99714
R-Bar-Squared
.99619
S.E. of Regression
.0030982
F-stat.
F( 7, 21)
1047.5[.000]
Mean of Dependent Variable
.27396
S.D. of Dependent Variable
.050210
Residual Sum of Squares
.2016E-3
Equation Log-likelihood
131.0618
Akaike Info. Criterion
123.0618
Schwarz Bayesian Criterion
117.5926
DW-statistic
1.5040
*******************************************************************************
Diagnostic Tests
*******************************************************************************
*
Test Statistics *
LM Version
*
F Version
*
*******************************************************************************
*
*
*
*
* A:Serial Correlation*CHSQ(
1)=
1.5897[.207]*F(
1, 20)=
1.1599[.294]*
*
*
*
*
* B:Functional Form
*CHSQ(
1)=
4.0839[.043]*F(
1, 20)=
3.2781[.085]*
*
*
*
*
* C:Normality
*CHSQ(
2)=
.50066[.779]*
Not applicable
*
*
*
*
*
* D:Heteroscedasticity*CHSQ(
1)=
3.8035[.051]*F(
1, 27)=
4.0758[.054]*
*******************************************************************************
A:Lagrange multiplier test of residual serial correlation
B:Ramsey's RESET test using the square of the fitted values
C:Based on a test of skewness and kurtosis of residuals
D:Based on the regression of squared residuals on squared fitted values

The first part of the table gives estimates of the regression coefficients, the R-Squared and the
standard error of the regression. The second part contains a variety of residual diagnostic
statistics (such as the LM-statistic for serial correlation, a test for heteroscedasticity, etc.).

Introduction to Microfit 4.0 for Windows

5. Hypothesis Testing
The significance of each individual regressor in explaining the variance of the dependent
variable can be tested using the reported t-ratios for the coefficient of the regressors, or by
checking the probability value reported in the square brackets. The latter gives the probability
of falsely assuming that the coefficient of the regressor in question is equal to zero. For
example, the t-ratio of the coefficient of the LPH variable is equal to -.99621, with a probability
value of 0.330, implying that this variable is significant only at the 33 percent level.
Apart from t-tests, Microfit offers a variety of test statistics for checking economic hypotheses
of interest. These options can be reached by clicking Close in the results window. Then select
option 2 (Move to Hypothesis Testing Menu) of the POST REGRESSION MENU that
appears and click Ok. The HYPOTHESIS TESTING MENU that appears has a variety of
options. For example, if you would like to test whether the above equation is homogeneous in
prices, choose option 7 (Wald test of linear/nonlinear restrictions) of the menu, click Ok,
then type the restrictions:
A2+A3+A4+A5+A6+A7=0
in the editor box and click Ok. Microfit then computes the Wald statistic for testing these
restrictions. The results on your screen should match the following table:
Wald test of restriction(s) imposed on parameters
*******************************************************************************
Based on OLS regression of WF on:
INPT
LPF
LPH
LPC
LPM
LPE
LPO
LRY
29 observations used for estimation from 1960 to 1988
*******************************************************************************
Coefficients A1 to A8 are assigned to the above regressors respectively.
List of restriction(s) for the Wald test:
a2+a3+a4+a5+a6+a7=0
*******************************************************************************
Wald Statistic
CHSQ( 1)=
.21835[.640]
*******************************************************************************

In this case the restriction is rejected at any reasonable significance level. Another useful
hypothesis to test is the joint hypothesis that a number of regressors are jointly statistically
insignificant. Suppose in the present example you wish to test the joint significance of the price
variables LPF and LPH.
To carry out this test, close the results window for the Wald test, select option 5 (Variable
Deletion Test (OLS & IV)) of the HYPOTHESIS TESTING MENU that appears, click Ok,
then type the variables:
LPF LPH

Introduction to Microfit 4.0 for Windows

10

in the editor box that appears and click Ok. Microfit then estimates the regression without these
variables. The results on your screen should match the following table:
Variable Deletion Test (OLS case)
*******************************************************************************
Dependent variable is WF
List of the variables deleted from the regression:
LPF
LPH
29 observations used for estimation from 1960 to 1988
*******************************************************************************
Regressor
Coefficient
Standard Error
T-Ratio[Prob]
INPT
.28942
.0020363
142.1282[.000]
LPC
-.046541
.049087
-.94813[.353]
LPM
.045445
.035904
1.2657[.218]
LPE
.0087348
.033328
.26209[.796]
LPO
-.075422
.044884
-1.6804[.106]
LRY
-.10925
.022223
-4.9163[.000]
*******************************************************************************
Joint test of zero restrictions on the coefficients of deleted variables:
Lagrange Multiplier Statistic
CHSQ( 2)= 13.8032[.001]
Likelihood Ratio Statistic
CHSQ( 2)= 18.7402[.000]
F Statistic
F( 2, 21)=
9.5371[.001]
*******************************************************************************

At the bottom of these results, Microfit reports three test statistics which allow you to check the
joint significance of the excluded variables from the regression: the Lagrange multiplier
statistic, the Likelihood ratio statistic, and the F-statistic. These three test statistics are
asymptotically (that is, for large enough samples) equivalent but can differ in small samples.
The probability values for all these tests are very small, suggesting that the excluded variables
are statistically significant.

6. Creating a Microfit Data File


Before leaving Microfit, it is a good idea to save your data in a Microfit data file. By doing this
you save a tremendous amount of work, since each time that you would like to use the same
data (raw data and transformed variables), you can load the data without going through the
various steps involved in reading raw data files into Microfit. In fact it is a good idea to save
your data in the special Microfit format as soon as you have completed reading in your data.
To save the data in a Microfit file, go through the following steps: First click Close to leave the
results window and then choose, sequentially, Move to Post Regression Menu in the
HYPOTHESIS TESTING MENU, Move to Backtracking Menu in the POST REGRESSION
MENU, Return to Single Equation Menu in the BACKTRACKING MENU, and finally click
on the Save currently loaded data set in a new file button. Then you can specify a new file
name and/or directory and save the data by specifying the sample period. For instance, to save
the variables that we have used in the above regression analysis on your floppy disk, select the
directory A: and specify the file name AIDS.FIT. Then click Ok. Microfit then requests the
sample period for the saved data. Leave this as it is to select all observations and click Ok.

Introduction to Microfit 4.0 for Windows

11

Anda mungkin juga menyukai