Handbook of Regression Modeling in People Analytics: With Examples in R and Python,

The Bayesian IRT convergence diagnostic is considered, and the probit model is applied to estimate the voting choice probability of each legislator. The multidimensional IRT is demonstrated on the roll call data from the 89th U.S. Senate during 19671969 period of congressional history, used also in the chapter 3. Two-dimensional plotting of the 90% HPD (highest posterior density) is shown, with the x-axis of liberal-conservative ideology, and the y-axis of regional/racial differences in legislators’ views. In the same scales, the results on the legislators and party groups’ locations from the IDEAL and W-NOMINATE application of different packages and functions are presented. Problems of identification of the model parameters and a minimally restricted solution are also discussed. Different functional forms to model legislators’ utility functions are described, including the Gaussian normal function and quadratic function used in DW-NOMINATE and in Bayesian IRT, respectively. The so-called α-NOMINATE uses a mixture model that nests the Gaussian and quadratic forms in the legislator utility function with an added α-parameter. This approach is applied via the anominate package in R for analyzing the structure of legislators’ utility functions in the 111th U.S. Senate. The IRT in application to the analysis of ordinal choice data and the measurement of latent ideology over time in dynamic models are also considered. The Bayesian mixed factor analysis model implemented in the MCMCordfactanal() function in MCMCpack package is equivalent to the standard two-parameter IRT model with a probit link, for the polytomous or ordinal data. This function is applied to the data from the 2004 ANES, used also in the chapters 2 and 4. The results of the ordinal IRT scaling of responses is presented in the scatter plot of ideal points in voting for Bush vs Kerry, and the outcomes of the probit model choice probability estimates are given by Democratic, Independent, and Republican parties. Estimating latent constructs over time and exploiting the temporal structure is accomplished by incorporating a random walk prior on the latent variable, that is demonstrated using data from the Comparative Manifestos Project which codes political party manifestos in every election across roughly 50 countries since 1945. The massive and novel data sets appear in more exotic quantities such as word usage by political candidates and parties or the network of relationships between political actors on social media platforms, when researchers encounter heavy computational costs and convergence issues. For analyzing large data sets, the EM (Expectation-Maximization) algorithm is efficient in estimating Bayesian IRT models, including the basic twoparameter model for binary choice data and its extension to ordinal choice data. For them, a closed-form version of the EM algorithm is derived that exactly maximizes the posterior distributions of the unknown parameters. In cases of dynamic, hierarchical, textual, and network IRT models, a closed-form EM algorithm is not possible, but a variational EM algorithm to approximately maximize the posterior distributions can be applied. The corresponding software of the emIRT package in R with implementation of the Poisson IRT (or “Wordfish”) model to analyze text data from presidential State of the Union (SOTU) addresses between 1985 and 2019 is described. In the Wordfish model, the data are organized as word frequencies in a matrix with the words on the rows and the documents on the columns. The word frequencies are assumed to be generated by a Poisson process that accounts for a general prevalence of a specific word in the latent ideological position of a document. The inferential framework and the scripts for using emIRT and two text-processing packages quanteda and tm in R are presented, with the results by six recent presidents’ speech ideological characteristics visualized and discussed. The book is completed with a list of several hundred references and a detailed index. Many exercises are given at the end of chapters. The R package for the data and new functions used in the book can be installed by library(devtools) and install_github(“davidaarmstrong/asmcjr”), and ggplot2 package is applied for visualization of the results. Multiple R codes are given throughout the book, helping to practical implementation of the considered techniques. The book can be interesting to students and researchers not only in political sciences, but it can actually enrich other applied socio-psychological and economical studies by new approaches and innovative statistical methods. Some additional related topics are considered in the sources given in the references below.