I would like to write the code to construct the following variable.
Cost stickiness it = ๐๐๐(ฮCost / ฮ๐๐๐๐)๐,๐1โ๐๐๐(ฮCos t / ฮ๐๐๐๐)๐,๐2
๐1,๐2 โ {๐กโ1,โฆ,๐กโ5} where ๐1 is the most recent of the last five years with an increase in sales and ๐2 is the most recent of the last five years with a decrease in sales;
Does anyone know how to write this code?
Thank you in advance!!
Related Posts with capture the trend in variable construction
spmap polygon sepearate graphsDear all, I'm trying to overlay EU NUTS2 and NUTS3 using spmap, but the polygon option doesn't combiโฆ
Same date or within 7 days, within two variablesDear statalist-members, I need to identify patients that got med1 and med2 on the same day, or withiโฆ
Checking DuplicationsI am trying to use xtset and I know how to remove any duplications. Is there a way to see if the nonโฆ
Obtain which bin and corresponding density each observation in plotted histogram belongs to?Hello everyone, Suppose I plot a histogram: Code: clear set obs 10 g z = _n replace z = 5 if _n โฆ
Simple percentiles using wide datasetHello, I'm not sure why I am having such trouble creating a variable corresponding to percentiles. โฆ
Subscribe to:
Post Comments (Atom)
0 Response to capture the trend in variable construction
Post a Comment