1 / 5

Day 7

Day 7. Linear Regression. Linear Regression. Can we predict total charges from length of stay? regress totchg los regress rtotchg loglos Which model? Assumption: Residuals are normally distributed with constant variance. Saving Residuals and Fitted Values. Plotting fitted line

nasya
Download Presentation

Day 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Day 7 Linear Regression

  2. Linear Regression • Can we predict total charges from length of stay? • regress totchg los • regress rtotchg loglos • Which model? • Assumption: Residuals are normally distributed with constant variance

  3. Saving Residuals and Fitted Values • Plotting fitted line • predict fity • graph fity rtotchg loglos, s(io) c(l.) ylab xlab • Making a residual plot • predict resid, res • graph resid loglos, xlab ylab yline(0)

  4. Multiple Linear Regression • Should we adjust for • age? • complications? • mortality? • gender? • regress rtotchg loglos age mortality sept reint • R-squared

  5. Pros and Cons of Transform Violation of linearity assumption versus Ease of interpretation

More Related