Hi all,
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 == .
In general, the code for an EC model in Stata is:
Code:
ardl y x, lags(# #) ec
In my specific case is the following code correct? and how can I specify in Stata the last two elements in the equation?

Code:
ardl R Ri Rd Wi Wd, lags(# # # # #) ec1
of course, I have previously checked the order of integration of R and W (both are I(1)) and if there is cointegration between these two using
Code:
estat ectest
. This test says to me that there is cointegration.
The lag numbers have been chosen using AIC.

Thanks in advance