Skip to content
Prev 138444 / 398506 Next

simplifying a GLM-removing categorical variables

mariannej <marianne.james <at> abdn.ac.uk> writes:
This is really a statistical rather than an R question,
but the short answer is: you probably shouldn't try to
remove the "non-significant" level.  Depending on the
details of your model -- the "significance" of the parameters,
which I assume you're gleaning from summary(), refers 
to the difference of the levels from the baseline (first)
level.  If 5 out of the 6 levels are significantly different
from the baseline, then the factor belongs in the model.
(You could _conceivably_ try to lump the "non-significant"
level together with the baseline level, but this really
goes in the direction of data-dredging.)

   I would strongly recommend that you consult a good
general text on generalized linear models for strategies
of model simplification and interpretation -- to repeat,
this is really a statistical question and not an
R-specific one ...

  good luck,
    Ben Bolker