title: Multiple Linear Regression and MSE from R
body: <p>have a dataset (found here- <a href="https://netfiles.umn.edu/users/nacht001/www/nachtsheim/Kutner/Appendix%20C%20Data%20Sets/APPENC01.txt" rel="nofollow">https://netfiles.umn.edu/users/nacht001/www/nachtsheim/Kutner/Appendix%20C%20Data%20Sets/APPENC01.txt</a>) and I have done some R coding for linear regression. In the attached dataset the columns are not labeled. I had to label the columns of the dataset and save it as a csv and I apologize I can't get that on here… but the columns I am using are column 3(age) column 4(infection) column 5 (culratio) column 10 (census) and column 12(service), column 9 (region). I named the dataset hospital.</p>
  
  <p>I am supposed to "For each geographic region, regress infection risk (Y) against the predictor variables age, culratio, census, service using a first order regression model. Then I need to find the MSE for each region. This is the code I have.</p>
  
  <pre><code>NE&lt;- subset(hospital, region=="1")
  NC&lt;- subset(hospital, region=="2")
  S&lt;- subset(hospital, region=="3")
  W&lt;- subset(hospital, region=="4")
  </code></pre>
  
  <p>then to do a first order linear regression model I use the basic code for each</p>
  
  <pre><code>NE.Model&lt;- lm(NE$infection~ NE$age + NE$culratio + NE$census + NE$service)
  summary(NE.Model)
  </code></pre>
  
  <p>and I can get the adjusted R squared value, but how do I find MSE from this output? </p>