Examples of Eviews Code
- By David Stockwell
- Published 03/17/2008
- Finance
- Unrated
David Stockwell
David Stockwell PhD is a scientist applying theories on niche modeling originally developed in ecology to manage and discover new species, to help the corporate world manage and discover new clients.
Niche Modeling is his blog for technical discussions of science and statistics.
NicheShape is his blog and portal for purchasing custom content.
http://nicheshape.com
Eviews is one of the popular econometrics packages being used by the research community and academicians. It is a GUI (Graphical User Interface) based program compatible with Windows and Macintosh operating systems. Other popular econometrics packages include SHAZAM (shazam.econ.ubc.ca), LIMDEP (www.limdep.com), SAS (www.sas.com), GAUSS (www.aptech.com) and R (cran.r-project.org). Eviews is one of the most popular packages for analyzing time series data. Eviews, produced by Quantitative Micro Software (QMS) from Irvine, California, comes with very comprehensive user guide and reference manuals: The Users Guide and The Command and Programming Reference (www.eviews.com). If you are familiar with programs like C++ and Gauss you will be able to use your programming skills to run your own customized protocols in Eviews. Let us view some examples of Eviews code here.
The recent version, Eviews 6 is a marriage between modern spreadsheet and Relational Database Management Systems (RDBMS) technology with conventional statistical tools. Through Eviews, you can do general statistical analyses, cross section or panel data analysis, time series data estimation and forecasting, presentation of graphics, simple data management and large-scale simulation of data.
Market researchers use Eviews in order to analyze the characteristics of actual purchases and transactions called revealed preference data. Quantitative statistical models such as the standard Linear Regression model, Binomial Logit model, Multinomial Logit model, Nested Logit model, Proportional Hazard model and Censored Regression model are used extensively for this sort of analysis using Eviews.
Examples of Eviews Code and Batch Programming
The Eviews program is command driven in both interactive and batch programming modes.
But, you can also construct commands through dialogue boxes and menus. Batch programming is executing a collection of commands automatically. Through batch programming, you can have access to a number of features, which are normally not available to the ordinary user, such as conditional branching and loops.
Running Regression Models in Eviews
Now assume that you have data on returns from the Microsoft stock and returns from S&P 500. Also, assume that Microsoft stock return is a dependent variable and S&P 500 is the explanatory variable. We call this regression model eq1. The model, which is called a Market Model, can be described in Eviews as below.
eq1.ls microsoft_ret c sp500_ret
Once you run the regression, you can opt for a Chow Test for structural breaks. You can do this test in the regression window in the menu, VIEWS - STABILITY TESTS - CHOW BREAKPOINT TEST. You can use the following command to test for stability in batch programming. This command will test whether there was a structural break at observation 5000 or not.
eq1. chow 5000
In Eviews, besides different views, objects allow you to call upon t-statistics, residual sum of squares and Durbin-Watson statistics. Let us try to get adjusted R2 data. The R2 data is stored in a scalar called r2bar.
scalar r2bar
r2bar = eq1.@rbar2
You will be able to access the t-statistic for the individual parameters through the command
eq1.@tstats(i)
and the standard errors for the parameter estimates through
eq1.@stderrs(i).
You can get all the available data members from the Eviews programming manual.
These examples of Eviews code will help you get to know the basics of Eviews programming. Once you go through the programming manual, you will be able to do complex statistical modeling with ease.
The recent version, Eviews 6 is a marriage between modern spreadsheet and Relational Database Management Systems (RDBMS) technology with conventional statistical tools. Through Eviews, you can do general statistical analyses, cross section or panel data analysis, time series data estimation and forecasting, presentation of graphics, simple data management and large-scale simulation of data.
Market researchers use Eviews in order to analyze the characteristics of actual purchases and transactions called revealed preference data. Quantitative statistical models such as the standard Linear Regression model, Binomial Logit model, Multinomial Logit model, Nested Logit model, Proportional Hazard model and Censored Regression model are used extensively for this sort of analysis using Eviews.
Examples of Eviews Code and Batch Programming
The Eviews program is command driven in both interactive and batch programming modes.
Running Regression Models in Eviews
Now assume that you have data on returns from the Microsoft stock and returns from S&P 500. Also, assume that Microsoft stock return is a dependent variable and S&P 500 is the explanatory variable. We call this regression model eq1. The model, which is called a Market Model, can be described in Eviews as below.
eq1.ls microsoft_ret c sp500_ret
Once you run the regression, you can opt for a Chow Test for structural breaks. You can do this test in the regression window in the menu, VIEWS - STABILITY TESTS - CHOW BREAKPOINT TEST. You can use the following command to test for stability in batch programming. This command will test whether there was a structural break at observation 5000 or not.
eq1. chow 5000
In Eviews, besides different views, objects allow you to call upon t-statistics, residual sum of squares and Durbin-Watson statistics. Let us try to get adjusted R2 data. The R2 data is stored in a scalar called r2bar.
scalar r2bar
r2bar = eq1.@rbar2
You will be able to access the t-statistic for the individual parameters through the command
eq1.@tstats(i)
and the standard errors for the parameter estimates through
eq1.@stderrs(i).
You can get all the available data members from the Eviews programming manual.
These examples of Eviews code will help you get to know the basics of Eviews programming. Once you go through the programming manual, you will be able to do complex statistical modeling with ease.
David Stockwell PhD is a well published scientist who is promoting numeracy and niche modeling methods from ecology to help the corporate world to manage and discover new clients.
Custom Content: From Content Creation to Web Dominance.
Niche Modeling: The Science and Statistics of Niche Modeling.
563
