1
$\begingroup$

I'd like to make a scatterplot with my dependent variable (scores on test A) on the y-axis, age (continuous) on the x-as and group (autism vs. control) as grouping variable, but also subgroup (people above 65 years vs. people younger than 65 years) as grouping variable.

This doesn't seem possible.

The reason I think I need two grouping variables is as follows: with only 'group' as grouping variable, my scatter graph illustrates an interaction effect between age and group. This isn't that weird, because when I run a regression with age, group and agexgroup as predictors, I indeed get the significant interaction effect.

But: this is not what I did in my analysis. I compared models, namely a simple model (3 main effects, 1 interaction effect) and a complex model (same variables as the simple model but with 3 extra interaction effects). I did this in SPSS lineair regression by using 'blocks'. So block 1 was my simple model, block 2 my complex model.

Both of my models doesnt give me any significant interaction effects, not for agexgroup, not for agexsubgroup and not for groupxsubgroup, or agexgroupxsubgroup.

I want to make a scatterplot which is representative for my data outcomes. The scatterplot with the simple agexgroup interaction is not.

Can anyone please help me?

$\endgroup$
  • 1
    $\begingroup$ You are attempting to use age simultaneous in two ways: continuous (recommended) and discontinuous (highly unlikely that there is a jump at age 65 and that |age - 65| is irrelevant on both sides). Keep age continuous for all phases of the analysis, whether modeling or graphing. If you think that the linear age model doesn't fit, allow it to be nonlinear (cubic splines, etc). $\endgroup$ – Frank Harrell Dec 19 '19 at 13:28
  • $\begingroup$ Thank you for your comment. My supervisor indeed said that age only as a categorical variable wouldn't be good. But he recommended me to do both. My second supervisor approved my research proposal as well. That's why I don't think I should remove subgroup (age) now, since I'm in the last phase of my master thesis. I did indeed keep age continous while graphing, but as I said before in my post, my graph now only illustrates the groupxage interaction you get when you run a regression seperately. $\endgroup$ – Leyla Rana Dec 19 '19 at 14:23
  • $\begingroup$ Can you paste in an example dataset for people to work with? It doesn't have to be your full dataset n=20 is probably fine, & it doesn't have to be your actual data, simulated, similar data is OK. $\endgroup$ – gung - Reinstate Monica Dec 19 '19 at 21:21
  • $\begingroup$ I think this is very answerable, w/ some example data. $\endgroup$ – gung - Reinstate Monica Dec 20 '19 at 18:51
  • $\begingroup$ Thank you all for your comments! I found out how to do it: using a line graph instead of a scatterplot, and then plotting age and my predicted values instead of age and dependent variable. $\endgroup$ – Leyla Rana Dec 26 '19 at 15:02