# coefficient discrepancies

#### shanehall.m

##### New Member
I am running a regression with 1 cont. ind. var and 1 cat. ind. var. There are 3 levels to the cat var so I have the lowest level set as the dummy var. It is very apparent that as the cont ind. var increases, so does the Y, and as the level increases in the cat. ind. var, Y increases. If I run each of the x's seperately, I get coefficients that make complete sense. If I run them together, my cat. coefficients are slightly negative which doesn't make sense at all because as the level of the cat var increases Y also does. I am using my lowest level of the cat var as the reference group. Any suggestions/troubleshooting I should check?

#### weiaijiayou

##### New Member
If you have a categorical IV with three levels, you will need TWO dummy variables to test it in your regression. e.g., if you have Conditions A, B, and C, your two dummies could be B and C, with A as the base case. Each of the dummies would be coded as either 0 or 1.

If your IV just has levels of some quantity, you might be able to treat it as continuous. For example, if the variable is something like time (e.g., 10 hours vs 20 hours vs 30 hours), you could leave them coded as 1, 2, and 3 and see if there is a linear relationship between each additional 10 hours and the DV. Hope this helps.

#### noetsi

##### No cake for spunky
I think a rule of thumb is that if you have at least ten different levels to your variable (and assuming it is ordered) then you can treat it as interval. Some say less levels are required, I have seen as few as four.