I have three models :
Model A :
>>> lm = smf.ols(formula='Total_yield ~ PH + EC + N + P + Fe + Cu + Mn ', data=data).fit()
>>> lm.summary()
<class 'statsmodels.iolib.summary.Summary'>
"""
OLS Regression Results
==============================================================================
Dep. Variable: Total_yield R-squared: 0.590
Model: OLS Adj. R-squared: 0.508
Method: Least Squares F-statistic: 7.186
Date: Tue, 07 Mar 2017 Prob (F-statistic): 0.0438
Time: 14:32:50 Log-Likelihood: -58.331
No. Observations: 7 AIC: 120.7
Df Residuals: 5 BIC: 120.6
Df Model: 1
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [95.0% Conf. Int.]
------------------------------------------------------------------------------
Intercept 564.3577 142.383 3.964 0.011 198.350 930.366
PH 1693.0731 427.150 3.964 0.011 595.049 2791.097
EC 564.3577 142.383 3.964 0.011 198.350 930.366
N 564.3577 142.383 3.964 0.011 198.350 930.366
P 564.3577 142.383 3.964 0.011 198.350 930.366
Fe 1128.7154 284.767 3.964 0.011 396.700 1860.731
Cu 1693.0731 427.150 3.964 0.011 595.049 2791.097
Mn -3447.6000 1286.078 -2.681 0.044 -6753.569 -141.631
==============================================================================
Omnibus: nan Durbin-Watson: 3.039
Prob(Omnibus): nan Jarque-Bera (JB): 0.312
Skew: -0.026 Prob(JB): 0.856
Kurtosis: 1.968 Cond. No. 9.81e+50
==============================================================================
In model A, I have just use variables which p values have less than 0.05, other variables are > 0.05 , so remove in model using forward-backward.
Model : B
>>> lm = smf.ols(formula='Total_yield ~ PH + EC + N + P + Fe + Cu + Average_rain + Mn ', data=data).fit()
>>> lm.summary()
<class 'statsmodels.iolib.summary.Summary'>
"""
OLS Regression Results
==============================================================================
Dep. Variable: Total_yield R-squared: 0.751
Model: OLS Adj. R-squared: 0.626
Method: Least Squares F-statistic: 6.017
Date: Tue, 07 Mar 2017 Prob (F-statistic): 0.0622
Time: 14:32:01 Log-Likelihood: -56.590
No. Observations: 7 AIC: 119.2
Df Residuals: 4 BIC: 119.0
Df Model: 2
Covariance Type: nonrobust
================================================================================
coef std err t P>|t| [95.0% Conf. Int.]
--------------------------------------------------------------------------------
Intercept 913.6628 250.453 3.648 0.022 218.295 1609.031
PH 2740.9883 751.358 3.648 0.022 654.885 4827.092
EC 913.6628 250.453 3.648 0.022 218.295 1609.031
N 913.6628 250.453 3.648 0.022 218.295 1609.031
P 913.6628 250.453 3.648 0.022 218.295 1609.031
Fe 1827.3255 500.905 3.648 0.022 436.590 3218.061
Cu 2740.9883 751.358 3.648 0.022 654.885 4827.092
Average_rain -78.6178 48.959 -1.606 0.184 -214.549 57.313
Mn -3938.5683 1162.148 -3.389 0.028 -7165.209 -711.928
==============================================================================
Omnibus: nan Durbin-Watson: 2.296
Prob(Omnibus): nan Jarque-Bera (JB): 0.917
Skew: 0.630 Prob(JB): 0.632
Kurtosis: 1.754 Cond. No. 4.90e+32
==============================================================================
In this model( B) , I just add Rain variables ,Rain variable is I have remove in the model (A)
Model-C :
>>> lm = smf.ols(formula='Total_yield ~ PH + EC + OC + N + P + S + Fe + Cu + K + Hydro + High_temp + Low_temp + Precipitation + Average_rain', data=data).fit()
>>> lm.summary()
<class 'statsmodels.iolib.summary.Summary'>
"""
OLS Regression Results
==============================================================================
Dep. Variable: Total_yield R-squared: 0.967
Model: OLS Adj. R-squared: 0.802
Method: Least Squares F-statistic: 5.872
Date: Tue, 07 Mar 2017 Prob (F-statistic): 0.303
Time: 14:29:08 Log-Likelihood: -49.503
No. Observations: 7 AIC: 111.0
Df Residuals: 1 BIC: 110.7
Df Model: 5
Covariance Type: nonrobust
=================================================================================
coef std err t P>|t| [95.0% Conf. Int.]
---------------------------------------------------------------------------------
Intercept 0.3102 0.140 2.212 0.270 -1.471 2.092
PH 0.9306 0.421 2.212 0.270 -4.414 6.275
EC 0.3102 0.140 2.212 0.270 -1.471 2.092
OC 4169.2723 1332.778 3.128 0.197 -1.28e+04 2.11e+04
N 0.3102 0.140 2.212 0.270 -1.471 2.092
P 0.3102 0.140 2.212 0.270 -1.471 2.092
S -1343.9524 509.239 -2.639 0.231 -7814.450 5126.545
Fe 0.6204 0.280 2.212 0.270 -2.942 4.183
Cu 0.9306 0.421 2.212 0.270 -4.414 6.275
K 2019.6091 959.691 2.104 0.282 -1.02e+04 1.42e+04
Hydro -2214.3113 734.976 -3.013 0.204 -1.16e+04 7124.439
High_temp 11.1139 5.023 2.212 0.270 -52.715 74.943
Low_temp 8.0121 3.621 2.212 0.270 -38.002 54.026
Precipitation 60.4332 27.316 2.212 0.270 -286.643 407.510
Average_rain -133.9362 69.860 -1.917 0.306 -1021.593 753.721
==============================================================================
Omnibus: nan Durbin-Watson: 2.736
Prob(Omnibus): nan Jarque-Bera (JB): 0.548
Skew: 0.284 Prob(JB): 0.760
Kurtosis: 1.752 Cond. No. 2.81e+16
==============================================================================
I am confusing in which model I have to use for predict the yield. because In model - C we have AIC value is lower than model -A and B, but all p values are bigger than 0.05 .
So which one I have to choose Model - A or Model - B or Model- C ?