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
Region and year fixed effects model for pooled cross sectional dataDear all, I have a dataset of pooled cross sectional data for individuals across a number of differ…
Probit RegressionHi, I have a question according to a probit regression. The variable Format is 1 if a company switch…
Hsiao Li Racine test for correct specification of parametric regression modelsHello, I am searching but have no luck in finding the stata code for the Hsiao Li Racine test that c…
Standardising variables ***Stata newbie***Hi all, I am trying to standardise 'ethnicity' variable into four categories: 1. white 2. black 3.…
Synthetic control method: how to select V matrixDear all, I am learning Synthetic Control method, Stata has command Code: synth . When I read th…
Subscribe to:
Post Comments (Atom)
0 Response to change in volume between the same months in different years
Post a Comment