SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 05:03 AM
    Edited by System Admin Fri January 20, 2023 04:11 PM
    Hi IBM community,
    I have a problem with calculating the p value for differences in diagnoses between cohorts. I have tried cosstabs but it wont show me the p-value per diagnosis.
    the variables are:
    diagnosis: value ranges from 1-6 with each numer corresponding to a diagnosis
    group: value is either 1 or 0 allocating participants in a group

    this is what i want:
    any idea how i could slap this together? i dont mind if i have to calculate the significance for each diagnosis myself and manually add the p-value to the table. the main problem is that i dont know how i calculate the p-value for each diagnosis


    ------------------------------
    Daniel van Lammeren
    ------------------------------
    #SPSSStatistics


  • 2.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 08:36 AM
    Hi.

    Try the CHISQUARE option in NPAR TESTS.


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



  • 3.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 11:59 AM
    Hi Rick,
    I've tried your suggestion. i run into a problem that i cant run a non-paramedic test, because i cant test nominal fields:

    i feel like i am not selecting the right options or should be using something different. any idea what i could try?

    thanks for your help

    ------------------------------
    Daniel van Lammeren
    ------------------------------



  • 4.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 12:03 PM
    Try the one in Analyze>Nonparametric Tests>Legacy Dialogs>Chi-square...



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



  • 5.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 12:26 PM
    Allright, now i have another question,
    this is what i'm seeing:

    previously i was able to add one variable to a kind of "group" section and the other variable to a "test" section. here i cant find that option. so when i run the test this is my output:

    not something like the individual p values that i was hoping for...

    any idea how i could tackle this problem?

    ------------------------------
    Daniel van Lammeren
    ------------------------------



  • 6.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 04:52 PM
    Edited by System Admin Fri January 20, 2023 04:24 PM
    -- Never mind -- test of proportions isn't the test you want.
    #SPSSStatistics


  • 7.  RE: PROBLEM: calculating p value per diagnosis
    Best Answer

    Posted Tue October 25, 2022 05:26 PM
    Edited by System Admin Fri January 20, 2023 04:18 PM
    You could always do the chi-square values like this:

    data list free /n1 n2.
    begin data.
    13 28
    0 7
    4 4
    41 23
    11 11
    5 10
    end data.
    compute e=(n1+n2)/2.
    compute o=(n1-e)**2+(n2-e)**2.
    compute chi2=o/e.
    compute pvalue=1-CDF.CHISQ(chi2,1).
    formats chi2 (F8.3) pvalue (F8.6).
    list n1 n2 chi2 pvalue.

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



  • 8.  RE: PROBLEM: calculating p value per diagnosis

    Posted Tue October 25, 2022 06:11 PM
    Thanks Rick!
    it did the trick.

    ------------------------------
    Daniel van Lammeren
    ------------------------------