Good afternoon,

I have a data set with monthly observations for 16 different individuals (medicines), in a span of 8 years - data for quantities sold for each medicine, each month. It is organized such as the table below. I want to analyze the impact of the introduction of a generic medicine in that same market. However, it was introduced in the first 8 months of the study, so I recall that using ITSA wouldn't be recommended.
Time id Packages sold Gen introduction Packages sold in the total market
01/2010 1 100 0 ?
01/2010 2 25 0
01/2010 3 30 0
02/2010 1 110 0
02/2010 2 30 0
02/2010 3 25 0
03/2010 1 112 1
So, I'm thinking of using a fixed effects panel data regression and generating a dummy to access the impact of the introduction of the generic, but I have 2 main problems with that:
- to spurge my data of general fluctuations of the market, I was thinking of using a macro variable such as the packages sold in the overall medicine market. How do I generate this variable? Do I insert it in the original data, having the same value for the 16 monthly observations? if not, what would you recomend?
-my panel is unbalanced since some medicines are not available at certain months, and eventually get back in the market. What should I do to correct for this problem?

Thank you very much in advance for taking your time to help me, and sorry for the simplicity of the questions, I'm new to Stata. ​​​​

João