In this post, I am looking into something that I have been wanting to look into for a while. This short notebook shows a mini investigation into work I did during my PhD.
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.2 ✔ readr 2.1.4
✔ forcats 1.0.0 ✔ stringr 1.5.0
✔ ggplot2 3.4.3 ✔ tibble 3.2.1
✔ lubridate 1.9.2 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(data.table)
Attaching package: 'data.table'
The following objects are masked from 'package:lubridate':
hour, isoweek, mday, minute, month, quarter, second, wday, week,
yday, year
The following objects are masked from 'package:dplyr':
between, first, last
The following object is masked from 'package:purrr':
transpose
In this notebook, I want to investigate more into a claim I made in my paper on pediatric drug safety:
We investigate the relationship between development stage and known pediatric drug effects, such as montelukast-induced psychiatric disorders, where we found a significant signal (odds ratio 8.77 [2.51, 46.94]) within the second year of life.
Now I’m not disputing this claim, I actually have this enrichment in the database I created:
# A tibble: 1 × 15
category atc_concept_name meddra_concept_name nichd atc_concept_class_id
<chr> <chr> <chr> <chr> <chr>
1 soc_atc5 montelukast Psychiatric disorders toddler ATC5
# ℹ 10 more variables: meddra_concept_class_id <chr>, a <int>, b <int>,
# c <int>, d <int>, lwr <dbl>, odds_ratio <dbl>, upr <dbl>, pvalue <dbl>,
# fdr <dbl>
The odds of 8.7708426 indicates a large association of statistically significant reporting of montelukast-induced Psychiatric disorders for toddlers.
But, these statistics were generated using a null threshold declaring significance. I’m interested to evaluate montelukast and Psychiatric disorders having larger signal at a particular stage. Here’s my visualizations to attempt to evaluate this:
From these, we can see how there are large, outlier scores for montelukast induced Psychiatric disorders at the toddler stage. The score distributions are similar across toddler and childhood stages, though. Nevertheless, the last graph shows that the signals in the toddler stage are above the null 99% scores in a larger proportion of the signal distribution. So empirically, we do see that montelukast-induced Psychiatric disorders are more likely (i.e. have larger, nonrandom signal) at the toddler stage of child development.
Since the last graph is the most definitive graph showing localization of non-random signal for this systematic disorder, we can create the graph for all montelukast-induced systematic disorders in order to evaluate non-random signal at stages:
You can see that few systematic disorders had higher-than-the-null signal at stages. Psychiatric disorders do seem to be uniquely induced in toddlers by montelukast.