SPSS Statistics

 View Only
  • 1.  Interaction Contrast in GENLINMIXED

    Posted Wed March 27, 2024 05:16 PM
    Edited by Ryan Mon April 01, 2024 01:49 PM

    I am wondering how to perform an interaction contrast in the GENLINMIXED procedure. I have a mixed model with 3 effects, time and group (3 time points, 3 groups) plus their interaction, and I need to compare the 3 groups on the change just between the first two timepoints. I think you could do this with the /test command in MIXED, unfortunately I need the robust errors that are only obtained in the GENLINMIXED but I cannot find a corresponding command like /test.



    ------------------------------
    Ryan 
    ------------------------------



  • 2.  RE: Interaction Contrast in GENLINMIXED

    Posted Mon April 01, 2024 05:18 AM

    Hi Ryan

    To perform an interaction contrast in the GENLINMIXED procedure, we can use the EMMEANS command combined with the CONTRAST subcommand. First, run your mixed model using the GENLINMIXED procedure by including the necessary effects for time, group, and their interaction. Then use the EMMEANS command to estimate the means for each combination of time and group and use the CONTRAST subcommand within EMMEANS to create the interaction contrast. With the CONTRAST command, if required, you can adjust the coefficients based on your specific contrast of interest. This approach combines the estimation of means using EMMEANS with the creation of custom contrasts using the CONTRAST statement within the GENLINMIXED procedure, which allows you to perform the interaction contrast that you need with robust standard errors.



    ------------------------------
    Bindu Krishnan
    Senior Statistician
    IBM SPSS Statistics
    ------------------------------



  • 3.  RE: Interaction Contrast in GENLINMIXED

    Posted Mon April 01, 2024 01:49 PM

    Bindu, thank you for replying.

    I must be doing something incorrect, all I get is an error when I try to put anything in the contrast command that are not the words 'pairwise', 'simple', 'none' or 'deviation'. 

    Subcommand EMMEANS 1: CONTRAST must specify a single unquoted string.
    Execution of this command stops.

    And none of those keywords allow me to test the 2x3 interaction within the 3x3 design (i.e. change from time1 to time2 among the 3 groups). 



    ------------------------------
    Ryan
    ------------------------------



  • 4.  RE: Interaction Contrast in GENLINMIXED

    Posted Tue April 02, 2024 11:49 AM
    Edited by Bindu Krishnan Tue April 02, 2024 11:50 AM

    Hi Ryan

    After performing GENLINMIXED procedure, Click Analyze > Generalized Linear Models > Estimated Marginal Means. In the Estimated Marginal Means dialog box, select Group and Time as the factors, Click Add to move them to the Display Means for box and  Click OK to obtain the marginal means. Now to perform Interaction contrast with CONTRAST with the Estimated Marginal Means output open, identify the means for each combination of Group and Time. Based on your specific contrast (e.g., comparing Group 1 to Group 2 for the change between the first two time points), you can calculate the contrast coefficient manually (-1 for Group 1, 1 for Group 2, and 0 for the other groups) or by using the following syntax

    MIXED DependentVariable BY Group Time

    /FIXED=Group Time Group*Time | SSTYPE(3)

    /RANDOM=Intercept | SUBJECT(SubjectID) COVTYPE(VC)

     /EMMEANS=TABLES(Group*Time) COMPARE(Group)

    /CONTRAST(Group)=SPECIAL(1 -1 0) GROUP(1) TIME(0).

    Here the last line defines the interaction contrast where Group 1 is compared to Group 2 for the change between the first two time points. Also, you can adjust the contrast coefficients (-1 for Group 1, 1 for Group 2, and 0 for the other groups) based on your specific interaction contrast of interest.

    Regards



    ------------------------------
    Bindu Krishnan
    Senior Statistician
    IBM SPSS Statistics
    ------------------------------



  • 5.  RE: Interaction Contrast in GENLINMIXED

    Posted Thu April 04, 2024 02:30 PM

    Bindu, I appreciate the attempt.

    For individuals who might find this in the future, searching for an answer to a similar question. The GENLINMIXED procedure does not allow for a "/contrast" statement, and the contrast outlined would only compare 2 groups over 2 timepoints, not all 3 groups. 



    ------------------------------
    Ryan
    ------------------------------