Sunday, January 25, 2015

When it comes to measles, it is a small world after all

Dan Diamond wrote an essay recently in Forbes in which he notes the asymmetry of public reaction to Ebola versus measles. He describes how on the one hand, even though Ebola was unlikely to cause an epidemic in the US the public went nuts with Fearbola, while on the other hand measles represents a much more realistic threat of spread but people are somewhat apathetic about it. It seems a valid observation.

It may be difficult to understand public perception of threat when it comes to infectious disease, but, epidemiologically speaking, there are some important differences between the two, as partially summarized in the table below.



Measles Ebola
R0 ~7-18 ~2
Serial interval 8-12 days 5-15 days
Incubation period 10-12 days 2-12 days
CFR 3% 25-90%
Infectious period ~ 4 days before rash to several days after onset of rash At onset of symptoms
Vaccine preventable Yes No

Importantly, persons infected with measles virus are infectious before they begin to feel ill, so they are able to spread the virus in the course of their normal activities. Fearbola -- the epidemic of hyped and often unfounded messages surrounding the threat of Ebola to the US -- struck in part because of the high case fatality rate (CFR) and the lack of a vaccine conveying immunity to the Ebola virus. That contrasts strongly with measles. Even though the measles outbreak that started at Disneyland Resort Theme Parks in California is expanding, I doubt there will be a Fearmeasles epidemic, even though measles can be fatal and cause long term sequelae.

That said, this is a fascinating event due partially to people's attitudes regarding vaccines. Recently, the ramifications of such attitudes, in terms of implications for public health agencies, has been expressed very clearly by Lisa Aliferis (writing for NPR):
Local health officers in counties [in California] affected are busy tracing those who infected patients have been in contact with. Dr. Erica Pan, deputy health officer of Alameda County, says the county has shifted resources from Ebola preparedness to contact tracing for measles. Last year there were four cases of measles in Alameda County, she said, "but we had 400 contacts to investigate."
This is remarkable. On 23 January, the California Department of Health reported that in LA and Orange counties alone there were 31 confirmed cases. A simple back-of-the-envelope calculation suggests that if 4 cases required 400 contacts to be investigated (100 contacts per case on average), then 31 cases could require 3100 contacts to be investigated. No wonder health departments are refocusing resources away from Ebola and onto measles.

People who do not vaccinate their children, or catch up on missed vaccines as adults, do not only place themselves in danger of infection, they place the community in danger. Moreover, they cause scarce public health resources to be spent on controlling a vaccine preventable disease. It's ironic that the lyrics to It's a small world -- the theme song of a ride at Disneyland of the same name -- read
It's a world of laughter, a world of tears.
It's a world of hopes and a world of fears.
There's so much that we share,
That it's time we're aware
It's a small world after all. 
Indeed.

(image source: Wikipedia)

Friday, January 23, 2015

Recall bias, or how I learned to stop worrying about measles and love my vaccination beliefs

The multi-state outbreak of measles in the US, which originated at Disneyland theme parks in California, has received much attention in the press recently. Sadly, the event isn't terribly surprising: many people, including children, lack immunity. The reasons for this are varied, and include the MMR vaccine being recommended for children over 12 months of age; persons not completing the recommended vaccination sequence; waning immunity in older persons; and lack of vaccination.

This latter issue is related to the anti-vaccination movement and this dimension is receiving attention in the media. Some of the discourse is revealing. One example appeared in the New York Times recently, which quoted a Santa Monica pediatrician who has cautioned against the way vaccines are used in the past (but does administer the vaccine in his practice):
“I think whatever risk there is -- and I can’t prove a risk -- is, I think, caused by the timing,” he said, referring to when the shot is administered. “It’s given at a time when kids are more susceptible to environmental impact. Don’t get me wrong; I have no proof that this vaccine causes harm. I just have anecdotal reports from parents who are convinced that their children were harmed by the vaccine.”
Perhaps such comments could be rephrased more bluntly: I believe that the vaccine could be dangerous to kids because people who know less about medicine and epidemiology than I do tell me, with great conviction, that they think it's dangerous. Even blunter still might be: The idea that vaccines can be dangerous has a high truthiness, so count me in. Or even, After talking to some patients I've decided to stop worrying about measles and love my unfounded beliefs about vaccination.

I've written before about the importance of understanding those who subscribe to anti-vaccination notions. Statements like this from a physician illustrate how much work has to be done. Several years ago Delgado-Rodríguez and Llorca wrote a very nice continuing professional education paper on bias in epidemiology, which physicians with similar beliefs should read. The following passage is especially important:
Recall bias: if the presence of disease influences the perception of its causes (rumination bias) or the search for exposure to the putative cause (exposure suspicion bias), or in a trial if the patient knows what they receive may influence their answers (participant expectation bias). This bias is more common in case-control studies, in which participants know their diseases, although it can occur in cohort studies (for example, workers who known their exposure to hazardous substances may show a trend to report more the effects related to them), and trials without participants’ blinding.
If someone wants to find a cause for a medical event, they will. The plural of "anecdote" is not "data", no matter how convincing the anecdotes may seem.

(image source: Wikipedia)

Tuesday, January 20, 2015

New antibiotics: Prevention is important, too!

Klebsiella pneumoniaeLosee Ling et al recently described a new antibiotic compound, called teixobactin, that kills pathogens without detectable resistance. The abstract of their study notes that
. . . We developed several methods to grow uncultured organisms by cultivation in situ or by using specific growth factors. Here we report a new antibiotic that we term teixobactin, discovered in a screen of uncultured bacteria. Teixobactin inhibits cell wall synthesis by binding to a highly conserved motif of lipid II (precursor of peptidoglycan) and lipid III (precursor of cell wall teichoic acid). We did not obtain any mutants of Staphylococcus aureus or Mycobacterium tuberculosis resistant to teixobactin. The properties of this compound suggest a path towards developing antibiotics that are likely to avoid development of resistance.
It's a beautiful study, and obviously everybody hopes these implications are realized, and soon; new drugs are very badly needed. Eli Perencevich, writing in the blog Controversies in Hospital Infection Prevention, summarizes some of the important results from the study and also offers an important perspective,
I agree with Dr. William Schaffner's comments in the NY Times as he called the study/method “ingenious” yet also cautioned that "it’s at the test-tube and the mouse level, and mice are not men or women, and so moving beyond that is a large step, and many compounds have failed.” I would add one additional caveat  -- teixobactin had little activity against most Gram-negative bacteria including E. coli, Klebsiella and Pseudomonas. . . . Since the real resistance crisis is in multi drug-resistant Gram-negatives (think CRE, NDM-1), we better get back to digging in the dirt.
Certainly, these and other Gram negatives are important. As I've mused before, it's critically important to research infection prevention approaches in addition to investing in new drug development. We must understand how to prevent infections from occurring and spreading in healthcare (and other) settings before new drugs are introduced. It is clear that we do not possess this understanding, at least on any significant scale or in any sustainable way, at present.

(image source: CDC)

Friday, January 2, 2015

Blogging in R

Previous posts have discussed how computers, IT, and open source software have made incredible strides in recent years and how those advances are helpful for infectious disease epidemiology. On that theme, I recently found something very cool, which is illustrated here: This entire post was written in the RStudio IDE using the markdown and knitr packages in R.

Markdown is a text-to-HTML conversion tool that allows conversion of prose into structurally valid XHTML or HTML. Details can be found at http://rmarkdown.rstudio.com and a short tutorial is available at https://support.rstudio.com/hc/en-us/articles/200552086-Using-R-Markdown. knitr is an engine for dynamic report generation with R. It is possible to produce sophisticated documents that include bibliographic referencing and mathematical typesetting using markdown and knitr. Moreover, one can generate documents with embedded chunks of R code in order to display the code itself and/or the output.

As a simple example, below is a word cloud made from searching the Twitter API for tweets containing the terms “vaccine” or “vaccinated” in a 24 hour period. The code is shown first (it could be written better, clearly), followed by the output:

rm(list=ls())

library(twitteR)
library(tm)
library(wordcloud)
library(RColorBrewer)
library(RJSONIO)

#====================================================

path_var <- "~/Dropbox/Docs/Blogs/"
auth_var <- "my_oauth.Rdata" 
load(paste(path_var, auth_var, sep=""))
registerTwitterOAuth(my_oauth)

the_search_term <- "-RT vaccine OR vaccinated"
today <- as.character(Sys.Date())
yesterday <- as.character(as.Date(today) - 1)

max_tweets <- 300 
the_filename <- paste(path_var, "twitter_", today, ".csv", sep="")

the_search <- searchTwitter(searchString=the_search_term, 
                            n=max_tweets, 
                            since = yesterday, 
                            until = today)
  
tweets_df <- twListToDF(the_search)
write.csv(tweets_df, file=the_filename)
search_text = sapply(the_search, function(x) x$getText())
search_corpus = Corpus(VectorSource(search_text))

tdm <- TermDocumentMatrix(
  search_corpus,
  control=list(
    removePunctuation=TRUE,
    stopwords=c("amp", "vaccine", "vaccinated", 
                  stopwords("english")), 
    removeNumbers=TRUE, 
    tolower=TRUE)
) # Note we do not display the search terms in the cloud 

m <- as.matrix(tdm)
word_freqs <- sort(rowSums(m), decreasing=TRUE)  
dm <- data.frame(word=names(word_freqs), freq=word_freqs)
layout(matrix(c(1, 2), nrow=2), heights=c(1, 4))
par(mar=rep(0, 4))
plot.new()
fh <- paste("Twitter search API, ", 
            length(tweets_df[,1]), " tweets returned, ", 
            today, sep="")
text(x=0.5, y=0.5, fh)
wordcloud(dm$word, dm$freq, min.freq=5, 
          random.order = FALSE, 
          random.color=FALSE, 
          max.words=Inf, colors = brewer.pal(8, "Dark2"))

The user can control whether the R code appears in the document or not.

This blog was “knitted” into HTML with a single click, and the resulting HTML code was pasted into the blogspot composition tool. A very small amount of editing of this code was needed to make it work on the blogspot.com platform (though the R code is supposed to be depicted in a gray box, so there is at least one thing to sort out as a purest). Voila.

Were it necessary to change the code for some reason, say to add a new API search term or update the word cloud for the same search in a week – or even to fix a bug – then the resulting HTML document can be regenerated and the update published, seamlessly. Thus, R has become a method for producing dynamic documents. Imagine the power of working collaboratively with others through an R Markdown document saved in a shared folder (e.g., in Dropbox).

Do I plan on preparing future blogs in R? No -- it’s not a document preparation environment per se, and the other tools at my disposal are more than sufficient. However, if I were writing a blog that updated figures daily, weekly, or monthly based on changing data, or wanted to share fragments of code, say, I probably would use it.

Getting back to epidemiology, the word cloud is interesting. It shows that people are tweeting about the high levels of flu activity (see, e.g., http://www.cdc.gov/flu/) at present, as well as other topics including Ebola, cancer, and fraud. By reviewing the text of the tweets themselves (which is possible by inspecting the object “tweets_df” in R), a better sense of the diversity of conversation surrounding vaccines and vaccination can be had.