c:ma:2019:multiple_regression_exercise
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
c:ma:2019:multiple_regression_exercise [2019/11/07 07:43] – [Class A] hkimscil | c:ma:2019:multiple_regression_exercise [2021/11/11 10:14] (current) – [Ex. 2] hkimscil | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Class A ====== | + | ====== Class Activities |
+ | ===== Ex. 1 ===== | ||
* Install packages ISLR | * Install packages ISLR | ||
* use a dataset, Carseats | * use a dataset, Carseats | ||
Line 6: | Line 6: | ||
* Use ''? | * Use ''? | ||
* Use '' | * Use '' | ||
+ | * 변인설명을 토대로 가설만들기 | ||
+ | * 종속변인 = Sales | ||
+ | * 독립변인 = 숫자변인 1 + 종류변인 1 (조별 선택) | ||
+ | * Multiple regression without interactin | ||
+ | * Multiple regression with interaction | ||
+ | * 가설 만들기 | ||
+ | * 종속변인 Sales | ||
+ | * 독립변인 여러개 (interaction 없이) | ||
+ | * Modeling 해 볼 것 | ||
- | * Make a full model (with all variables) then reduce down the model until you find it fitted. | + | see [[: |
- | * Make a null model (with no variables) then, build up the model with additional IVs until you find a fitted model. | + | see also [[: |
- | * Can we use '' | + | |
- | * Interpret the result | + | |
- | > step(lm.full, direction=" | + | * <del>Make a full model (with all variables) then reduce down the model until you find it fitted.</ |
+ | * < | ||
+ | * < | ||
+ | * < | ||
- | ---- | + | < |
+ | |||
+ | [[./ | ||
+ | |||
+ | ===== Ex. 2 ===== | ||
* Install packages tidyverse | * Install packages tidyverse | ||
* load the tidyverse | * load the tidyverse | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * Use a dataset | + | * load the car and the carData |
- | * describe the data set | + | * '' |
+ | * '' | ||
+ | * explain what it is | ||
+ | | ||
+ | ---- | ||
* Regress sex variable on salary variable | * Regress sex variable on salary variable | ||
* Write the regression model | * Write the regression model | ||
- | * Discuss the difference | + | * Discuss the difference |
* Use rank variable for the same purpose | * Use rank variable for the same purpose | ||
- | * -- | + | * Write the regression model |
- | * Use yrs.service | + | * Regress rank + sex on salary |
- | * on salary | + | * How do you interpret the result? |
+ | * And regress | ||
+ | * How do you interpret this result? | ||
+ | * Do factorial ANOVA test with rank and sex on salary | ||
* How do you interpret the result? | * How do you interpret the result? | ||
- | ---- | + | |
+ | * Test regression model of your own choice | ||
+ | * Interpret the result | ||
+ | |||
+ | ----- | ||
위의 Salaries 데이터사용이 안 될 때 | 위의 Salaries 데이터사용이 안 될 때 | ||
* download to R from here {{: | * download to R from here {{: | ||
- | < | + | * use to import the data set. '' |
* for information about Salaries (it may not be loaded), | * for information about Salaries (it may not be loaded), | ||
- | < | + | * use '' |
- | + | ----- | |
- | + | Please copy and paste the proper r command and output to a txt file (use notepad or some other text editing program). You could use MS Word, but, please make it sure that you use type-setting fonts such as " | |
- | + | < | |
- | + | ||
====== Discussion ====== | ====== Discussion ====== |
c/ma/2019/multiple_regression_exercise.1573080230.txt.gz · Last modified: 2019/11/07 07:43 by hkimscil