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
dataset normality issue (probit analysis)Hi all, I intending to employ simple probit, multinomial and Heckman selection model analysis to id…
If and commandHello, Can you help me please with my following issue? I have a panel data set and I want to figure…
Confidence intervals for gradients in npregressDear all, I'm trying to estimate confidence intervals for my gradients after performing a kernel re…
How do i include the results of a no observations regression into a matrix?So my problem is that i have a dataset of 502 firms but some of them have no observations. The thing…
Replacing value with previous value if value is outside certain intervalHi everyone, I have the following panel data (in total 1200 observations) Country Year ACC_POP A…
Subscribe to:
Post Comments (Atom)
0 Response to change in volume between the same months in different years
Post a Comment