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
ReshapeHello I would appreciate if someone can tell me the command that would reshape my data from 201…
étude en données de panel.rsquared of fixed effectfrançais Hello, My name is Gibran. I am doing a panel data study on the causes of deforestation in U…
Oaxaca command not workingI am trying to run the oaxaca command and it keeps saying that it does not recognize it. Does anyone…
Conditional sum on STATAHi, I have a dataset with the following variables: - Brand (41 brands in total) - product identifie…
How to control for age when I have the % of people at each ageHi, Currently my data looks like this [CODE] * Example generated by -dataex-. To install: ssc insta…
Subscribe to:
Post Comments (Atom)
0 Response to Help with creating a variable with lagged values
Post a Comment