I am setting up a linear model in R and need help understanding the significance codes when one of my independent variables is a factor - i.e., dummy variable for each possible value

For a scalar independent variable (e.g., age, income, height), it's straightforward - either the variable is significant in the model or it isn't. R tells you the p-value with nice little stars to code the different significance levels.

For a category/factor variable, like ethnicity or gender, what does it mean when some but not all of the dummy variables in the model have a small p-value?

Can you have an independent category variable that is significant only for individual categories? In the case of ethnicity, would it mean that ethnicity is only significant in the model when you're (specific value)?

I tagged the question with "R" although it's really a general question about interpreting p-values from a linear model.


1 Answer 1


Any p-value in a regression model is just a hypothesis test against the null that the estimated coefficient is zero (at some specified level). Non-significant results for some factor levels means that confidence intervals for those specific levels (e.g. "male" for a gender column, or "Australian" for a citizenship column) include zero (at some specified level).

It's not that the level as a whole is (in)significant, just that the coefficient for the specific subgroup is (not).

  • 2
    $\begingroup$ accepting the answer, which is confirming my hunch that some levels can be significant while others are not. $\endgroup$ Jan 27, 2015 at 17:23
  • $\begingroup$ But note also that the coding used is important: male can be significant with one coding, but not with another, it depends on base level. A better example might be etnicity: chinese might be insignificant if reference level is jew , but significant with some other reference level! Remember that levels are shorthands for some specific comparison to some other level. $\endgroup$ Sep 2, 2021 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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