A Comparison of TSP 4.5 & EViews 3.1
by Clint Cummins, Econometric Programmer for TSP International, rev. 11/10/99
This is intended to be a fairly detailed comparison of the different features of TSP 4.5 and EViews 3.1. It is based on my knowledge of TSP and the EViews manual and web page. I hope it will be a fair comparison, but given my affiliation and greater familiarity with TSP, there will probably be a few errors. Both programs cover standard econometrics fairly well, as do other packages such as SHAZAM, RATS, LIMDEP, SAS, Gauss, etc. To save space, I will try to limit discussion to the differences (i.e. I won't spend much time on standard features like OLS, 2SLS, etc.).
1. INTERFACE
TSP: Command driven, in batch or interactive mode. Commands are verbs with options and arguments, in the form command(options) arguments; . Most options are usually 6-8 characters, and they can be abbreviated. Variable names can be up to 64 characters long.
EViews: Command driven, in both modes. However, all commands can be constructed by following menus and dialog boxes. Command syntax can be: command(options) arguments . No ';' to end a command. The end of a command is (apparently) a hard carriage return (i.e. possible long lines). Most options are single characters. Commands can also be given in "object" syntax: object.command(options) other_arguments .
2. PLATFORMS SUPPORTED
TSP:
- TSP/GiveWin: Windows 95/98 + NT
- TSP without GiveWin: DOS, Windows 3.x, Windows 95/98, Windows NT, OS/2.
- Mac: Apple Macintosh, PowerMac.
- unix: Sun, IBM RS/6000, DEC Alpha OSF/1, DEC Ultrix, HP 9000, Silicon Graphics, linux/Intel.
- Other: DEC Alpha/OpenVMS.
EViews:
- PC: DOS: MicroTSP 7.0 only. Windows 3.x, OS/2: EViews 2.0 only. Windows 95/98, Windows NTs: EViews 3.1.
- Mac: Apple Macintosh, PowerMac: EViews 1.1 only.
- unix: none.
- Other: none.
2.1 GRAPHICS
TSP/GiveWin: editable/customizable graphics, in multiple windows. TSP without GiveWin: fairly simple graphics (color video, hardcopy laser), on PC/Mac.
EViews: more customizable graphics, including dual scale, bar, and pie.
2.2 DATA FILE FORMATS
TSP: Reads Excel files to version 4.0, and Stata .dta files. TSP/GiveWin can read Excel files from version 5 and higher.
EViews: Reads Excel files to version 8 (or 97).
3. ECONOMETRIC FEATURE DIFFERENCES 3.1 TIME SERIES
TSP: AR1 - exact or conditional ML. ARIMA - exact or conditional ML with stationarity/invertibility constraints imposed. ARCH with several initial condition options, fast iterations with second derivatives, robust/QMLE standard errors. Unit root tests include Weighted Symmetric. Cointegration tests include Engle-Granger. Shiller lags (Bayesian PDL), Divisia price and/or quantity indices. Regression diagnostics include exact P-value for Durbin-Watson, Breusch-Pagan heteroskedasticity test, LR test for split-sample heteroskedasticity, LM heteroskedasticity test based on squared fitted values, and Shapiro-Wilk normality test with P-value.
EViews: AR1 - conditional ML only. ARIMA - conditional ML. OLS and 2SLS with ARMA residuals. ARCH includes TARCH, EGARCH, and (apparently) ARMA residual terms. Seasonal adjustment includes additive MA and X-11. VAR includes standard errors for impulse response (analytic or Monte Carlo), and Vector Error Correction model. Exponential smoothing (5 methods). Smoothing in Kalman filter includes standard errors. Regression diagnostics include Chow forecast test, 1-step forecast test, and n-step forecast test.
3.2 SIMULTANEOUS EQUATIONS 3.2.1 GENERAL NONLINEAR SYNTAX/METHODS
TSP: Coefficients in nonlinear equations are names, like FRML EQ1 Y = ALPHA*Y(-1); The CONST command can be used to hold coefficients temporarily fixed. The default iteration methods almost always use analytic first derivatives (and sometimes second derivatives); these often provide more reliable convergence and standard errors than iteration with numeric derivatives. Equations can be substituted into each other to build large models or to impose restrictions.
EViews: Coefficients in nonlinear equations are subscripted names, like EQUATION EQ1 Y = ALPHA(1)*Y(-1) Coefficient names other than C(i) require an additional COEFFICIENT command. Default iteration methods usually use numeric derivatives.
3.2.2 ESTIMATION METHODS
TSP: LIML. GMM includes MASK (excludes instruments from selected equations), kernel includes Parzen, user can supply weighting matrix.
EViews: GMM includes 2 automatic bandwidth selection procedures, kernel includes quadratic spectral, can prewhiten data automatically.
3.3 ROBUST ESTIMATION
TSP: LAD minimizes sum of absolute values of residuals (linear model). LMS minimizes sum of absolute values (or squares) of residuals for median residual and below; a high breakdown estimator that is resistant to up to 50% erroneous data, and is useful for outlier detection.
EViews: Nonparametric regression, including Loess and Nadaraya-Watson local polynomial kernel.
3.4 QUALITATIVE DEPENDANT VARIABLES
TSP: Logit handles multinomial (>=2 choices), conditional and mixed. Probit and Logit include a test for "complete separation". Sample Selection model.
EViews: Logit is binary only (2 choices). Gompit model for binary choice with extreme value errors. Ordered: includes logit and gompit. Censored: includes logistic and extreme value, and upper censoring. Count data: includes "QML". Forecasting of original or latent dependent variable.
(Both programs handle ordered probit, poisson, and negative binomial models).3.5 GENERAL MAXIMUM LIKELIHOOD
TSP: ML command does general non-recursive maximum likelihood, where the user writes the log likelihood; TSP generates analytic first and second derivatives and maximizes it. Example code is available for a wide range of ML models, such as frontier production, ordered probit, nested logit, negative binomial, bivariate probit, and bivariate tobit.
ML PROC version handles a wider range of models, such as recursive models (GARCH) and hyperparameter estimation in Kalman filter. ML PROC does not use analytic derivatives (just numeric ones).
EViews: LOGL command. Uses numeric derivatives by default; the user may optionally supply equations for analytic first derivatives (no provision for analytic second derivatives). Syntax is natural for recursive models (except possibly for initialization of presample values). Wide range of example codes, such as Multinomial Logit, AR1 exact ML and Sample Selection.
3.6 PANEL/POOLED MODELS
TSP: Fixed and random effects work on large and unbalanced panels. The user supplies the stacked series (for example: GDP and Y), and an ID variable usually specifies which observations belong to which individual.
Additional estimation methods (for balanced panels) are available with GMM(MASK) (one equation per year, with predetermined variables as instruments) and LSQ (minimum distance, testing restrictions with Pi matrix).
EViews: Methods work on small ("up to a couple of hundred cross section units") balanced and unbalanced panels. Individual ID names are required for creating the pooled data group from individual time series; for example GDPUS, GDPFRG, GDPIT, YUS, YFRG, YIT. (I infer "small" panels from this, because you have to name/create all these individual variables first before estimation; i.e. it wouldn't be very practical if you have, say, more than 50 individuals). Pooling estimation methods include AR residuals, cross section weights and SUR weights. Easy to specify some variables or AR terms with individual-specific coefficients.
4. PROGRAMMING FEATURES 4.1 LOOPS
TSP: DO for arithmetic loop. DOT for character loop.
EViews: FOR and WHILE for both arithmetic and character loops. For character, use %character index variable(s), and string substitution syntax. FOR loop can operate on several index variables for each pass through the loop. Arithmetic index of loop must be a !name variable, or be previously declared as a SCALAR.
4.2 IF/THEN/ELSE
TSP: IF/THEN/ELSE work only on scalars. DO and ENDDO bracket multiple statements.
EViews: IF/THEN/ELSE work on both series and scalars. THEN/ELSE/ENDIF bracket multiple statements.
4.3 PROCEDURES/SUBROUTINES
TSP: To define: PROC name arguments; . To use: name args; . Can be defined below where they are used (except in interactive mode). LOCAL command can be used to make sure specific modified variables do not change global variables.
EViews: To define: SUBROUTINE LOCAL name(argtype1 arg1 ...) . To use: CALL name args . RETURN command to exit before end. Output arguments that don't exist have to be declared before the CALL. Scalar expressions can be passed to subroutines. This "local" subroutine is otherwise equivalent to a TSP PROC. There is also the default "global" SUBROUTINE, which is defined without the LOCAL keyword. In a global routine, all created variables are global (instead of local). To make local (scalar) variables, use !name .
4.4 MATRIX ALGEBRA
Caveat: Neither TSP nor EViews is as good with matrices as Gauss, MATLAB, or Ox.
TSP: Uses more operators, vs. function names. For example, the classic OLS formula is MAT B = (X'X)"X'Y;
Operators include element-by-element product and division. Functions include YINV (forced generalized inverse). Generalized inverse is the default (for a symmetric matrix). Matrix types include triangular and diagonal.
EViews: Uses @functionname(a,b,...) for most operations. The OLS formula is MATRIX B = @INV(@TRANSPOSE(X)*X)*@TRANSPOSE(X)*Y or MATRIX B = @INV(@INNER(X))*@TRANSPOSE(X)*Y .
Functions include COLPLACE, @COLUMNEXTRACT, @CONDITION, @COR, @COV, @MAKEDIAGONAL, MATPLACE, @MEAN, @NORM, @ROWEXTRACT, ROWPLACE, @SOLVESYSTEM, @SUBEXTRACT, @SVD, @VAR. "A singular matrix cannot be inverted." (I guess an error message and missing values are the result?)
4.5 OTHER PROGRAMMING FEATURES
TSP: Functions include Log base 10. Can create analytic derivatives of an equation with respect to several arguments.
EViews: Includes functions for string and date conversion/extraction, first- and Nth-order (regular or Log) differencing, percent change, moving average, moving sum, logit, and reciprocal. Function interface to 17 different probability distributions (including inverse and random variables). Named object syntax allows for easy comparison of results from two or more models. Table creation/editing feature for summarizing results from different models.
[此贴子已经被作者于2005-1-22 0:48:13编辑过]