ABSTRACT

Analysts will sometimes need to work with models that have more predictable outputs or will need to run models efficiently over many subgroups of nested data. Additionally, many analysts are more familiar with Python as their primary analytics tool and do not work frequently in R. This chapter brings together the various methods studied in the book and illustrates different ways of running these methods in both R and Python. In R, the focus is on producing tidier, more predictable output from models, integrating models into ‘tidyverse’ frameworks to allow efficient modeling on grouped or nested data sets and creating abstracted and generalizable model frameworks for frequent use. The chapter then covers how to implement the various models in the book using Python, starting with linear regression and binomial regression and moving through multinomial regression, structural equation modeling and survival analysis.