Hey guys,
I am currently a final year student and i am writing my Economics dissertation on Oil prices. I am trying to mathematically create the command for the variable (Net Oil price increase) shown below. OPt is the current oil price variable and OPt-1...OPt-6 is it's lagged values. Your help would be much appreciated!
𝑁𝑂𝑃𝐼𝑡 = max{0, 𝑜𝑝𝑡 − max{𝑜𝑝𝑡−1, 𝑜𝑝𝑡−2, 𝑜𝑝𝑡−3, 𝑜𝑝𝑡−4, 𝑜𝑝𝑡−5, 𝑜𝑝𝑡−6}
Related Posts with Help with creating a variable with lagged values
New to SSC mbitobit - Bivariate Tobit modelDear all, Thanks to Professor Baum, A new command is available in SSC. -mbitobit-. This command re-a…
hausman test problemDear all, I am working with panel data and when I use the command: hausman fe re, force, I get the…
Kolmogorov – Smirnov Test for panel databaseHello! I want to perform the Kolmogorov –Smirnov test to a panel database given that it is a freque…
Bar Chart PercentilesHello, I plotted a bar graph of the education level agains the mean of the average pay. Because of …
Create a new variable based on observations within a groupHello, my dataset is structered the following: clear input float (group_id won_close_dummy loss_cl…
Subscribe to:
Post Comments (Atom)
0 Response to Help with creating a variable with lagged values
Post a Comment