Solved – How to get rid of heterogeneity of regression slopes using multilevel modeling

ancovamultilevel-analysisspss

I have problem with homogeneity of regression slopes in ANCOVA. I have two species of snakes and I want to compare their tail lengths (dependent variable), that are dependent on body length (in ANCOVA used as covariate). Other ANCOVA assumptions are met, but there exist significant interaction between species*bodylength (intercepts are comparable, slopes are different).

Andy Field´s SPSS guide tells that broken assumption of homogeneity of regression slopes could be cast aside using multilevel statistic model. I´m trying to correctly run this analysis whole day, but I am unable to do it. Problem is that I want to compare tail lengths between species, which is my top of hierarchy (at the bottom are individual specimen). Do I have to set variable species as subject (assuming some hierarchy)?

Undoubtely I have to set body length as covariate and tail length as dependent variable. How can I compare my groups (species) independently of slopes (slopes are random)? What should be set as fixed factors and what random factors in SPSS? Field´s guide also tells that for mixed model analysis there is bug (version 17.0) related to factors dialog box such that categorical variables (in this case my species variable) should be put into covariate box (at least if it is bivariate). Is he right? I know what I want to do but dont know how to do it.

Best Answer

You could simply create interaction terms between your predictor (body length) and an indicator variable for the species (that is, species fixed effects). You would then regress your outcome (tail length) on the species fixed effects and the interactions terms. My coauthors and I detail this procedure in our paper, Broken or Fixed Effects?

Related Question