0
$\begingroup$

I am studying to see if there are differences in mussel feeding ability (CR) based on 10 different food types (Taxa) and water source (Treatment) using the covariates shell length (SL) and Initial food concentration (lin <-I log transformed it).

I made the model:

wayancova<-aov(sqrt(CR)~SL+Treatment+lin*Taxa,data=blanks,na.action=na.omit)

             Df Sum Sq Mean Sq F value  Pr(>F)   
SL            1   4.61   4.608   4.286 0.03991 * 
Treatment     1   1.46   1.463   1.360 0.24506   
lin           1   3.05   3.045   2.832 0.09419 . 
Taxa          9  16.37   1.818   1.691 0.09422 . 
lin:Taxa      9  28.61   3.179   2.956 0.00271 **
Residuals   174 187.08   1.075  

I do not have an interaction between Treatment and the other factors because they were found to not have a significant interaction so I turned it into an additive model. I had a significant interaction between the covariate Initial concentration and independent variable Taxa (which suggests it is an unequal slopes model).

My advisor now wants me to find which of these interactions are significantly different from each other. I ran a linear regression for each taxa

CentricCR<-lm(sqrt(CR)~SL+log(Initial),data=LRcentric)

I am now attempting to use this code to compare the lsmeans of the interaction, but am very uncertain if this is the right coding.

leastsquare<-lsmeans(wayancova,pairwise ~ **Taxa:lin**, adjust = "tukey")
leastsquare$contrasts
cld(leastsquare)

I suppose my questions would be, is this the correct approach and methodology to interpreting an ANCOVA, and will my lsmeans coding answer which slopes are different?

$\endgroup$

1 Answer 1

1
$\begingroup$

I suggest comparing the slopes of the estimated trends instead:

lstrends(wayancova, pairwise ~ Taxa, var = “lin”)

This estimates the slope of the fitted line in lin for each level of Taxa. Look at the documentation for lstrends.

Also, at some point you should switch to the emmeans package, because lsmeans is soon to be deprecated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.