# Compare slopes of multiple regression models - repeated measures at mult conditions

#### baxterj

##### New Member
In an experiment I measured how hard (torque, dependent variable) subjects could push against a plate as it rotated at 4 speeds: stopped, slow, medium, and fast. I measured their muscle volume and moment arm. Simple linear regression models show that torque at all 4 speed conditions is partly explained by volume and moment arm (R^2 > 0.25). moment arm and volume have a very weak, and insignificant, correlation with one another. When both moment arm and volume are used as IV in a multiple regression model to predict torque the R^2 is greater than 0.5 for all speed conditions.

Our working hypothesis is that torque production should be positively correlated to moment arm during slow speeds and negatively correlated with moment arm during fast speeds while controlling for muscle volume (co-variate).

I received some help on this a while ago, where a colleague used R (lme4 package) to write a linear mixed model to test if the effect of moment arm on torque differed between speed conditions when muscle volume was held constant. The model tested 3 speed conditions: slow, medium, and fast, against the stopped speed condition. This model returns fixed effects and their t-values. I was able to use the t-values and df of the model to calculate some p-values, but I am not terribly confident in this model...

I would think this question could be answered with a repeated measures ANCOVA of sorts but would like to get other's thoughts.

Thanks.

#### Jake

Re: Compare slopes of multiple regression models - repeated measures at mult conditio

Is the question whether or not you could reasonably use a RM-ANOVA to answer the questions you're interested in? Well yes, you could do this and it would not be unreasonable. Personally I would go with the mixed model but hey.

#### baxterj

##### New Member
Re: Compare slopes of multiple regression models - repeated measures at mult conditio

Is the question whether or not you could reasonably use a RM-ANOVA to answer the questions you're interested in? Well yes, you could do this and it would not be unreasonable. Personally I would go with the mixed model but hey.
Thanks Jake.

Maybe a few points of clarification. We essentially want to compare the slopes of the moment arm component of the multiple regression models run at the 4 speeds (muscle volume would be the other IV). This is why I thought an ANCOVA could be appropriate. I would be more than happy to stick with the mixed model as long as it is appropriate, I just don't have much statistical chops and don't want to misuse a tool.

Below is a snippet of the R script for anyone's interest. I am more comfortable in SPSS due it the purdy pictures.

%% speed1 = torque at slow speed, speed2 = torque at medium, speed3 = torque at fast, vol = muscle volume, arm = moment arm

> #dummy variables##
> intense3$speed1<-ifelse(intense3$time==1,c(1),c(0))
> intense3$speed2<-ifelse(intense3$time==2,c(1),c(0))
> intense3$speed3<-ifelse(intense3$time==3,c(1),c(0))
> #Linear time model (MLM)
> haha <- lmer(speed ~ vol + arm + speed1 + speed2 + speed3 + arm*speed1 + arm*speed2 + arm*speed3 +
+ (vol|id) + (arm|id) + (speed1|id) + (speed2|id) + (speed3|id), data=intense3)
Warning message:
In mer_finalize(ans) : singular convergence (7)
>
> summary(haha)
Linear mixed model fit by REML
Formula: speed ~ vol + arm + speed1 + speed2 + speed3 + arm * speed1 + arm * speed2 + arm * speed3 + (vol | id) + (arm | id) + (speed1 | id) + (speed2 | id) + (speed3 | id)