0
$\begingroup$

I am trying to build a regression model using R where,

reponse variable:

  • price (continuous)

explanatory variables:

  • Age,accumulated kilometers,weight,horsepower,cylinder volume, tax (continuous)

  • Metallic color,ABS,Airbag,CD_Player,Power steering, Metallic_Rim (categorical - binary)

  • Color (Categorical - 5 levels)

  • Fuel Type (Categorical - 3 levels)

How can I detect the variables that should be used in my linear model in one step. I know that binary variables influence on response variable can be checked using T-test. How can I check which all of these variables(continous, categorigal-binary, categorical-multiple levels) influnece my response variable price in one step ??

$\endgroup$
  • $\begingroup$ If by one step your implying a shortcut to identifying significant variables automatically it would not be advised. $\endgroup$ – Arun Jose Nov 20 '15 at 12:03
1
$\begingroup$

The statistical value that you obtain is the univariate significance test. You may want to check the joint significance of your variables. Say that you have a binary variables for each color. You want to test the joint significance of the four variables color (you omit one color because it becomes your referent class) via a F-test.

Related to the previous point, you definitely should use binary variables for each color and Fuel type because colors will be coded as 1, 2, 3, 4, 5 = Red, Green, Blue, Black, White. If you include the variable color as it is, the statistical software will not understand that you use a label, but rather an actual value. In other words, the program will understand it as: "going from Red(1) to Blue(2) increases the price of the car by USDxx." To understand my point, if you code the colors differently: Red=3, Blue=1, Green=4, Black=2, White=5, the coefficient in front of color will change, indicating that the information contained in color has changed, which should not be the case.

Another way of seeing this is that you cannot take the first derivative of a Red or a Blue car. Think in terms of computer language and not how you interpret the numbers, a computer has no brain.

For a more elaborate answer on the univariate/multivariate significance test, see this post.

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

The significance value should be displayed next to the variable in the model, whichever value is significant influences your DV. Look here or alternatively use the install.packages("Swirl") and do the regression package and this will explain everything.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.