统计笔记5:Linear Regression
OLS函数sm.OLS(endog, exog, missing, hasconst)参数含义:endog:因变量exog:自变量OLS常用模板总结导入库import statsmodels.api as smfrom statsmodels.stats.outliers_influence import summary_table因变量&自变量其中自变量左边要加上一个常数x = sm.add_constant(daily_data['temp'])