1
$\begingroup$

I am doing a linear regression analysis in R with logarithmic dependent variable. One of the control variables is categorical and describes an industry. There are 6 industries and thereby R automatically creates a separate coefficient for each Industry. However, I just want to see if that variable is significant or not and am not interested in separate coefficient for each factor.

Is there a way to program it in a way that the summary of the model just says if the influence of industry was significant for at least one factor or not?

$\endgroup$

closed as off-topic by mkt, Peter Flom Mar 25 at 12:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – mkt, Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ R should be creating 6-1=5 coefficients unless you are fitting a model without an intercept.. $\endgroup$ – StatsStudent Mar 23 at 18:38
  • 1
    $\begingroup$ If I understand, you want to use the Anova function in the car package. $\endgroup$ – Sal Mangiafico Mar 24 at 3:58
  • $\begingroup$ Thats Right, R creates 6-1 coefficients but I just want 1 coefficient to tell me whether the influence of any category is significant. I don't want to know which one specfically $\endgroup$ – david khubua Mar 24 at 19:05
0
$\begingroup$

It only makes sense to calculate a single coefficient for an independent variable if the following conditions are met:

  1. The values of the variable are ordered; i.e. each increment/decrease of one value indicates an increase/decrease in the represented phenomenon.

  2. The values of the variable are equidistant. i.e any increment of one level on the variable indicates a similar increase in the represented phenomenon.

Continuous variables often meet these criteria, but categorical variables only do in certain cases: if the categories are ordinal and equidistant (e.g., number of production facilities, income strata etc.).

I suppose your variable 'Industry' is nominal instead of ordinal, so calculating a single regression coefficient instead of separate coefficients for each of the 5 dummy-variables would not make sense.Instead, you could consider an omnibus test to test for overall differences across categories (e.g. ANOVA).

$\endgroup$

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