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
xtregar commandHello, I am new to Stata and I am writing my thesis at the moment. In several papers, that are clos…
Calculating Inverse probability weights after multiple imputation with recurrent eventsDear All, I am doing recurrent event analysis (Anderson-Gill Model). I have around 15 co-variates e…
Building table with multiple variables using putexcelI want to create a simple table, where each row is a one of five response options (strongly agree, a…
calculating proportions by groupsI’m using administrative data (I’ve included an example below) and I am trying to calculate the prop…
margins, dydx() questionHi, Just a quick question. Just say you were to find a significant interaction between two categor…
Subscribe to:
Post Comments (Atom)
0 Response to Help with creating a variable with lagged values
Post a Comment