# Accounting for categorical variable in only a few observations

OK, I feel stupid asking this, but I am positive you all will know exactly what I should do here.

I have a simple regression situations (small sample sizes; n=13-18), and a few observations that are different with respect to a suite of characteristics that can be generalized by a single dummy variable (ex. south site vs. north site). If I had a roughly even number of sites in each category (north or south) with a decent spread over the X value, I would consider ANCOVA (I guess), but I do not. I have ~3 (of 13-18) sites that belong to "south" that if removed would lead to a nice linear relationship among the "north" sites. What would be the most appropriate method for dealing with these data. It seems like there has to be a better way than running the models with and without these sites and then doing some hand waving.

Please let me know if you have any good ideas.

I'd still use something similar to ANCOVA.

The first thing to try would put in a dummy for the south group (say - it doesn't really matter which), and an interaction between the dummy and the independent variable. Unless you're pretty confident a priori it's just a difference in intercept (in which case I'd probably just go with main effects - the usual ANCOVA-type assumption - which would amount to a different intercept for the two groups).

This use of dummy and dummy*IV interaction is the way to estimate different relationships for the two groups whether or not it's valid to call it ANCOVA. (Personally I think too much of a fuss is made about ANCOVA - the whole thing is just part of the linear model.)

You can do other things if you make different assumptions.

I don't see how running the models with and without the sites could do better (it only makes your life harder when you try to do inference), unless you also think the variance is different.

(Why do you say the number of observations at the two sites must be similar to do ANCOVA?)

• not being an expert on ANCOVA, it just seemed logical that if you are looking at differences in lines of two groups of points, you'd ideally want a similar number of observations and spread across X... but I suppose I just figured this was so. Sorry. Jan 5, 2013 at 23:12
• Ideally, yes, it would be handy to have that in order to reliably estimate the location-shift. But that lesser precision caused by a small sample in one group doesn't of itself make the inference invalid. The important thing here (in terms of choosing an analysis) is to think about what you want your model for the data to be. Jan 5, 2013 at 23:28
• May I add that with the data that sparks this interest, the 3 "south" sites are all located on a relative narrow section of X (imagine negative linear relationship through the origin and 3 observations in 3rd quad.). That is another reason I originally thought an ANCOVA based design wouldn't be ideal. Jan 6, 2013 at 0:31
• That sounds like there's another variable you regard as potentially important that isn't in the model, which is confounded with 'south'. Jan 7, 2013 at 0:39
• You are correct. Ideally, and I realize this may not be possible, I would like to be able to say that if I just consider the north sites, there is a relationship. The physical differences between the north and south sites (I believe) lead to lower Y values for the south sites at a given range of X compared to the north sites. I hope that makes sense. Jan 7, 2013 at 21:23