SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Coding

    Posted Tue January 16, 2024 05:00 PM
    Edited by IBMcode SPSS Wed January 17, 2024 03:23 PM

    Hello,

    As new user of SPSS i have a question as follows:

    Suppose is given a dataset :

    Group Gender
    1 M
    1 M
    1 F
    1  
    2 F
    2 F
    2 F
    2 M

    In SAS , using proc freq; table Group*Gender/list missing; outputs the result in tabular form as follows:

    Group Gender Frequency Percent Cumulative
    Frequency
    Cumulative
    Percent
    1   1 12.50 1 12.50
    1 F 1 12.50 2 25.00
    1 M 2 25.00 4 50.00
    2 F 3 37.50 7 87.50
    2 M 1 12.50 8 100.00

     

    I tried to achieve same result in SPSS using freq and crosstab method , but I could not:

     
    *1. 
        freq variables = Group  Gender.
    *2.
    crosstabs 
    /tables  =Group by Gender
    /MISSING = include.

    I would appreciate any help on this.






  • 2.  RE: Coding

    Posted Tue January 16, 2024 06:19 PM
    First, make sure that the  measurement levels are set correctly (Data Editor > Variable View or the VARIABLE LEVEL command).  Then use CTABLES (Analyze > Tables > Custom Tables).

    Drag the variables to the  Row area; then click on Statistics and choose which ones you want.  You have many choices there.  You can also add a columns dimension if you want something more like a crosstab.

    --





  • 3.  RE: Coding

    Posted Wed January 17, 2024 02:53 PM
    Edited by IBMcode SPSS Wed January 17, 2024 03:23 PM

    Hi John,

    As i tried to follow your solution, l found out my license version does not include this option.

    Anyway, I appreciate your help.

    Thank you.







  • 4.  RE: Coding

    Posted Wed January 17, 2024 03:06 PM
    Are you sure?  CTABLES is included in the Standard Edition.

    --





  • 5.  RE: Coding

    Posted Wed January 17, 2024 03:16 PM

    It is not included in the Analyze tab.

    I tried using the syntax:

    ctables
        / variables = Group  Gender.

    and it gives an error as:
    "There is no license for SPSS Custom Tables"

    Thank you.



    ------------------------------
    IBMcode SPSS
    ------------------------------



  • 6.  RE: Coding

    Posted Wed January 17, 2024 03:31 PM
    Run SHOW LIC from the syntax window to see what you are licensed for.  There is a stripped down BASE version, but my impression is that that isn't used very often.  It certainly would not be a good start on replacing SAS functionality.

    The CTABLES option is also available for licensing separately.

    --





  • 7.  RE: Coding

    Posted Wed January 17, 2024 03:36 PM

    This is what it shows:

    1. IBM SPSS Statistics
    2. IBM SPSS Data Preparation
    3. IBM SPSS Bootstrapping
    4. IBM SPSS Statistics Base

    Thank you.



    ------------------------------
    IBMcode SPSS
    ------------------------------



  • 8.  RE: Coding

    Posted Wed January 17, 2024 03:44 PM
    I see that you have the bare minimum, so you will need to upgrade to get CTABLES either by licensing just that option or getting the Standard Edition.--





  • 9.  RE: Coding

    Posted Wed January 17, 2024 03:48 PM

    Hi John,
    Yes, it is true, it is related to license upgrade.

    Looks like i am going to bother very often with syntax question.

    Thank you.



    ------------------------------
    IBMcode SPSS
    ------------------------------