# Univariate analysis then multivariate analysis [duplicate]

If I do univariate analyses to select variables that I will include in a multivariate analysis* (I know this is not advised), and for a given categorical variable, in the univariate analysis, category 0 has a p-value = 0.005 but category 2 has a p-value = 0.5 for example (reference category being category 1).

Should I include the categorical variable (category 0 and category 2, category 1 being the reference) as a whole or should I create a new categorical variable (category 0 = former category 0 and category 1 (reference) = category 1 or category 2).

Finally, as stated before, I know this is not advised, but are there things I can do to use this method (some sort of p value adjustment, some sort of correlation tests on the variables?)

(* it's a linear regression)

• The logic of your question is "I'm doing stuff that's known to be wrong. If I continue with it, can I fix up the problems?" It answers itself.
– whuber
Commented Aug 17, 2022 at 16:26
• It's not wrong when the different dependent variables aren't correlated / inversely correlated though (this has been verified in my dataset). It's only wrong because people forget to verify it. My question mainly has to do with how to treat categorical variables and also asks for references as to ways to better prove the validity of carrying out this method. Commented Aug 17, 2022 at 16:29
• Btw, I'm far from being an expert so I might be wrong but this is what I've understood when reading the article. Commented Aug 17, 2022 at 16:32
• If your question is about coding categorical variables, then why does it dwell on univariate vs multivariate analysis? That makes it difficult to understand what you're trying to ask.
– whuber
Commented Aug 17, 2022 at 17:03
• Actually, I think this question is exactly mine (stats.stackexchange.com/questions/473051/…). I apologize for making a duplicate. Commented Aug 17, 2022 at 17:19