Why does RATS ignore the CMOM option in SYSTEM/ESTIMATE?
Posted: Thu Jan 07, 2016 1:57 pm
Consider this code, in RATS 9.0:
The linear regression with the CMOM option outputs:
while omitting the CMOM option gives:
as expected. However, the VAR estimation with and without the CMOM option displays the same output:
I was hoping to use the CMOM option to ensure that my code uses exactly the same sample period, across every univariate and multivariate specification in my code. Is this a bug, or is this the intended behaviour? If this is the intended behaviour, how can I ensure that I do use precisely the same sample across every specification?
Code: Select all
calendar(q) 1969 1
compute begin_samp = 1969:1
compute end_samp = 2012:4
compute max_lags = 8
smpl begin_samp end_samp
open data "data.xls"
data(format = xls, org = columns)
close data
cmoment(noprint) begin_samp end_samp
# dlgdpk{0 to max_lags} dlcnsk{0 to max_lags} lgdpk{0 to max_lags} lcnsk{0 to max_lags} constant
linreg(cmom, print) dlgdpk
# dlgdpk{1 to 2}
linreg(print) dlgdpk
# dlgdpk{1 to 2}
system(model = mdl, cmom)
variables dlgdpk dlcnsk
lags 1 to 2
deterministic constant
end(system)
estimate(model = mdl)
system(model = mdl)
variables dlgdpk dlcnsk
lags 1 to 2
deterministic constant
end(system)
estimate(model = mdl)
Code: Select all
linreg(cmom, print) dlgdpk
# dlgdpk{1 to 2}
Linear Regression - Estimation by Least Squares
Dependent Variable DLGDPK
Quarterly Data From 1969:01 To 2012:04
Usable Observations 167
Degrees of Freedom 165
Skipped/Missing (from 176) 9
Centered R^2 0.0589709
...
Code: Select all
linreg(print) dlgdpk
# dlgdpk{1 to 2}
Linear Regression - Estimation by Least Squares
Dependent Variable DLGDPK
Quarterly Data From 1969:04 To 2012:04
Usable Observations 173
Degrees of Freedom 171
Centered R^2 0.0310736
...
Code: Select all
system(model = mdl, cmom)
variables dlgdpk dlcnsk
lags 1 to 2
deterministic constant
end(system)
estimate(model = mdl)
VAR/System - Estimation by Least Squares
Quarterly Data From 1969:04 To 2012:04
Usable Observations 173
...