Code: Select all
calendar(q) 1969 1
compute begin_samp = 1969:1
compute end_samp = 2006:4
compute max_lags = 4
open data "sandbox_data.xls"
data(format = xls, org = columns)
close data
system(model = mdl)
variables lgdpk dlp
lags 1 to max_lags
deterministic constant
end(system)
estimate(model = mdl)
compute prior_coeffs = %modelgetcoeffs(mdl)
compute post_coeffs = prior_coeffs
* trivial example: zero out intercept terms
do i = 1, 2
compute post_coeffs(%rows(post_coeffs), i) = 0
end do i
compute %modelsetcoeffs(mdl, post_coeffs)
compute eq = %modeleqn(mdl, 1)
linreg(create, equation = eq)
Code: Select all
Linear Regression - Estimation by User
Dependent Variable LGDPK
Quarterly Data From 1970:02 To 2006:04
Usable Observations 147
Degrees of Freedom 138
Mean of Dependent Variable 8.7984421340
Std Error of Dependent Variable 0.3252359768
Standard Error of Estimate 9.0869764659
Sum of Squared Residuals 11395.093498
Durbin-Watson Statistic 1.6276e-006
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. LGDPK{1} 0.000000 0.000000 0.00000 0.00000000
2. LGDPK{2} 0.000000 0.000000 0.00000 0.00000000
3. LGDPK{3} 0.000000 0.000000 0.00000 0.00000000
4. LGDPK{4} 0.000000 0.000000 0.00000 0.00000000
5. DLP{1} 0.000000 0.000000 0.00000 0.00000000
6. DLP{2} 0.000000 0.000000 0.00000 0.00000000
7. DLP{3} 0.000000 0.000000 0.00000 0.00000000
8. DLP{4} 0.000000 0.000000 0.00000 0.00000000
9. Constant 0.000000 0.000000 0.00000 0.00000000
Code: Select all
compute eq = %modeleqn(mdl, 1)
compute post_coeffs_from_eq = %eqncoeffs(eq)
display post_coeffs_from_eq
Code: Select all
1.14120 -0.02528 -0.14643 0.02425 -0.46959 -0.55113 0.29368 0.27940 0.00000