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
Computing IPW estimator by handHello everyone, For my project, I try to know if a certain type of policy ("pol", which is a dummy)…
New to SSC mbitobit - Bivariate Tobit modelDear all, Thanks to Professor Baum, A new command is available in SSC. -mbitobit-. This command re-a…
Combining a newly constructed dummy variables to one categorical variable for analysis/refcatDear Statalist, I have currently created four variables about family status: 1) Parents living toge…
What kind of a binary regression model should I choose if I work with pool or panel data?Hello! I have a longitudinal dataset, which contains observations of individuals between 2008-2017.…
Difference between quietly gen, quietly test and quietly regress?Hi guys, I'm trying to replicate a paper but could not understand the meaning of the following comma…
Subscribe to:
Post Comments (Atom)
0 Response to Help with creating a variable with lagged values
Post a Comment