I would like to perform an interrupted-time-series analysis to assess the impact of a policy on medicine sales.
Products/medicines are divided into 2 categories (A and B). The policy is intended to have two effects: i) decrease the overall sales; and ii) increase the relative sales of B vs A (eg, if B currently accounts for 50% of total sales, the policy intends to increase this to 60%). The impact is expected to be gradual and/or lagged.
The data is set up as a panel with quarterly sales (2012-2017) of ~50 products. This data is available for 5 countries. The policy was introduced at the same time for all countries/products (Q3 2014). The outcome variable is sales units per population (rate). The data example below shows how the data is set up (dummy/incomplete data).
Does anyone have any advice on the best way to set this model up? I've tried using the user-written package itsa (ssc install itsa), but have come unstuck estimating the differing effects on category A and B products. I had also considered a poisson model for the count of units sold, offset for population.
Thank you for any advice you can provide.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(country year quarter t product) str1 category float(policy units population rate) 1 2014 1 1 1 "A" 0 100 1000 .1 1 2014 2 2 1 "A" 0 105 1000 .105 1 2014 3 3 1 "A" 1 120 1000 .12 1 2014 4 4 1 "A" 1 125 1000 .125 1 2015 1 5 1 "A" 1 130 1000 .13 1 2015 2 6 1 "A" 1 130 1000 .13 1 2014 1 1 2 "B" 0 60 1000 .06 1 2014 2 2 2 "B" 0 60 1000 .06 1 2014 3 3 2 "B" 1 40 1000 .04 1 2014 4 4 2 "B" 1 35 1000 .035 1 2015 1 5 2 "B" 1 32 1000 .032 1 2015 2 6 2 "B" 1 30 1000 .03 1 2014 1 1 3 "A" 0 125 1000 .125 1 2014 2 2 3 "A" 0 120 1000 .12 1 2014 3 3 3 "A" 1 145 1000 .145 1 2014 4 4 3 "A" 1 150 1000 .15 1 2015 1 5 3 "A" 1 152 1000 .152 1 2015 2 6 3 "A" 1 160 1000 .16 2 2014 1 1 1 "A" 0 40 750 .05333333 2 2014 2 2 1 "A" 0 35 750 .04666667 2 2014 3 3 1 "A" 1 45 750 .06 2 2014 4 4 1 "A" 1 50 750 .06666667 2 2015 1 5 1 "A" 1 51 750 .068 2 2015 2 6 1 "A" 1 50 750 .06666667 2 2014 1 1 2 "B" 0 40 750 .05333333 2 2014 2 2 2 "B" 0 40 750 .05333333 2 2014 3 3 2 "B" 1 40 750 .05333333 2 2014 4 4 2 "B" 1 35 750 .04666667 2 2015 1 5 2 "B" 1 37 750 .04933333 2 2015 2 6 2 "B" 1 35 750 .04666667 2 2014 1 1 3 "A" 0 60 750 .08 2 2014 2 2 3 "A" 0 65 750 .08666667 2 2014 3 3 3 "A" 1 80 750 .10666667 2 2014 4 4 3 "A" 1 85 750 .11333334 2 2015 1 5 3 "A" 1 87 750 .116 2 2015 2 6 3 "A" 1 90 750 .12 end
0 Response to Interrupted time series analysis with differing effect on specific subgroups
Post a Comment