I am trying to perform an EC model but I do not know how to specify the last two elements (EC term) of the following equation in Stata:
Array
where R is the retail price and W is the wholesale price of a product. Plus and Minus indicate when the first difference is positive (increase) or negative (decrease).
I create the first four elements in the equation using the following code
Code:
gen Ri = d.R if d.R > 0 replace Ri = 0 if Ri == . gen Rd = d.R if d.R > 0 replace Rd = 0 if Rd == . gen Wi = d.W if d.W > 0 replace Wi = 0 if Wi == . gen Wd = d.W if d.W > 0 replace Wd = 0 if Wd == .
Code:
ardl y x, lags(# #) ec
Code:
ardl R Ri Rd Wi Wd, lags(# # # # #) ec1
Code:
estat ectest
The lag numbers have been chosen using AIC.
Thanks in advance
0 Response to Error Correction Model: Specification in Stata
Post a Comment