Uploaded April 2021 | Updated September 2026, 1 week ago
I am Dr Juan Klopper, Surgeon and Research Fellow as the School for Data Science and Computational Thinking at Stellenbosch University. If you want to learn how to use python for healthcare statistics consider, my course and get a certificate from my research group. The course is available at udemy.com/course/biostatistics-fundamentals-using-python For more course visit juanklopper.com
The files for this tutorial will be made available on GitHub soon.
In this video tutorial I discuss the preparation of tabular data for use in statistical python packages such as statsmodels. The patsy package is ideal for creating design matrices that can be used in statsmodels.
Design matrices in models include the dependent vector and the matrix of independent variables. Functions in patsy can generate these from tabular data. The patsy package can also preprocess the data. It can, for instance, generate design matrices with interaction terms, add new variables to a feature matrix, transform the values of a variable, and many other such transformation.
I am Dr Juan Klopper, Surgeon and Research Fellow as the School for Data Science and Computational Thinking at Stellenbosch University. If you want to learn how to use python for healthcare statistics consider, my course and get a certificate from my research group. The course is available at udemy.com/course/biostatistics-fundamentals-using-python For more course visit juanklopper.com
The files for this tutorial will be made available on GitHub soon.
In this video tutorial I discuss the preparation of tabular data for use in statistical python packages such as statsmodels. The patsy package is ideal for creating design matrices that can be used in statsmodels.
Design matrices in models include the dependent vector and the matrix of independent variables. Functions in patsy can generate these from tabular data. The patsy package can also preprocess the data. It can, for instance, generate design matrices with interaction terms, add new variables to a feature matrix, transform the values of a variable, and many other such transformation.










