Tutorials in Quantitative Methods for Psychology (Mar 2024)

From Scratch: A Didactic Example of Multivariate Regression in Python

  • Ashiabi, Godwin S.

DOI
https://doi.org/10.20982/tqmp.20.2.p186
Journal volume & issue
Vol. 20, no. 2
pp. 186 – 204

Abstract

Read online

Although Python has the statsmodels library that can be used to perform different statistical analyses, including multiple regression, it has not yet implemented multivariate regression as one of its methods. An investigator interested in conducting a multivariate regression is thus limited to running a series of univariate regression models, which do not take into account the collinearity among variables in the models. Thus, the purpose of this tutorial is to demonstrate how to perform multivariate regression in Python using custom user-defined classes, and linear hypothesis testing using statsmodels.

Keywords