import statsmodels.api as sm python code example Example: import statsmodels.api as sm import statsmodels.api as sm model = OLS(X,y)