Home>

I defined a multiple regression model with the following code and output a summary of the regression results.
The categorical variable week [T.1] exists as an explanatory variable in the training data, but for that
No coefficient is output.
Could you please tell me what went wrong in the model definition?
(Self-taught limit death ...)

"" "
Model building
"" "
ols_model ='y ~ 1 + week + temperature'

model_ols = smf.ols (formula = ols_model, data = train)
"" "
Learn with train data
"" "
result_ols = model_ols.fit ()
"" "
See results
"" "
result_ols.summary ()

"" "

OLS Regression Results

Dep. Variable: y R-squared: 0.460
Model: OLS Adj. R-squared: 0.447
Method: Least Squares F-statistic: 34.30
Date: Tue, 14 Jan 2020 Prob (F-statistic): 2.91e-25
Time: 15:07:20 Log-Likelihood: -952.41
No. Observations: 207 AIC: 1917.
Df Residuals: 201 BIC: 1937.
Df Model: 5

Covariance Type: nonrobust coef std err t P>| t | [0.025 0.975]

Intercept 143.9546 5.526 26.053 0.000 133.059 154.850
week [T.2] -6.4109 5.470 -1.172 0.243 -17.197 4.375
week [T.3] -10.2921 5.411 -1.902 0.059 -20.963 0.378
week [T.4] -17.7358 5.412 -3.277 0.001 -28.407 -7.065
week [T.5] -6.8782 5.470 -1.258 0.210 -17.663 3.907

temperature -2.5388 0.198 -12.800 0.000 -2.930 -2.148

Omnibus: 23.275 Durbin-Watson: 1.228
Prob (Omnibus): 0.000 Jarque-Bera (JB): 27.801
Skew: 0.809 Prob (JB): 9.18e-07

Kurtosis: 3.779 Cond. No. 119.

Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
"" "