User Tools

Site Tools


c:ma:2019:multiple_regression_exercise

This is an old revision of the document!


Class A

  • Install packages ISLR
  • use a dataset, Carseats
  • Build regression models with a DV, sales and IVs, your choices
  • Use ?Carseats command for the explanation of the dataset
  • Use str function to see the characteristic of each variable. Make it sure that SelvesLoc variable should be factor, not int or anything.
  • Make a full model (with all variables) then reduce down the model until you find it fitted.
  • Make a null model (with no variables) then, build up the model with additional IVs until you find a fitted model.
  • Can we use step or stepAIC (MASS package needed) function?
  • Interpret the result
step(lm.full, direction=“back”)

  • Install packages tidyverse
  • load the tidyverse
  • install.packages(“car”)
  • data(“Salaries”, package = “car”)
  • Use a dataset Salaries
  • describe the data set
  • Regress sex variable on salary variable
  • Write the regression model
  • Discuss the difference
  • Use rank variable for the same purpose
  • Use yrs.service + rank + discipline + sex
  • on salary
  • How do you interpret the result?

—-
위의 Salaries 데이터사용이 안 될 때

Salaries <- read.csv("http://commres.net/wiki/_media/salaries.csv")
  • for information about Salaries (it may not be loaded),
??Salaries

Discussion

Common topics

  • What affects students GPA? Or what determines students' GPA?

Group topics

Making Questionnaire

Questions you submit at the ajoubb.
Then we will list questions in Google docs Google survey

c/ma/2019/multiple_regression_exercise.1573080230.txt.gz · Last modified: 2019/11/07 07:43 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki