Loft of an Eldritch Metaphor

pharmacovigilance of AEs on Twitter

Posted on 29 May 2016

I was reading a paper on leveraging Twitter as a source for adverse events (AEs) reporting for pharmaceutical drugs (DOI). I found this paper by accident when I was visiting Twitter’s engineering website, specifically on their research publications web page. You never know what you are going to see, until you see it.

The paper’s abstract is to solve one problem with traditional reporting for AE. Instead of relying on doctors and pharmacists to collect AE reports from patients, harvesting data from Twitter might be apt under the impression that patients nowadays prefer to use social media to share their experiences consuming certain kind of drugs, because that might be more convenient for them. Recording data for AEs is important to know the worst possible outcome of consuming certain drugs.

For example, drug A won’t be effective to person B, because person B might have a genetic problem that would make drug A to be really dangerous when consumed (pharmacogenomics). This piece of information is important to make sure drug A is effective for everyone, or we can warn people about its worst potential outcome.

But there is one problem with that. Having doctors and pharmacists to record and curate AE reports eliminate one big problem: signal-to-noise ratio (SNR). Such luxury is hard to obtain with social media. Let’s take a quick look at their methods.


English-language Twitter posts were monitored. Those were the ones that mentioned 23 pharmaceutical products from November 1st 2012 till May 31st 2013 (about 7 months). To fix the problem with SNR, semi-automated process was set up to identify tweets with resemblance to AEs, termed as proto-AEs. Search term inputs were the 23 pharmaceutical products:

  1. Acetaminophen (Tylenol, Paracetamol): painkiller and fever-reducer.
  2. Adalimumab (Humira, Exemptia): an inhibiting anti-inflammatory drug.
  3. Alprazolam (Xanax): treating panic disorder and anxiety disorder.
  4. Citalopram (Celexa): SSRI-class antidepressant drug.
  5. Duloxetine (Cymbalta): SNRI-class antidepressant drug.
  6. Gabapentin (Neurontin): to treat seizures and neuropathic pain.
  7. Ibuprofen: painkiller, fever-reducer, and anti-inflammatory drug (NSAID).
  8. Isotretinoin (Accutane): treating (cystic) acne.
  9. Lamotrigine (Lamictal): treating epilepsy (anticonvulsant), depression, and bipolar disorder.
  10. Levonorgestrel (Plan B): birth control pill.
  11. Metformin (Glucophage): treating type 2 diabetes.
  12. Methotrexate: treating cancer, autoimmune disease, and induction of medical abortion.
  13. Naproxen (Aleve, Naprosyn): painkiller, fever-reducer, and anti-inflammatory drug (NSAID).
  14. Oxycodone: semi-synthetic opioid, to relieve severe or chronic pain.
  15. Paroxetine (Paxil, Seroxat): SSRI-class antidepressant drug.
  16. Prednisone: synthetic corticosteroid drug, anti-inflammatory.
  17. Pregabalin: treating epilepsy, neuropathic pain, and anxiety disorder.
  18. Sertraline (Zoloft): SSRI-class antidepressant.
  19. Tramadol: opioid, to relieve severe or chronic pain.
  20. Varenicline (Chantix, Champix): treating nicotine addiction.
  21. Venlafaxine Effexor, Viepax, Trevilor): SNRI-class antidepressant drug.
  22. Warfarin (Coumadin): anticoagulant drug.
  23. Zolpidem (Ambien): a sedative, treating insomnia.

They also filtered for vaccines for influenza, HPV, HepB, and DTaP. I am not going there.

I am not going to bore you with the algorithm used to classify the proto-AE reports. Instead, let’s take a look at the numbers.


Out of 6.9 million tweets, the algorithm filtered for potential proto-AEs, comprising about 61,401 tweets. From there, only 7.2% tweets were manually classified as being proto-AEs, while the rest were not. From those 7.2%, we now arrive to this chart.

Occurence of Proto AEs

Click to enlarge the chart above. It is interesting to see people were complaining a lot more about ibuprofen (painkiller). Common off-the-shelf ibuprofen comes in 200 mg pill. For it to work, the dosage varies for different applications. For fever: 200 - 400 mg, to relieve inflammation: 400 - 800 mg. Treating severe pain might not be enough with just ibuprofen (NSAID). You might need to consume oxycodone (opioid). Thus we can infer that either people were not taking sufficient dosage, or wrong drug.

I was interested to see look at the proto-AEs concerning mental health. Alprazolam (Xanax) scored the highest (332 proto-AEs), followed by Sertaline (Zoloft, 67 proto-AEs). However, I don’t feel comfortable to draw any conclusion from this data. This is because, based on what I heard, people with mental illness with try their best to keep other people from knowing they have issue with their mental well-being (and this might include tweeting as well).

Here I have 3 suggestions:

  1. Would it be cool if we also include proto-AEs data on “study drugs” like Adderall and Ritalin? Would it be cumbersome to have data in the form of time-series, so we can observe the peaks of proto-AE reports? I bet it might be during exams.
  2. What about time-series data on Ambien and Xanax? To know when people feel they need to sleep, and when anxiety disorder strikes in.
  3. Do we have data on legally-dispensed drugs? Because if we could infer correlation of dispensed drugs and proto-AE reports, that might shed some light.