# Socioeconomic Correlates of Anti-Science Attitudes in the US
## 2 Materials and Methods
### Measuring Anti-Science Attitudes  
Previous studies [24; 25] inferred user attitudes from the ideological polarities of information sources to which they attend. Attention is indicated by links to pay-level domains (PLDs) embedded within the content they share with others on social media. We curated pro-science and anti-science PLDs from _Media Bias-Fact Check_ (mediabiasfactcheck.com/, accessed on 16 June 2021) with PLDs categorized under _pro-science_ constituting the former, while those categorized as _conspiracy_ and _questionable sources_ making up the latter. Table 1 provides examples of sources under this categorization. We quantified a user's attitudes toward science as the fraction of links belonging to each category among all anti-science and pro-science PLDs the user shares. Specifically, we extracted PLDs shared by users in the dataset and filtered for relevant PLDs present in the Media Bias-Fact Check list. For each user, we computed two domain scores \(\delta_{i,Pro}\) and \(\delta_{i,Antti}\):  
\[\delta_{i,d}=\frac{\Sigma D_{i,d}}{|D_{i}|};\ \ \forall d\in\{\text{Pro-Science, Anti-Science}\} \tag{1}\]  
where \(\delta_{i,Pro}\) and \(\delta_{i,Antti}\) are the pro-science and anti-science domain scores for \(user_{i}\). \(D_{i}\) represents the set of PLDs shared by \(user_{i}\). Using this procedure, we obtained domain scores for 87,260 users with \(|D_{i}|\geq 3\) in our training dataset. Text representation techniques discussed in [29; 30; 31] helped us generate the dense and accurate representations of user content as compared to high-dimensional but sparse representations using TF-IDF weighted content vectors [21]. _Sent2 Vec_ ([[https://github.com/epfml/sent2](https://github.com/epfml/sent2) vec]([https://github.com/epfml/sent2](https://github.com/epfml/sent2) vec), accessed on 16 June 2021) provided an easy-to-use Python package to employ pre-trained _fastText_ models to generate embeddings for tweets in our dataset. Following the methodology described in [25], we pre-processed tweets by removing hashtags, URLs, mentions, special characters, and stopwords using _Tweet-Preprocessor_ ([[https://github.com/s/preprocessor](https://github.com/s/preprocessor)]([https://github.com/s/preprocessor](https://github.com/s/preprocessor)), accessed on 16 June 2021). Inferring the polarity of individual tweets can yield noisy results with some tweets that are not consistent with the sufficient and necessary content to decide polarity. Hence, we concatenated all tweets generated by a user to form documents for each user. Using the _sent2 vec_twitter_unigrams_ pre-trained model, we then generated 700 dimension vectors to represent these user documents. We categorized users with \(\delta_{i,Pro}>0.5\) as _pro-science_ and ones with \(\delta_{i,Pro}\leqslant 0.5\) as _negpro-science_. Similarly, we grouped users with \(\delta_{i,Anti}>0.5\) as _anti-science_ and the rest as _-anti-science_. Using the 87,260 users thus categorized as the ground truth, we trained two logistic regression classifiers--\(LR_{Pro}\) and \(LR_{Antti}\)--to predict whether a user is _pro-science or not_ or _anti-science or not_, respectively. Table 2 shows that the classifier achieves ideal performance in 5-fold cross validation in both micro and macro average performance. From the trained logistic regression classifiers, \(LR_{Pro}\) and \(LR_{Antti}\), we obtained normalized scores \(\hat{\delta}_{i,Pro}\) and \(\hat{\delta}_{i,Antti}\), respectively. In order to integrate the information provided by both \(LR_{Pro}\) and \(LR_{Antti}\), we proposed the anti-science propensity score \(\hat{\rho}_{i,Antti}\) to quantify anti-science attitudes:  
\[\hat{\rho}_{i,Antti}=\hat{\delta}_{i,Anti}-\hat{\delta}_{i,Pro}. \tag{2}\]  
\(\hat{\rho}_{i,Antti}\in[-1,+1]\) describes the extent of agreement between \(LR_{Pro}\) and \(LR_{Antti}\) and facilitates the consideration of users who generate relevant pro or anti-science content.