Hi, I have variables Jan_13 to Mar_21, referring to months January 2013 to March 2021. I need to create new variables containing the results of current month/previous month. Ex. Feb_13_PR = Feb_13/Jan_13.
How can I automate this computation for all months through looping? Thank you.
Related Posts with Dividing series of variables through looping
Long Data Format: Creating a New Variable with Values Conditional on Combination of Values of Other Variables Across Many ObservationsHello! I am stuck not knowing how to create a variable I need based on my current data. I have a l…
Why is Stata calculating percentiles in the way it does, and who has said that this is the way to calculate percentiles?The definition of a percentile I have been taught, is (1) Q(p) = F^(-1)(p) = inf{x: F(x)>=p}, 0&…
Joint modelling of binary longitudinal outcomes in using random effects approachHi everyone, I would like to jointly model two binary repeated outcomes in STATA using the random ef…
total dose per day with multiple dates and times Code: * Example generated by -dataex-. To install: ssc install dataex clear input int(date_daily_3…
Negative lower confidence interval boundary for variance with nlcom after a multilevel logistic regressionHello, I am conducting a multilevel logistic regression to identify determinants of the availabilit…
Subscribe to:
Post Comments (Atom)
0 Response to Dividing series of variables through looping
Post a Comment