I have data on the drugs that people are taking at a given time point. I would like to observe the differences in which drugs people are taking at two different time periods e.g. comparing summer/winter. What I have is individual prescriptions for each patient, so I can count the number of times each particular drug was prescribed.
What I've currently done is calculate the distribution over drugs for each time period and gotten two probability distributions. Then, to identify which drugs are prescribed differently between the time periods, I've used a two-sample z-test of proportions. Because I'm looking at a lot of different drugs, I used FDR correction for multiple comparisons. To find interesting drugs, I look at the log-fold change and the p-value.
My first questions is: Does this sound reasonable?
My other concern is that, for instance, since the COVID pandemic started, I get the felling that a lot more prescriptions were given out of a particular medication e.g. vitamin D supplement. This could end up skewing the overall distribution. In this case, I'd guess that looking at the raw count data would be better than comparing distributions. What might be a reasonable way to approach this?