Skip to content
Prev 202035 / 398503 Next

How to force regression coeffs for some values in a categorical variable

On Nov 29, 2009, at 11:23 AM, sr danda wrote:

            
It's a bit unclear from your description what you are trying to do  
(and it might help to hear the justification for doing it). If you do  
not want the cases with particular factor levels used in the  
prediction, then subset them out. If you want a group of factor levels  
grouped and and then used as the reference level, then perhaps:

?relevel

That will of course result in the intercept term becoming the adjusted  
mean for those levels, but I'm sure you already knew that.