# A Framework to Understand Attitudes towards Immigration through Twitter
## 2 Background
### Social Media Analysis in the Study of Human Behaviour  
To discuss social media analysis from three perspectives: human behaviour, attitude classification and psycholinguistic analysis. We focus on the analysis of the micro-blogging platform Twitter.  
Researchers from different disciplines have used data extracted from the Twitter platform to study psychological and socio-cultural characteristics of communities. Some examples include: personality differences between Democrats and Republicans [42], influence of diurnal and seasonal variability on mood [43], happiness associated with Christianity/atheism [44], political polarisation [45], influence of culture on personal actions [46], prediction of attitudes in response to a trigger event [47], measurement of the level of integration of immigrants in different cities of the world [48], among others. When the analysis is about groups of people, Twitter data highlights its potential use in the detection of hate speech [49], i.e., threatening, harassing or seriously offensive language, as well as to characterise hateful users [50]. The detection of hate speech against immigrants is a particular case of the general framework of hate speech detection. Several studies have used Twitter data to study hate speech against immigrants [18; 19; 20; 21; 22]. [PERSON] et al. [22] model and characterise anti-immigrant hate speech on Twitter in Spain. They find that hate speech against immigrants includes Islamophobia, rejection of public support towards the immigrant group, and has a greater presence of offensive than violent language.  
In this context, we develop a mixed approach grounded on the theories about attitude formation instead of following a hate speech approach, which is limited to hate but not necessarily opposition/approval or feelings of threat/empathy toward migration. Each formation theory defines an attitude, and, in cases where the classifier confidence is low, we define an _undisclosed_ stance to account for participation in the debate without disclosing attitude [51]. Particularly, we build upon our previous work to classify users into attitudes as political stances using a tree-based classifier [17]. As stances, attitudes are not always explicit, and thus, they must be predicted. Two types of features are commonly used for prediction. On the one hand, stance can be predicted using network interactions, based on the assumption that like-minded individuals are more likely to interact [52; 53]. On the other hand, lexical analyses have shown to allow predicting stance as vocabularies within stances tend to have strongly associated words [54; 55], and even other non-textual cues such as emojis [17].  
A related area to attitude classification is sentiment analysis. In general, such methods extract the polarity of a text in terms of positive, neutral, and negative intents [56; 57]. These measures may be correlated to attitudes, however, empathetic tweets about migration could speak negatively about discrimination, and threat-related tweets could speak positively about the country, making the interpretation of the results difficult. However, we perform one type of emotional analysis when characterising the content published by users in each attitude. We use the Linguistic Inquiry and Word Count (LIWC) psycholinguistic lexicon [58] to distinguish multidimensional aspects of the migratory discussion. These aspects include multiple emotions and other topical dimensions of expression, which may be compared between attitudes. LIWC usage with social media data includes identifying health issues [59; 60], predicting political sentiment [61], and understanding perception about the transportation experience [62]. The Spanish version has been validated experimentally [63], enabling its consideration in our work.