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 ResultsDep. 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
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
Omnibus: 23.275 Durbin-Watson: 1.228
Prob (Omnibus): 0.000 Jarque-Bera (JB): 27.801
Skew: 0.809 Prob (JB): 9.18e-07
Warnings:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.
"" "
-
Answer # 1
Related articles
- python - regression analysis with statsmodels cannot resolve the error that it contains infinity or nan
- logistic regression analysis in python
- python - i get an error when i try to do a simple regression analysis using sklearn
- python 3x - i want to make a scatter plot of the results of regression analysis
- python - causality in time series data analysis
- python - randomly extract data from multiple data frames (no between data frames is the same)
- python - about multiple processing and loop processing in discordpy
- python - about data analysis in pandas
- python 3x - multiple outputs from a list of tuples
- python - cannot inherit a class with multiple arguments
- python - how to load multiple time formats with pandas
- i want to perform multiple processes with else in python list comprehension notation
- python - read multiple audio files (wav files)
- python 3x - how to specify multiple conditions with a regular expression
- python - [tkinter] multiple selectable combobox
- python - i want to make a total value of channels with multiple images
- python opencv face recognition multiple person image
- regression analysis with a generalized additive model using r becomes a linear model
- python - if you create multiple signup screens with django, you want to change the redirect destination in case of an error
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
I arrived at the following site and understood
https://mkmkipy.hatenablog.com/entry/2018/10/27/231943
This incident will be closed