How do I hide coeffs with zero restrictions in output?
Posted: Thu Jul 16, 2015 3:21 pm
I have a program that uses RESTRICT to impose zero restrictions on the coefficients from a LINREG instruction. The restrictions are imposed in a loop and aren't known at run time, so I can't manually specify the cards for the LINREG or RESTRICT instructions. I want to impose zero restrictions on certain coefficients and hide those coefficients from the output (since they're dropped from the model, in essence). Here is some example code:
The RESTRICT instruction outputs this:
whereas I want it to output this:
Note that I've simply deleted the PCE{2} coefficient because a zero restriction was imposed on it. Is this possible? The file containing the data is attached.
Code: Select all
calendar(q) 1959 1
allocate 50 2019:4
open data nipa.csv
data(format=cdf,org=columns) 1959:1 2015:1 gdp pce
close data
linreg(print) gdp /
# pce{1 to 4} constant
restrict(create, print) 1
# 2
# 1 0
Code: Select all
restrict(create) 1
# 2
# 1 0
t(216)= 0.736763 or F(1,216)= 0.542819 with Significance Level 0.46206623
Linear Model - Estimation by Restricted Regression
Dependent Variable GDP
Quarterly Data From 1960:01 To 2015:01
Usable Observations 221
Degrees of Freedom 217
Mean of Dependent Variable 8863.9378733
Std Error of Dependent Variable 4048.9644051
Standard Error of Estimate 592.0039366
Sum of Squared Residuals 76051699.429
Durbin-Watson Statistic 0.0928
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. PCE{1} 4.527779 0.700730 6.46152 0.00000000
2. PCE{2} 0.000000 0.000000 0.00000 0.00000000
3. PCE{3} 0.167976 1.677421 0.10014 0.92032590
4. PCE{4} -3.685333 1.227224 -3.00298 0.00298715
5. Constant 4077.829482 65.287299 62.45977 0.00000000
Code: Select all
restrict(create) 1
# 2
# 1 0
t(216)= 0.736763 or F(1,216)= 0.542819 with Significance Level 0.46206623
Linear Model - Estimation by Restricted Regression
Dependent Variable GDP
Quarterly Data From 1960:01 To 2015:01
Usable Observations 221
Degrees of Freedom 217
Mean of Dependent Variable 8863.9378733
Std Error of Dependent Variable 4048.9644051
Standard Error of Estimate 592.0039366
Sum of Squared Residuals 76051699.429
Durbin-Watson Statistic 0.0928
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. PCE{1} 4.527779 0.700730 6.46152 0.00000000
2. PCE{3} 0.167976 1.677421 0.10014 0.92032590
3. PCE{4} -3.685333 1.227224 -3.00298 0.00298715
4. Constant 4077.829482 65.287299 62.45977 0.00000000