Skip to main content Accessibility help
Hostname: page-component-768ffcd9cc-b9rrs Total loading time: 0.343 Render date: 2022-12-06T03:12:59.548Z Has data issue: true Feature Flags: { "useRatesEcommerce": false } hasContentIssue true

Birds of the Same Feather Tweet Together: Bayesian Ideal Point Estimation Using Twitter Data

Published online by Cambridge University Press:  04 January 2017

Pablo Barberá*
Wilf Family Department of Politics, New York University, 19 W 4th Street, 2nd Floor, New York, NY 10012., e-mail:
Rights & Permissions[Opens in a new window]


HTML view is not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Politicians and citizens increasingly engage in political conversations on social media outlets such as Twitter. In this article, I show that the structure of the social networks in which they are embedded can be a source of information about their ideological positions. Under the assumption that social networks are homophilic, I develop a Bayesian Spatial Following model that considers ideology as a latent variable, whose value can be inferred by examining which politics actors each user is following. This method allows us to estimate ideology for more actors than any existing alternative, at any point in time and across many polities. I apply this method to estimate ideal points for a large sample of both elite and mass public Twitter users in the United States and five European countries. The estimated positions of legislators and political parties replicate conventional measures of ideology. The method is also able to successfully classify individuals who state their political preferences publicly and a sample of users matched with their party registration records. To illustrate the potential contribution of these estimates, I examine the extent to which online behavior during the 2012 US presidential election campaign is clustered along ideological lines.

Research Article
Copyright © The Author 2014. Published by Oxford University Press on behalf of the Society for Political Methodology 


Bafumi, J., Gelman, A., Park, D. K., and Kaplan, N. 2005. Practical issues in implementing and understanding Bayesian ideal point estimation. Political Analysis 13(2): 171–87.CrossRefGoogle Scholar
Bafumi, Joseph, and Herron, Michael C. 2010. Leapfrog representation and extremism: A study of American voters and their members in Congress. American Political Science Review 104(3): 519–42.CrossRefGoogle Scholar
Bakker, Ryan, de Vries, Catherine, Edwards, Erica, Hooghe, Liesbet, Jolly, Seth, Marks, Gary, Polk, Jonathan, Rovny, Jan, Steenbergen, Marco, and Anna Vachudova, Milada. 2012. Measuring party positions in Europe: The Chapel Hill expert survey trend file, 1999–2010. Party Politics.Google Scholar
Barberá, P. 2013. streamR: Access to Twitter Streaming API via R. R package available on CRAN. Scholar
Barberá, P. 2014. Replication data for: Birds of the same feather tweet together: Bayesian ideal point estimation using Twitter data. Dataverse Network, Scholar
Benoit, Kenneth, and Laver, Michael. 2006. Party policy in modern democracies. London: Routledge.Google Scholar
Bonica, Adam. 2013a. Database on ideology, money in politics, and elections. Scholar
Bonica, Adam. 2013b. Ideology and interests in the political marketplace. American Journal of Political Science 57(2): 294311.CrossRefGoogle Scholar
Bonica, Adam. 2014. Mapping the ideological marketplace. American Journal of Political Science 58:367–86.CrossRefGoogle Scholar
Boutet, A., Kim, H., Yoneki, E. 2012. What's in your Tweets? I know who you supported in the UK 2010 General Election. Proceedings of Sixth International AAAI Conference on Weblogs and Social Media. Palo Alto, California.Google Scholar
Bryant, J., and Miron, D. 2004. Theory and research in mass communication. Journal of Communication 54(4): 662704.CrossRefGoogle Scholar
Clinton, J., Jackman, S., and Rivers, D. 2004. The statistical analysis of roll call data. American Political Science Review 98(2): 355–70.CrossRefGoogle Scholar
Conover, M., Gonçalves, B., Ratkiewicz, J., Flammini, A., and Menczer, F. 2010. Predicting the political alignment of Twitter users. Proceedings of 3rd International Conference on Social Computing. Bethesda, Maryland.Google Scholar
Conover, Michael D., Gonçalves, Alessandro Flammini, Bruno, and Menczer, Filippo. 2012. Partisan asymmetries in online political activity. EPJ Data Science 1(1): 119.CrossRefGoogle Scholar
Conover, M. D., Ratkiewicz, J., Francisco, M., Goncalves, B., Flammini, A., and Menczer, F. 2011. Political polarization on Twitter. Proceedings of 5th International Conference on Weblogs and Social Media. Menlo Park, California.Google Scholar
Enelow, J. M., and Hinich, M. J. 1984. The spatial theory of voting: An introduction. New York, New York: Cambridge University Press.Google Scholar
Farrell, H. 2012. The Internet's consequences for politics. Annual Review of Political Science 15:3552.CrossRefGoogle Scholar
Fiorina, Morris P., and Abrams, Samuel J. 2008. Political polarization in the American public. Annual Review of Political Science 11:563–88.CrossRefGoogle Scholar
Garrett, R. K. 2009. Politically motivated reinforcement seeking: Reframing the selective exposure debate. Journal of Communication 59(4): 676–99.CrossRefGoogle Scholar
Gelman, A., Carlin, J. B., Stern, H. S., and Rubin, D. B. 2013. Bayesian data analysis. 3rd ed. Boca Raton, Florida: Chapman & Hall/CRC.Google Scholar
Gelman, A., and Hill, J. 2007. Data analysis using regression and multilevel/hierarchical models. New York, New York: Cambridge University Press.Google Scholar
Gelman, A., and Rubin, D. B. 1992. Inference from iterative simulation using multiple sequences. Statistical Science 7(4): 457–72.CrossRefGoogle Scholar
Gonzalez, R., Cuevas, R., Cuevas, A., and Guerrero, C. 2011. Where are my followers? Understanding the locality effect in Twitter. Arxiv preprint arXiv:1105.3682.Google Scholar
Gruzd, A., and Roy, J. 2014. Investigating political polarization on Twitter: A Canadian perspective. Policy & Internet 6:2845.CrossRefGoogle Scholar
Hoff, Peter D., Raftery, Adrian E., and Handcock, Mark S. 2002. Latent space approaches to social network analysis. Journal of the American Statistical Association 97(460): 1090–98.CrossRefGoogle Scholar
Iyengar, Shanto, and Hahn, Kyu S. 2009. Red media, blue media: Evidence of ideological selectivity in media use. Journal of Communication 59(1): 1939.CrossRefGoogle Scholar
Jackman, Simon. 2001. Multidimensional analysis of roll call data via Bayesian simulation: Identification, estimation, inference, and model checking. Political Analysis 9(3): 227–41.CrossRefGoogle Scholar
Jackman, Simon. 2012. Estimates of Members’ Preferences, 112th U.S. House and Senate. Retrieved on August 3, 2012, from /.Google Scholar
Jessee, S. A. 2009. Spatial voting in the 2004 presidential election. American Political Science Review 103(1): 5981.CrossRefGoogle Scholar
King, A., Orlando, F., and Sparks, D. B. 2011. Ideological extremity and primary success: A social network approach. Chicago, Illinois: Paper presented at the 2011 MPSA Conference.Google Scholar
Kwak, H., Lee, C., Park, H., and Moon, S. 2010. What is Twitter, a social network or a news media? Proceedings of 19th International Conference on World Wide Web. ACM, 591600.Google Scholar
Lax, Jeffrey, and Phillips, Justin. 2012. The democratic deficit in the States. American Journal of Political Science 56(1): 148–66.CrossRefGoogle Scholar
Lazarsfeld, P. F., Berelson, B., and Gaudet, H. 1944. The people's choice: How the voter makes up his mind in a presidential election. New York: Duell, Sloan and Pearce.Google Scholar
Linden, W. J., and Hamlbleton, R. K. 1997. Handbook of modern item response theory. New York: Springer.CrossRefGoogle Scholar
Lo, James, Proksch, Sven-Oliver, and Gschwend, Thomas. 2013. A common left-right scale for voters and parties in Europe. Political Analysis. Forthcoming.Google Scholar
Londregan, John. 1999. Estimating legislators’ preferred points. Political Analysis 8(1): 3556.CrossRefGoogle Scholar
Martin, Andrew D., and Quinn, Kevin M. 2002. Dynamic ideal point estimation via Markov chain Monte Carlo for the US Supreme Court, 1953–1999. Political Analysis 10(2): 134–53.CrossRefGoogle Scholar
McPherson, M., Smith-Lovin, L., and Cook, J. M. 2001. Birds of a feather: Homophily in social networks. Annual Review of Sociology 27:415–44.CrossRefGoogle Scholar
Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H., and Teller, E. 1953. Equation of state calculations by fast computing machines. Journal of Chemical Physics 21:1087–92.CrossRefGoogle Scholar
Mutz, D. C. 2002. Cross-cutting social networks: Testing democratic theory in practice. American Political Science Review 96(1): 111–26.CrossRefGoogle Scholar
Oken Hodas, N., and Lerman, K. 2012. How visibility and divided attention constrain social contagion. College Park, Maryland: Proceedings of 2012 International Conference on Social Computing.Google Scholar
Poole, K. T., and Rosenthal, H. 1997. Congress: A political-economic history of roll call voting. New York: Oxford University Press.Google Scholar
Poole, K. T., and Rosenthal, H. 2007. Ideology and Congress. 2nd ed. New Brunswick, New Jersey: Transaction Pub.Google Scholar
Shor, B., Berry, C., and McCarty, N. 2010. A bridge to somewhere: Mapping state and congressional ideology on a cross-institutional common space. Legislative Studies Quarterly 35(3): 417–48.CrossRefGoogle Scholar
Stan Development Team. 2012. Stan modeling language: User's guide and reference manual. Version 1.0.Google Scholar
Stroud, Natalie Jomini. 2008. Media use and political predispositions: Revisiting the concept of selective exposure. Political Behavior 30(3): 341–66.CrossRefGoogle Scholar
Sunstein, C. 2001. Princeton, New Jersey: Princeton University Press.Google Scholar
Wu, S., Hofman, J. M., Mason, W. A., and Watts, D. J. 2011. Who says what to whom on Twitter. Proceedings of 20th International Conference on Worldwide Web. ACM, 705–14.Google Scholar
Yardi, S., and Boyd, D. 2010. Dynamic debates: An analysis of group polarization over time on Twitter. Bulletin of Science, Technology & Society 30(5): 316–27.CrossRefGoogle Scholar
Supplementary material: PDF

Barberá supplementary material

Supplementary Material

Download Barberá supplementary material(PDF)
PDF 694 KB
You have Access
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the or variations. ‘’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Birds of the Same Feather Tweet Together: Bayesian Ideal Point Estimation Using Twitter Data
Available formats

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Birds of the Same Feather Tweet Together: Bayesian Ideal Point Estimation Using Twitter Data
Available formats

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Birds of the Same Feather Tweet Together: Bayesian Ideal Point Estimation Using Twitter Data
Available formats

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *