I have a hospital dataset declared as a time series with panel data with monthly observations.
Volumes for certain procedures are aggregated to hospital level, and there are some months were no procedures took place, therefore there are missing months for some hospitals
I am comparing volume changes from one month, say February 2020, to February 2019, and so on
I am trying to find a way to calculate this using stata. I have tried a few approaches:
gen absolutechange=episodeid[_n] - episodeid[_n-12]
this does not work as I have missing months for some of the sites
and
gen absolutechange= episodeid[monthly] -episodeid[monthly-12]
I am not sure why the above doesn't work
Does anyone have any suggestions?
Thank you so much in advance
Related Posts with change in volume between the same months in different years
How to test moderating effect in time series analysis?Hi all, I am beginner in analyzing data with STATA. I have some problem to choose the suitable meth…
Is it ok to apply the inverse hyperbolic sine transformation to one variable and the natural log transformation to other variables?Hi Statalist. I have a conundrum. I have several variables to which I need to apply the log transfor…
Matching female/male observations with closest values & limiting by year & industryHelp! I am trying to find a male match for each female observations. There are many more male than f…
Fill up missing string variableHi, I am trying to fill up the missing string variable. The current data is: Code: * Example gene…
wanted = 1 if cumulative 15 trading days of risk = 1Dear All, I found this question here https://bbs.pinggu.org/thread-7813996-1-1.html。The data set is …
Subscribe to:
Post Comments (Atom)
0 Response to change in volume between the same months in different years
Post a Comment