I am asking because I am lost and I failed my first submission because of wrong analysis.

The goal of my experiment is to examine the moderating role of product involvement in the relationship between maximizing tendency and intentions to switch a product. Maximizing tendency (the independent variable) is measured as a continuous variable, intention to switch as a binary variable (Yes or No). Product involvement is measured by testing participants for 2 product categories, differing in involvement (High or Low).

To be more specific, I measured participants maximizing tendency and then participants had to complete a task which consisted in choosing a product from an assortment, and after they were asked if they wanted to switch to a different model. Every participant did this one time for a high involvement product category, and another time for a low involvement product category (so it is a within-subjects design). So each participant has a maximizing tendency score and intention to switch "values" for each category (so either Yes or No). Keep in mind, they have intention to switch for the high involvement product and intention to switch for the low involvement product.

I need to check whether there is an interaction effect, but I don't know how to do it. I tried using logistic regression, analyzing each product category separately but this did not allow me to measure any significant difference between the 2 conditions. I am looking online but I don't find anything perfect for my case. What kind of statistical test can I use to analyze this? P.S. I am using SPSS


2 Answers 2


Multilevel models frequently do not capture the right correlation patterns. A method that models serial correlation and allows, unlike a random intercepts model, the correlation between two binary occurrences within the same individual to lessen as the time gap increases, is more likely to fit. One such model is a first-order Markov binary logistic model, which does not require the use of random effects and is easy to set up.

With the tall and thin dataset you add a variable that is the outcome status of the customer in the previous time period. You need to start the process off by having a baseline status or assuming that at time 0 no one intends to switch already. The previous period's outcome status is just a covariate in the logistic model, and you also need to add elapsed time as a covariate, plus nonlinear terms for time, to allow for arbitrary drift in the switch tendencies.

This first-order Markov state transition model handles the case where the outcome can reoccur as well as the case where it is a terminating event ("absorbing state"). For the latter, the multiple rows per customer just stop at the terminating event.

A case study for the more complicated situation where the outcome status is ordinal with more than two levels may be found here.

  • $\begingroup$ As a non-statistician who usually defaults to multilevel model, thank you for this! Can I ask a related question - would using an unstructured covariance structure in a multilevel model overcome the issue of the model not capturing the correct correlation patterns? $\endgroup$
    – Sointu
    Commented Jul 28, 2023 at 8:59
  • 1
    $\begingroup$ Good question. When subjects are measured at different times or there are a lot of distinct time points, an unstructured covariance matrix has too many parameters, creating convergence problems and instability. An unstructured pattern probably works fine when there are 3 time points, typically. $\endgroup$ Commented Jul 28, 2023 at 12:05
  • $\begingroup$ That makes sense, thank you! :) $\endgroup$
    – Sointu
    Commented Jul 28, 2023 at 13:43
  • 1
    $\begingroup$ On this site thanks is expressed by upvoting comments, questions, and answer. $\endgroup$ Commented Jul 28, 2023 at 17:43

Does the following

  id  max      intswitch cond
   1  3.351453         1 high
   1  3.813666         1  low
   2  1.881614         0 high
   2  4.234444         0  low
   3  3.198558         0 high
   3  3.306464         0  low
   4  1.982942         1 high
   4  2.858967         1  low
   5  4.139784         1 high
   5  3.502371         0  low
   6  1.364619         0 high
   6  1.604352         0  low

match your data structure? In the example, id refers to participant identifier, max to maximizing tendency (I drew it from normal distribution with mu=3 and sd=1, maybe your variable is different but ignore that for the example's sake), cond to product involvement (high or low, each participant goes through both), and intswitch to intention to switch (0=no, 1=yes)?

If so, I think a multilevel logistic regression model with max and cond and their interaction predicting intention to switch and including random intercept of participant should work. The interaction and relevant post-hoc comparisons will provide evidence about whether maximizing has a different relation with switching intentions in the high vs. low involvement condition, and the participant id random intercept will take care of the repeated nature of the data. You can do this in SPSS using Mixed models...Generalized linear option.

The r code I would use would be

model<-glmer(intswitch ~ (1|id)+cond*max, data=data, family="binomial")

but I don't dare suggest SPSS syntax as it's been too long since I used SPSS for this type of analyses.

EDIT - so your data is

id max  intswitch cond
1  3    1         high   #here, high would refer to the 
1  3    0         low    #trial where the participant was presented
2  2    0         high   #with high involvement products and low
2  2    0         low    #to the trial with the low involvement 
3  1.5  1         high   #products
3  1.5  1         low

Or, possibly, the "cond" variable is yet somehow different? If so, please clarify.

But in any case, it seems to me you can model your data in multilevel logistic regression regressing intention to switch on the condition variable, maximizing tendency and their interaction and include participant random intercept, and that should be doable in SPSS Mixed Models Generalized Linear :)

EDIT 2 - if your data in SPSS now has this kind of structure

id1 max low high
1   3   0   0
2   4   1   0
3   2   1   0
4   2   1   1
5   3   0   0
6   5   1   1
7   4   0   0
8   4   1   1
9   3   1   0
10  2   1   0

You can restructure it into long format with the following or something like it

  /MAKE cond FROM low high
  /KEEP=id1 max 

(id variable cannot be called "id" in SPSS VARSTOCASES for some reason, so I changed it into id1)

  • $\begingroup$ Thank you so much. My data structure is different, in a sense that each participant has one maximizing tendency score, and values (0 or 1) for intention to switch high and intention to switch low. I don't know if that changes something in your answer. $\endgroup$
    – Lorenzo
    Commented Jul 26, 2023 at 15:27
  • $\begingroup$ Not really - it wouldn't even change the example r code. Maximizing tendency would then just be a level 2 predictor. I didn't quite get whether you have 2 or 4 "intention to switch" scores per participant, but that doesn't change things either. If you organize your data in the long format (so that each row = 1 observation and the same participant has as many rows as there are observations per participant). $\endgroup$
    – Sointu
    Commented Jul 27, 2023 at 11:09
  • $\begingroup$ Well my problem then is that I don't have a variable indicating the condition. The variables I have, for each participant, are: id, maximizing score, intention to switch for high and intention to switch for low. The structure is different from the one proposed in the edit (I don't have doubles for participants) $\endgroup$
    – Lorenzo
    Commented Jul 29, 2023 at 13:28
  • $\begingroup$ Yes, you would need to restructure your data into long format to do the suggested analysis (at least in R and SPSS). Such restructure creates a variable indicating repeated measures across participants (here: cond). See SPSS tutorials for Data restructure (I believe varstocases is the function to do this). $\endgroup$
    – Sointu
    Commented Aug 1, 2023 at 9:38
  • $\begingroup$ I mean, you do have two scores of intention to switch for each participant, right? They are just currently in the form of 2 separate variables (columns/vectors) so that you have one row per participant in your data? $\endgroup$
    – Sointu
    Commented Aug 1, 2023 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.