SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
  • 1.  Marginal Homogeneity test

    Posted Mon May 01, 2023 03:30 PM
    Hi, is there a way to use a grouping variable (pre=1. post=2) here to pair the data or do I need a separate pre variable and post variable for each pair? 
    Thanks, 
    Megan
    image.png


  • 2.  RE: Marginal Homogeneity test

    Posted Tue May 02, 2023 09:13 AM

    Hi. You need variables that are paired. It may be possible to go from what you have to what you need by using the CASESTOVARS command (as long as the variable you want to "pair" has a unique case identifier, like the "id" variable in this example):

    dataset close all.
    data list free /group score id (3F2).
    begin data.
    1 15 1
    1 13 2
    1 16 3
    1 17 4
    1 13 5
    2 12 1
    2 13 2
    2 12 3
    2 10 4
    2 10 5
    end data.
     
    SORT CASES BY id group.
    CASESTOVARS /ID=id /GROUPBY=VARIABLE.
    LIST.


    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------