I have a question regarding the use of categorical variables in a linear regression.
I have a continuous dependent variable, a categorical independent variable (Likert scale), and I use various control variables which are mostly categorical (e.g. they consists of groups, such as sex). When I use the following code:
I get different results regarding the size of the coefficients and the R2, then when I use the following code:
. In my case, in the latter example the independent variable becomes insignificant.
My question is, how is this difference being caused? And which code should I use? Or what reasons determine the choice of the type of code?
I have a continuous dependent variable, a categorical independent variable (Likert scale), and I use various control variables which are mostly categorical (e.g. they consists of groups, such as sex). When I use the following code:
Code:
regress dependent independent i.sex
Code:
regress dependent independent sex
My question is, how is this difference being caused? And which code should I use? Or what reasons determine the choice of the type of code?
Comment