## Materials and Methods  
### Data  
Using an Application Programming Interface (API), we gathered tweets from the Twitter server with the words \"health insurance,\" \"health plan,\" \"health provider\" or \"doctor\" in them during open enrollment period from 1 November 2016 until 31 January 2017. This is the yearly period when U.S. citizens can enroll in or switch a health insurance plan. Beyond this timeframe, they have to stay with the plan they have. API is code that allows two software programs, in our case Twitter and Python 3.6, to communicate with each other. With the API, Python authenticated, requested, and received the data from the Twitter server. The words \"health insurance\" and \"health plan\" generated approximately one tweet every 3 s, adding up to 28,800 per day; 892,800 per month; and 2,678,400 total tweets during the ACA open enrollment season for 2017.  
We used the API to create a body of text, called \"VCorpus,\" in R 3.4. At each index of the \"VCorpus object,\" there is a PlainTextDocument object, which is essentially a list that contains the actual text data of the tweet, as well as some corresponding metadata such as the location from which the tweet was sent, the date, and other elements. In other words, the tweets were gathered in one text document and pre-processed for analysis. This pre-processing gets rid of punctuation, hashtags, and retweets, strips white space, and removes stop words and custom terms so that they are now represented as lemmatized plain words. To illustrate, the tweet text \"Obama care is a joke fr. My health care plan is just not affordable no more. Cheaper to pay the penalty I guess\" was changed to: \"obama care joke fr health care plan just affordable cheaper pay penalty guess\" after pre-processing.  
The most important way that text differs from more typical data sources is that text is naturally high-dimensional, which makes analysis difficult, often referred to as the \"curse of dimensionality.\" For example, suppose that a sample of tweets, each of which is 20 words long, and that each word is drawn from a vocabulary of 2000 possible words. It follows that the unique representation of these tweets has a very high dimensionality, with 40,000 data columns.  
To reduce dimensionality, we use the \"bag of words\" (BoW) model. The BoW model, also known as a vector space model, reduces dimensionality by simplifying the representation of the words used in natural language processing and information retrieval. In this model, a text document (such as a tweet) is represented as the bag (multiset) of its words, disregarding grammar and word order [38].  
Subsequently, our \"bag of words\" model learned a vocabulary from the millions of tweets and then modeled each tweet by counting the number of times each word appears in the tweet [38]. Through automatic text categorization, we extracted features or \"token sets\" from the text by representing the tweets by the words that occur in it.  
To explain how we converted text to numeric data, here is an example. Sentence 1: \"The health insurance plan is too expensive to cover my health needs\"; Sentence 2: \"The health insurance company offers an expensive health plan.\" We can see that, from these two sentences, our vocabulary is: [The, health, insurance, plan, is, too, expensive, to, cover, my, needs, company, offers, an]. To get the bags of words, the number of times each word occurs was counted in each sentence. In Sentence 1,\" health appears twice, and the other words each appear once, so the feature vector for Sentence 1 is: {1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0} and Sentence 2: {1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1} We created a Term-Document matrix (TDM) where each row is a 1/0 representation of whether a single word is contained within the tweet and every column is a tweet. We then removed terms with a sparse factor of less than 0.001. These are the terms that occur less than 0.01% of times in a tweet. The resulting matrix contained 1354 words.