title: regression model statsmodel python
body: <p>This is more of a stats question as the code is working fine, but I am learning regression modeling in python. I have some code below with statsmodel to create a simple linear regression model:</p>
  
  <pre><code>import statsmodels.api as sm
  import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
  
  ng = pd.read_csv('C:/Users/ben/ngDataBaseline.csv',  thousands=',', index_col='Date', parse_dates=True)
  
  X = ng['HDD']
  y = ng['Therm']
  
  # Note the difference in argument order
  model = sm.OLS(y, X).fit()
  
  # Print out the statistics
  model.summary()
  </code></pre>
  
  <p>I get an output like the screen shot below. I am trying judge the goodness of fit, and I know the R^2 is high, but is it possible to find the root mean squared error (RMSE) of the prediction with statsmodel?</p>
  
  <p>I'm also attempting to research if I can estimate the sampling distribution with a confidence interval. If I am interpreting the table correctly for the intercept HDD 5.9309, with standard error 0.220, p value low 0.000, and I think a 97.5% confidence interval the value of HDD (or is it my dependent variable Therm?) will be between 5.489 and 6.373??  Or I think in percentage that could be expressed as ~ +- 0.072%</p>
  
  <p><a href="https://i.stack.imgur.com/OJvZv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OJvZv.jpg" alt="enter image description here"></a></p>
  
  <p><strong><em>EDIT</em></strong> included multiple regression table
  <a href="https://i.stack.imgur.com/XvwX8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XvwX8.jpg" alt="enter image description here"></a></p>