## Course Outline

• segmentGetting Started (Don't Skip This Part)
• segmentIntroduction to Statistics: A Modeling Approach
• segmentPART I: EXPLORING VARIATION
• segmentChapter 1 - Welcome to Statistics: A Modeling Approach
• segmentChapter 2 - Understanding Data
• segmentChapter 3 - Examining Distributions
• segmentChapter 4 - Explaining Variation
• segmentPART II: MODELING VARIATION
• segmentChapter 5 - A Simple Model
• segmentChapter 6 - Quantifying Error
• segmentChapter 7 - Adding an Explanatory Variable to the Model
• segmentChapter 8 - Models with a Quantitative Explanatory Variable
• segmentPART III: EVALUATING MODELS
• segmentChapter 9 - Distributions of Estimates
• segmentChapter 10 - Confidence Intervals and Their Uses
• segmentChapter 11 - Model Comparison with the F Ratio
• segmentChapter 12 - What You Have Learned
• segmentResources

## Assessing Model Fit with Sum of Squares

Finally, let’s examine the fit of our regression model by running the supernova() function on our model. And at the same time, let’s compare the table we get from the regression model (Height.model) with the one we produced before for the Height2Group.model.

supernova(Height2Group.model)
supernova(Height.model) L_Ch8_Assessing_1

Remember, the total sum of squares is the sum of squared deviations (or more generally, residuals) from the empty model. Total sum of squares is all about the outcome variable, and isn’t affected by the explanatory variable or variables. And when we compare statistical models, as we are doing here, we always are modeling the same outcome variable.

### Partitioning Sums of Squares

If you want to follow along with the video, you can use this link (http://www.rossmanchance.com/applets/RegShuffle.htm) and then paste in these data.

 Height2 Group Thumb 0 56 0 60 1 61 0 63 1 64 1 68

 Height Thumb 62 56 66 60 67 61 63 63 68 64 71 68

L_Ch8_Assessing_2

For any model with an explanatory variable (what we have been calling “complex models”), the SS Total can be partitioned into the SS Error and the SS Model. The SS Model is the amount by which the error is reduced under the complex model (e.g., the Height model) compared with the empty model.

As we developed previously for the group models, SS Model is easily calculated by subtracting SS Error from SS Total. This is the same, regardless of whether you are fitting a group model or a regression model. Error from the model is defined in the former case as residuals from the group means, and in the latter, residuals from the regression line.

It also is possible to calculate the SS Model in the regression model directly, in much the same way we did for the group model. Recall that for the group model, SS Model was the sum of the squared deviations of each person’s predicted score (their group mean) from the Grand Mean. In the regression model, SS Model is calculated in exactly the same way, except that each person’s predicted score is defined as a point on the regression line. The Grand Mean is the same in both cases.

L_Ch8_Assessing_3
{"ft_lang_label":"__label__en","ft_lang_prob":0.8450182,"math_prob":0.93729544,"size":3168,"snap":"2021-43-2021-49","text_gpt3_token_len":758,"char_repetition_ratio":0.15865992,"word_repetition_ratio":0.028790787,"special_character_ratio":0.23737374,"punctuation_ratio":0.09041591,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99659526,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-20T09:24:29Z\",\"WARC-Record-ID\":\"<urn:uuid:29c972f3-1518-454d-87aa-ad3031578775>\",\"Content-Length\":\"72130\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:c03221c9-bd03-4854-b762-5524da08581b>\",\"WARC-Concurrent-To\":\"<urn:uuid:6dd17cd3-9348-4f58-a896-6d9657788650>\",\"WARC-IP-Address\":\"52.8.141.94\",\"WARC-Target-URI\":\"https://staging.coursekata.org/preview/version/0ea12f05-dce8-4b7c-a6ad-5950ec4a57bb/lesson/11/5\",\"WARC-Payload-Digest\":\"sha1:2LKTX762B5CH6ICO7G6FB5MAB7BWTVNA\",\"WARC-Block-Digest\":\"sha1:5SFFAD27PPPVX62UJVU25VHQUPMEQBO2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585305.53_warc_CC-MAIN-20211020090145-20211020120145-00558.warc.gz\"}"}