I'd like to know if a method I'm trying to use for analysis is valid (statistically speaking).
Here's the deal :
My dataset has a few quantitative variables and I'm trying to see if a qualitative variable has a significant effect on these, as well as determine which category has significant effect and quantify it.
To that end, I'm using the
lm() function in R, with
quant-mean(quant)~0+qual as the given equation.
0+ gives me a model with no intercept to avoid having first category as reference, which allows me to have the
summary() give all coefficients compared to 0 instead of a comparison to the reference class. The
quant-mean(quant) is to have the model coefficients correspond to the difference between the mean of their class and the global mean.
To start the analysis, I use the
anova() function on the model to see if a significant portion of the Sum Sq. is explained by the qualitative variable. If I'm not wrong, this function should tell me of a significant effect if at least one of the categories significantly differs from the mean.
Then, if need be I'll use the summary to see which category(ies) are causing this and in what way.
The trouble is that with the "no intercept" model, I lose a degree of freedom, so a significant effect as a whole may not be detected through an anova of the proposed lm, versus one of the basic
It doesn't seem right to build the "basic" lm to check for effect significance and then build the other model to identify which categories cause this, but I'm not sure if I should be taking the risk of directly building the "no intercept" model... Any suggestions ?