multiple_regression
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
multiple_regression [2019/05/21 22:41] – [Why overall model is significant while IVs are not?] hkimscil | multiple_regression [2019/11/01 09:23] – [e.g.,] hkimscil | ||
---|---|---|---|
Line 330: | Line 330: | ||
====== Why overall model is significant while IVs are not? ====== | ====== Why overall model is significant while IVs are not? ====== | ||
see https:// | see https:// | ||
+ | |||
+ | < | ||
+ | RSS = 3:10 #Right shoe size | ||
+ | LSS = rnorm(RSS, RSS, 0.1) #Left shoe size - similar to RSS | ||
+ | cor(LSS, RSS) # | ||
+ | |||
+ | weights = 120 + rnorm(RSS, 10*RSS, 10) | ||
+ | |||
+ | ##Fit a joint model | ||
+ | m = lm(weights ~ LSS + RSS) | ||
+ | |||
+ | ##F-value is very small, but neither LSS or RSS are significant | ||
+ | summary(m) | ||
+ | </ | ||
+ | |||
< | < | ||
Line 465: | Line 480: | ||
* LifeSat Score on Life Satisfaction Inventory seven years after College | * LifeSat Score on Life Satisfaction Inventory seven years after College | ||
* Income Income seven years after College (in thousands) | * Income Income seven years after College (in thousands) | ||
+ | |||
+ | ====== exercise ====== | ||
+ | < | ||
+ | library(ggplot2) | ||
+ | library(dplyr) | ||
+ | library(statsr) | ||
+ | library(varhandle) | ||
+ | |||
+ | library(gridExtra) | ||
+ | library(janitor) | ||
+ | library(car) | ||
+ | library(SignifReg) | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | load(" | ||
+ | </ | ||
+ | |||
Line 487: | Line 520: | ||
* https:// | * https:// | ||
* http:// | * http:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
{{tag> " | {{tag> " | ||
+ |
multiple_regression.txt · Last modified: 2023/10/19 08:39 by hkimscil