0

I have a GLM and my explanatory variables are a factor of 9 levels (X1) and a numeric variable (X2).

If I have to report the formula:

$Y = B_0 + B_1X_1 + B_2X_2$

I have 1 coefficient for the intercept and 1 coefficient for the numeric variable, that's ok, but I have 8 coefficients for the factor, how do I report them? I mean, Bo is one number, B2 is one number, but B1? do I sum the eight numbers? or I report the mean of the 8 numbers, or I have to report the formula with the eight numbers?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Juan
  • 389
  • 3
  • 4
  • 12
  • When you have a factor with 9 levels, you need 8 coefficients. Each compares one level to others. You need to report them all, but you first need to figure out whether they are are dummy coded, effect coded or some other parameterization. What software are you using? Different software has different defaults. – Peter Flom Oct 19 '12 at 10:23
  • I am using R, my question is, do I have to report a formula like this: Y = -0.041 + -2.17X1L2 + -18.58X1L3 + ... + -0.4X1L8 + -0.75X1L9 + -0.6X2 ?? Or there is a way to resume the coefficients in just one coefficient for the X1 explanatory variable? – Juan Oct 19 '12 at 10:27
  • 2
    No, you cannot use just one coefficient. There is no meaningful way to do this. You need to look at summary() of your model. You might also want to look at the xlevels. – Peter Flom Oct 19 '12 at 10:45
  • Sorry for the ignorance, what do you mean for "look at the xlevels"? what can I look at the nine levels of the factor? – Juan Oct 19 '12 at 10:56
  • 3
    Type `?lm` inside `R` to see a lot more about them. xlevels tell you how the categorical variable was parameterized; this will be important for interpretation. You might also want to consult a book on regression - one that uses R would be ideal. I liked the first edition of [Fox](http://www.amazon.com/An-R-Companion-Applied-Regression/dp/141297514X/ref=sr_1_1?ie=UTF8&qid=1350644916&sr=8-1&keywords=regression+fox). – Peter Flom Oct 19 '12 at 11:09
  • Second recommendation of Fox's regression book. Another nice way to present coefficients for categorical variables like this is visually in a forest plot. Have a look at the plot_model function of R package sjPlot. – Lachlan Mar 20 '21 at 21:28

0 Answers0