- Thread starter RedNightSkies
- Start date

You are creating pointless addition work, plus you will need to go through the process of test model assumptions three times and have to explain and justify the process to everyone else.

Welcome to the forum!

Thank you for the reply! How would I go about testing all the data at once? How would I go about ensuring in one analysis that I am able to tease apart the effect of x on y for each group? Would that involve dummy/effect coding or multilevel modelling? Or could this be an ANOVA? For me, I tried MLM and was having a really tough time with it. When ever I ran model with random slopes (which is my hypothesis), the model said no convergence or it would say singularity (I'm working with Rstudio). I'm not very familiar with MLM and worry I may be doing something wrong with it. Not to mention the groups are very different in size. One is in the hundreds and one is in the thousands, and I'm wondering if that will affect the analysis.

Last edited:

The hard core statisticians probably won't agree but sometimes it is worth sacrificing the extra power of a single analysis for something which is easy to do, easy to interpret and easy to explain, and which is still valid.

You can create a categorical group variable (i.e. as.factor() in R). The baseline group will be absorbed into the intercept term. You can interpret the beta coefficients and so forth. Regression and ANOVA are equivalent; it's only the model form that is changed. I would advise against doing three analysis'. If we try to glean anything from p-values/hypothesis tests we may run into a multiple comparisons problem. Additionally, it's less appropriate and more difficult to compare across groups if there are 3 separate analysis.

assuming linear model:

model<- lm(y~x, data=data)

assuming linear model:

model<- lm(y~x, data=data)

Last edited:

A simple (some might say simplistic) approach is to do the three regressions and see if graph T has a significant slope and C and P do not. A careful researcher may check that the residuals in each graph are normal and even (but not necessarily the same variance), and a cautious researcher will likely adjust the critical significance cutoff to allow for multiple p's.

A more hard core analyst might put all the data into one linear model with Group, x and the interaction Group*x or some similar variation. The idea is that hopefully the interaction will be significant indicating that at least one slope is different from the others. (The advantage of this combined LM is that error df is higher, meaning that the critical F values are slightly smaller and so the power is increased, but only extremely slightly with samples of this size.) A careful analyst would check the residuals and ensure that they were normal within each group and additionally they had equal variance across the groups. This is more stringent and more work than the simple approach.

Fortunately, the interaction turns out to be significant. However, this shows only that there are differences between the slopes, not that T is significant and C and P are not. This can no doubt be shown by considering the size and SE of the various estimates but it is hard work and not obvious. In any event, this will involve three comparisons and so a cautious analyst will adjust the critical significance cutoff to allow for multiple p's.

In short, I would suggest that the best approach is the three regressions. As I said before, it is easy to do, easy to interpret and easy to explain.