
Twitter (X) data list for U.S. state legislators (10-state subset)
Source:R/data.R
state_twitter.RdThis data object is data derived from the Twitter (X) interactions between U.S. state legislators, which is a subset of the data analyzed in Fritz et al. (2025).' The data is filtered to include only legislators from 10 states (NY, CA, TX, FL, IL, PA, OH, GA, NC, MI) and is further subset to the largest connected component based on mention or retweet activity.
This object contains the main iglm.data object and 5
pre-computed dyadic covariates.
Usage
data(state_twitter)Format
A list object containing 6 components. Let N be the number of
legislators in the filtered 10-state subset.
- iglm.data
A
iglm.dataobject (which is also alist) parameterized as follows:x_attribute: A binary numeric vector of length N. Value is1if the legislator's party is 'Republican',0otherwise.y_attribute: A Poisson numeric vector of length N. Represents the count of hatespeech incidents (actors_data$number_hatespeech) for each legislator.z_network: A directed edgelist (2-column matrix) of sizen_edges x 2. A tie(i, j)exists if legislatorieither mentioned or retweeted legislatorj.neighborhood: A directed edgelist (2-column matrix). Represents the follower network, where a tie(i, j)exists if legislatorifollows legislatorj. Self-loops (diagonal) are included.
- match_gender
An N x N
matrix.matrix[i, j] = 1if legislatoriand legislatorjhave the same gender,0otherwise.- match_race
An N x N
matrix.matrix[i, j] = 1if legislatoriand legislatorjhave the same race,0otherwise.- match_state
An N x N
matrix.matrix[i, j] = 1if legislatoriand legislatorjare from the same state,0otherwise.- white_attribute
A 1 x N
matrix(a row vector).matrix[1, i] = 1if legislatoriis 'White',0otherwise.- gender_attribute
A 1 x N
matrix(a row vector).matrix[1, i] = 1if legislatoriis 'female',0otherwise.
References
Gopal, Kim, Nakka, Boehmke, Harden, Desmarais. The National Network of U.S. State Legislators on Twitter. Political Science Research & Methods, Forthcoming.
Kim, Nakka, Gopal, Desmarais,Mancinelli, Harden, Ko, and Boehmke (2022). Attention to the COVID-19 pandemic on Twitter: Partisan differences among U.S. state legislators. Legislative Studies Quarterly 47, 1023–1041.
Fritz, C., Schweinberger, M. , Bhadra S., and D. R. Hunter (2025). A Regression Framework for Studying Relationships among Attributes under Network Interference. Journal of the American Statistical Association, to appear.