federico tedeschi
2023-02-24 13:48:58 UTC
The "margins" command in Stata allows one to plot the estimated effect of a variable X1 on an outcome Y for several values of a variable X2, in a model including a X1∗X2 interaction. Not only: it also permits the creation of a table with the estimated effects of X1 for multiple values of X2. This holds even when both variables are continuous:
https://stats.oarc.ucla.edu/stata/faq/how-can-i-understand-a-continuous-by-continuous-interaction-in-logistic-regression-stata-12/
Can anything like that be done with SPSS? The great majority of the online sources I found about SPSS relate to interactions between categorical variables. I found some examples involving one continuous variable, through the "emmeans" options. In particular, by writing: /EMMEANS=TABLES(X1
) WITH(X2=K), where k is a specific value, one can see the estimated effect of X1 for that value of X2
(see, for example, the penultimate row and last command line here: https://www.theanalysisfactor.com/why-report-estimated-marginal-means-in-spss-glm/
/EMMEANS=TABLES(X) WITH(V=50)) . Does one have to write one command line for each value of X2 for which one wants to estimated effect of X1 on Y? Also, is there any way to graph this? The great majority of the online sources I found about SPSS relate to interaction between categorical variables.
https://stats.oarc.ucla.edu/stata/faq/how-can-i-understand-a-continuous-by-continuous-interaction-in-logistic-regression-stata-12/
Can anything like that be done with SPSS? The great majority of the online sources I found about SPSS relate to interactions between categorical variables. I found some examples involving one continuous variable, through the "emmeans" options. In particular, by writing: /EMMEANS=TABLES(X1
) WITH(X2=K), where k is a specific value, one can see the estimated effect of X1 for that value of X2
(see, for example, the penultimate row and last command line here: https://www.theanalysisfactor.com/why-report-estimated-marginal-means-in-spss-glm/
/EMMEANS=TABLES(X) WITH(V=50)) . Does one have to write one command line for each value of X2 for which one wants to estimated effect of X1 on Y? Also, is there any way to graph this? The great majority of the online sources I found about SPSS relate to interaction between categorical variables.