0

I have 4 IVs: gender (male, female), marital status (married, single), threat (continuous variable) and stress with four levels (ranging from 7 to 10 with ten being 'most stressed'). My DV is prosocial behaviour. I'm doing a binary logistic regression. I've been advised to do orthogonal polynomial contrasts on the ordinal variable of 'stress'. I've been advised to follow some resources but the content of those is not clear to me. My questions would be:

1) Do I have to create these contrasts for my gender (male, female) and marital status (married, single) IVs too or just the ordinal variable?

2) One of the resources (youtube video) contrast codes a gender variable like this: if female = female gender coding = 1. if female = male gender coding = -1. How do I translate this rule to my stress variable with 4 levels?

3) Another resource says the following:

Polynomial Contrast This contrast gives you the linear effect across all categories (for the first degree of freedom), the quadratic effect (for the second degree of freedom), the cubic effect (for the third degree of freedom), and so on for higher-order effects. It should be noted that these contrasts are orthogonal. For example, the polynomial contrast for age would be: (1 1 1 1) linear (-3 -1 1 3) quadratic (1 -1 -1 1) cubic (-1 3 -3 1) How to apply this to my ordinal IV?

4) The final resource shows me how to do it in SPSS. It does not seem to refer to any of the stuff mentioned above so I guess I don't have to do the contrasts manually after all. This resource (from researchgate) says the following: To perform a polynomial orthogonal contrast analysis by SPSS, one can follow these steps:

  • Define the predictor variable as a factor and assign it a numerical value for each level (My gender IV is male (0) and female (1). Marital status is single (0), married (1). My stress IV has 4 levels. I gave the 'seven', 'eight', 'nine', and 'most' labels a numerical value of 7, 8, 9, and 10).
  • Define the predictor variable as a factor and assign it a numerical value for each level.
  • Go to Analyze > General Linear Model > Univariate.
  • Select the response variable as the dependent variable and the predictor variable as the fixed factor. (Do I add all of my IVs in the Fixed Factors square?)
  • Click on Model and select Custom. Then select the predictor variable and move it to the model box. Click on Build Term and select Polynomial. Choose the highest order of polynomial that you want to test (up to k, where k + 1 is the number of levels of the predictor variable). Click on Add and then Continue.
  • Click on Options and select Descriptive statistics, Estimates of effect size, and Homogeneity tests. Then select the predictor variable and move it to the Display Means box. Click on Compare Main Effects and select Polynomial from the drop-down menu. Click on Continue and then OK.
  • The output will show a table with the polynomial contrasts for each order of polynomial that you selected. You can interpret the F and p values to test for significance of each contrast. You can also see the estimated marginal means and plots for each level of the predictor variable.

5) The resource says:
"Click on Model and select Custom. Then select the predictor variable and move it to the model box. Click on Build Term and select Polynomial. Choose the highest order of polynomial that you want to test (up to k, where k + 1 is the number of levels of the predictor variable). Click on Add and then Continue." However, there is no 'polynomial' to click and only these options are there to choose under Build terms: 'Interaction' 'Main effects' 'All 2 way' 'All 3 way' 'All 4 way' 'All 5 way' Which one would apply to my stress variable? Also, if I'm adding all of the IVs in the model, then I have factors with 2 levels too (gender, marital status).

6) This seems to be the process for doing an ANOVA but I'm meant to do a binary logistic regression. My outcome variable is binary (yes, no).

What do I do, I'm desperate. No textbooks (for social sciences and SPSS) offer any help on this.

EDIT EDIT

So the Stress IV was ticked as polynomial.

The 'Categorical Variables Codings' is as follows. I don't understand how to read the codings. It does not say what code corresponds to the 7, 8, 9, 10 levels of the IV.

enter image description here

enter image description here

  • 1
    SPSS' binary logistic regression menu (go to Analyze...Regression...Binary logistic) directly offers the option for specifying a predictor as polynomial? It's under the "categorical" tab in the main logistic regression menu. – Sointu Nov 15 '23 at 15:43
  • I had no idea. I found it. Thank you so much. Do I only select 'polynomial' for the ordinal 'stress' variable or the binary IVs too? And is it okay to code the stress variable as 7, 8, 9, and 10 (these were the participants' choices when they indicated their levels of stress)? Thank you so much. – lisaarthur Nov 15 '23 at 17:20
  • 1
    I haven't used SPSS for analyses in a while, but to the best of my understanding, you'd define your binary IV as "indicator". This help page may help. Again to the best of my understanding you can leave stress as coded 7,8,9, and 10 as the actual numbers shouldn't matter, just the order, but I'm not 100% sure. – Sointu Nov 16 '23 at 07:35
  • @Sointu I did that but the results are exactly the same as before when I did not indicate stress as polynomial. It also still shows stress (1), stress (2), stress (3) like before https://stats.stackexchange.com/questions/630249/binary-logistic-regression-results-interpretation-when-one-iv-is-ordinal – lisaarthur Nov 16 '23 at 16:43
  • @JElder Help someone, please – lisaarthur Nov 16 '23 at 16:47
  • 1
    Ah, I didn't know you had already asked about this before. So, what happens when you use polynomial contrasts is that the model tests linear, quadratic and cubic relationships between stress and your outcome. So (again this is my best guess, as I don't use SPSS much anymore) stress (1) is the linear estimate for stress, stress (2) is the quadratic estimate of stress (testing whether there is a curvilinear relationship between stress and your outcome) and stress(3) is the cubic estimate of stress (testing whether there is a more complex, non-linear, relationship). – Sointu Nov 17 '23 at 07:48
  • 1
    Check the "categorical variable codings" in your output, "parameter coding" in that table tells you what were the contrasts underneath the stress(1), stress(2) and stress(3) estimates. – Sointu Nov 17 '23 at 07:50
  • 1
    In the earlier output you posted, you have specified stress as dummy-coded, meaning that you are just comparing each (existing, so 7,8,9 and 10) stress level with each other. So in that output stress(1) indicates whether stress=8 has any difference from other stress categories, stress(2) indicates whether stress=9 has any difference etc. Stress=7 is your reference category. – Sointu Nov 17 '23 at 11:27
  • @Sointu So I ticked 'polynomial' for my stress variable and the results are just as confusing as before. I'm posting my results above as it does not let me post it here. – lisaarthur Nov 18 '23 at 02:45
  • 1
    What is confusing about them? The results you posted here say you have a significant linear trend of stress predicting the probability of your outcome happening, but no curvilinear or cubic trend. So outcome is more likely at level 8 than level 7, more likely at level 9 than level 8 etc. You can now visualize this result by plotting the probability of outcome as a function of your four stress levels and report the estimates from the output table as you usually would. – Sointu Nov 18 '23 at 07:01
  • 1
    Maybe try to read some resources on ordinal predictors and polynomial contrasts in regression (you can read both those dealing with logistic and those about linear regression, the ordinal predictor issues are similar). But the results you have here are pretty straightforward. You have a significant linear trend of the ordinal stress predictor. – Sointu Nov 18 '23 at 07:16
  • 1
    RE: "It does not say what code corresponds to the 7, 8, 9, 10 levels of the IV." It literally does, though? Parameter coding(1) gives the linear contrasts for each level 7,8,9,10; (2) gives the quadratic/curvilinear contrasts for 7,8,9,10 and (3) gives the cubic contrasts for each level (by the rows corresponding to 7,8,9,10)? But you don't have to care so much about the contrast codings parameters, just visualize the relationship between stress and your outcome and report the model as usual. Remember to also report that your participants only used the upper part of the stress scale. – Sointu Nov 18 '23 at 13:13
  • I did read about these contrasts but I don't really understand it. Only Stress(1) is significant. What does it mean in terms of the outcome (prosocial behaviour)? – lisaarthur Nov 18 '23 at 17:39
  • You say 'So outcome is more likely at level 8 than level 7, more likely at level 9 than level 8 etc.' - Can I simply just conclude that higher the stress the more likely they are to engage in prosocial behaviour? – lisaarthur Nov 18 '23 at 17:39
  • If my gender IV has a negative coefficient, that would mean that females were less likely to engage in prosocial behaviour than males, no? This is because males were coded 0 and females were coded 1 and my reference category is the lowest level (first in spss). – lisaarthur Nov 18 '23 at 18:33
  • 1
    The results you edited into this question mean what I already said in my previous comments: there is a linear trend of stress predicting your outcome, meaning that the higher the stress category, the higher the probability of your outcome being 1. Unfortunately I'm not sure how to interpret the estimate (here 3.36) but you can't interpret it in the same way as you would if you specified stress as continuous linear predictor. However, there is a linear trend effect of a categorical ordered predictor (stress). – Sointu Nov 18 '23 at 18:45
  • 1
    Your interpretation of the gender effect is correct (it's not quite statistically significant, but yes, the negative coefficient for gender estimate suggests women were less likely to engage in prosocial behavior than men). – Sointu Nov 18 '23 at 18:47
  • 1
    And no problem, I know how frustrating it is when you are stuck, but I think at this point online forum can't help any more. Please try to find more basic resources online or in real life. E.g. try googling "ordinal predictor in regression" or the like and try to find a resource you can understand. Good luck! – Sointu Nov 18 '23 at 18:50
  • Sorry, so I can say that the higher the stress the more likely they are to engage in prosocial behaviour? – lisaarthur Nov 18 '23 at 19:01
  • 1
    As I said, I'm not entirely sure how to literally interpret the significant linear contrast estimate other than that there is a significant linear trend of the ordinal-level stress predictor. So yes the probability of your outcome increases on average when stress jumps from lower level to higher. In R, you could extract the estimate for the linear trend using emmeans contrast argument but probably not possible in SPSS. – Sointu Nov 19 '23 at 18:40
  • 1
    I found this resource helpful. – Sointu Nov 19 '23 at 18:40
  • Thank you! Ohh, I wouldn't understand these, it's R :( – lisaarthur Nov 19 '23 at 18:44
  • How do I graph the relationship between stress and the outcome? The outcome is prosocial behaviour and it's binary (yes, no). – lisaarthur Nov 19 '23 at 19:20
  • 2
    You don't have to understand R to understand the resource. The author is doing the exact same thing you are doing. E.g. the "power.F.L" is equivalent to your linear trend estimate. As for visualization, I'd extract the mean probabilities of being prosocial for each stress level and present them along with confidence levels, but you're going to have to find someone irl to show you how to do it in SPSS, it's impossible to explain online and is also kind of outside the scope of this forum. Again, good luck! – Sointu Nov 19 '23 at 20:01

0 Answers0