Code: Select all
create u 1 1000
scalar rho = 0.6
scalar beta = 5
series z = 0
series x = 0
smpl @first+1 @last
series z = rho* z(-1) + nrnd 'so Z is a stationary AR(1) + nrnd
series x = x(-1) + nrnd 'so X is a non-stationary random walk + nrnd
series y = beta*x + z 'so y is a non-stationary random walk + AR(1) + nrnd where y is a function of X and Z
I am planning a simulation. How, do we simulate that e.g. Y X1 X2 X3 and X4 are cointegrated. What is the cointegration vector? Please change the program with these variables instead.
Any pedagogical information about the topic on a basic level is appreciated. Thanks for your assistance!
