GAUSS tscsFit Example

Introduction

The following is an example of implementing the tscsFit procedure. This program provides estimates for the classic Grunfeld dataset [grunfeld.dat]. These data were originally found in PhD dissertation of Y. Grunfeld (University of Chicago, 1958). The data is a balanced dataset covering 10 firms [firm = 1, ..., 10] for 20 years (1935-1950) [ year = 1935, ..., 1954].

The program follows 2.6.1 from 'Econometric Analysis of Panel Data', Baltagi, 2005. It estimates the model

$$investment_{it} = a + B_{1}firmValue_{it} + B_{2}capitalStock_{it} + u_{it}$$ $$u_{it} = c_{i} + v_{it}$$

Estimate the Model

This example uses the formula string syntax which requires no data loading prior to calling the procedure. This greatly simplifies the required code.

new;
cls;
library tsmt;

// Create file name with full path
dataset = getGAUSSHome $+ "pkgs/tsmt/examples/grunfeld.dat";

// Call tscsFit
call tscsFit(dataset, "investment ~ firm_value + capital", "firm");

Output

The printed results include the OLS dummy variable estimates (also known as the within or fixed effects estimates), the constrained pooled ols model, and the feasible gls error components model:

===============================================================================
 tscsmt Version 3.0.0
=============================================================================== Data Set: grunfeld.dat ------------------------------------------------------------------------------- ----------------------- OLS DUMMY VARIABLE RESULTS ---------------------- --------------------------------- Dependent variable: investment --------------------------------- Observations : 200
Number of Groups : 10
Degrees of freedom : 188
Residual SS : 523478.147
Std error of est : 52.768
Total SS (corrected) : 2244352.274 F = 309.014 with 2,188 degrees of freedom P-value = 0.000
Variable Coef. Std. Coef. Std. Error t-Stat P-Value ---------------------------------------------------------------------------- firm_value 0.110124 0.353129 0.011857 9.287901 0.000 capital 0.310065 0.679292 0.017355 17.866564 0.000 Group Number Dummy Variable Standard Error 1 -70.296717 49.707959 2 101.905814 24.938323 3 -235.571841 24.431616 4 -27.809295 14.077754 5 -114.616813 14.165433 6 -23.161295 12.668739 7 -66.553474 12.842973 8 -57.545657 13.993146 9 -87.222272 12.891893 10 -6.567844 11.826891 F-statistic for equality of dummy variables : F(9, 188) = 49.1766 P-value: 0.0000
------------------- OLS ESTIMATE OF CONSTRAINED MODEL --------------------- --------------------------------- Dependent variable: investment --------------------------------- Observations : 200
Number of Groups : 10
Degrees of freedom : 197
R-squared : 0.812
Rbar-squared : 0.811
Residual SS : 1755850.484 Std error of est : 94.408
Total SS (corrected) : 9359943.929 F = 426.576 with 3,197 degrees of freedom P-value = 0.000
Variable Coef. Std. Coef. Std. Error t-Stat P-Value ---------------------------------------------------------------------------- CONSTANT -42.714369 --- 9.511676 -4.490730 0.000 firm_value 0.115562 0.700416 0.005836 19.802589 0.000 capital 0.230678 0.320268 0.025476 9.054808 0.000 --------------------------------------------------------------------------- FULL, RESTRICTED, AND PARTIAL R-SQUARED TERMS--DUMMY VARIABLES ARE CONSTRAINED ------------------------------------- TABLE OF R-SQUARED TERMS ------------------------------------- R-squared--full model: 0.944 R-squared--constrained model: 0.812 Partial R-squared: 0.702 ------------------------------------- ---------------------------------------------------------------------------- FULL, RESTRICTED, AND PARTIAL R-SQUARED TERMS--X VARIABLES ARE CONSTRAINED ------------------------------------- TABLE OF R-SQUARED TERMS ------------------------------------- R-squared--full model: 0.944 R-squared--constrained model: 0.760 Partial R-squared: 0.767 ------------------------------------- ---------------------- GLS ERROR COMPONENTS RESULTS ---------------------- --------------------------------- Dependent variable: investment --------------------------------- Observations : 200
Number of Groups : 10
Degrees of freedom : 197
Residual SS : 548904.055
Std error of est : 52.786
Total SS (corrected) : 2381390.625 F = 229.041 with 3,197 degrees of freedom P-value = 0.000
Std. errors of error terms: Individual constant terms: 84.201
White noise error : 52.768
Variable Coef. Std. Coef. Std. Error t-Stat P-Value ---------------------------------------------------------------------------- CONSTANT -57.834415 --- 28.898935 -2.001265 0.047 firm_value 0.109781 0.384782 0.010493 10.462658 0.000 capital 0.308113 0.659550 0.017180 17.933910 0.000 Group Number Random Components 1 -9.524296 2 157.891024 3 -172.895804 4 29.911980 5 -54.679009 6 34.346132 7 -7.897758 8 0.672638 9 -28.139350 10 50.314444 Lagrange Multiplier Test for Error Components Model Null hypothesis: Individual error components do not exist. Chi-squared statistic (1): 798.3793
P-value: 0.0000
Hausman (1978) Chi-Squared Specification Test Null hypothesis: Error components model is the correct specification. Chi-squared statistic (2) = 2.3304
P-value = 0.3119

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy