SPSS Statistics

SPSS Statistics

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


#Analytics
#SPSSStatistics
#Analyticstools
 View Only
Expand all | Collapse all

Delete or hide rows EXAMINE-DESCRIPTIVES

  • 1.  Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 12 days ago

    Hi,

    I have a simple code to get the descriptive statistics, and I want to keep only MEAN UCI LCI in this table. I thought it could be done with OUTPUT MODIFY or SPSSINC MODIFY TABLES, but I was not able. This is because I have many variables and groups and I need to focus on three rows.

    This is the syntax:

    EXAMINE VARIABLES=Var1
      /PLOT NONE
      /STATISTICS DESCRIPTIVES.

    Keep:
    Mean
    95% Confidence Interval for Mean Lower Bound
    Upper Bound
    Delete or hide:
    5% Trimmed Mean
    Median
    Variance
    Std. Deviation
    Minimum
    Maximum
    Range
    Interquartile Range
    Skewness
    Kurtosis
    This is some of the codes that I tried:
    OUTPUT MODIFY
      /SELECT TABLES
      /IF SUBTYPES = ['Descriptive']
      /TABLECELLS SELECT=["Skewness" "Kurtosis"] HIDE=YES.

    SPSSINC MODIFY TABLES SUBTYPE="Descriptive"
      SELECT="Mean" "Lower Bound" "Upper Bound"
      DIMENSION=ROWS.

    What am I missing. It sounded as a simple idea, but the syntax does not modify, hide or delete.

    Thank you for your advice.

    Ki



    ------------------------------
    Ki Park
    ------------------------------


  • 2.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 12 days ago
    I am traveling until next week and don't have my computer, but here are a few thoughts.  With MODIFY TABLES, specify the statistics you want to hide and then specify hiding as the action.  I think you can also do that with OUTPUT MODIFY





  • 3.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 12 days ago

    Hi Jon, and thank you for replying to this post. I was actually hoping that you will respond.

    Yes, I have tried to use both options with no success. I went to IBM command 'center' to see if there is any subcommand to delete/hide the row in the tables with no success. Below are the codes that I tried, but they don't do anything to the table. 

    This is NOT an urgent matter, and I can wait until you come back from your break and have more time to try different options.  Ki

    OUTPUT MODIFY
      /SELECT TABLES
      /IF SUBTYPES = ['Descriptive']
      /TABLECELLS SELECT=["Skewness" "Kurtosis"] HIDE=YES.

    SPSSINC MODIFY TABLES SUBTYPE="Descriptive"
      SELECT="Mean" "Lower Bound" "Upper Bound"
      DIMENSION=ROWS.



    ------------------------------
    Ki Park
    ------------------------------



  • 4.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 12 days ago
    That MODIFY TABLES code doesn't do anything.  You need to select the other stats and choose the hide option.  We can go further next week.






  • 5.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 7 days ago
    I misunderstood what procedure you were  using, but with EXAMINE, it's actually easy to do this, although it isn't very obvious.  The EXAMINE output is awkward as initially produced.  I generated the MODIFY TABLES output from the dialog, so it has some unnecessary keywords, but it works.

    Here is an example.
    EXAMINE VARIABLES=salary jobtime educ
      /PLOT NONE
      /STATISTICS DESCRIPTIVES.

    SPSSINC MODIFY TABLES subtype="'Descriptives'"
    SELECT=3 4 5 6 7 8  9 10 11 12
    REGEXP=NO DIMENSION=ROWS LEVEL = -1  SIGLEVELS=BOTH
    PROCESS = PRECEDING HIDE=YES
    /STYLES  APPLYTO=DATACELLS
    USEABS=NO HMSCALE=LINEAR.

    The SELECT chooses the rows you want to hide counting from 0.  These are repeated for each variable, but you only have to pick them once.   So everything except the first two (based on the first column in the rows) and hides them.

    image.png

    If you want to get rid of the Std Error column, you can apply MODIFY TABLES a second time
    SPSSINC MODIFY TABLES subtype="'Descriptives'"
    SELECT=1
    REGEXP=NO DIMENSION=COLUMNS LEVEL = -1  SIGLEVELS=BOTH
    PROCESS = PRECEDING HIDE=YES
    /STYLES  APPLYTO=DATACELLS
    USEABS=NO HMSCALE=LINEAR.

    image.png
    Let me know if you need more help.





  • 6.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 7 days ago

    Hi Jon,

    I really appreciated. It works and I have never guessed these lines. 

    Thanks.

    Ki



    ------------------------------
    Ki Park
    ------------------------------



  • 7.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 7 days ago

    Hi Ki,

    Please try the below syntax. It works my end.

    SPSSINC MODIFY TABLES 
        SUBTYPE="Descriptives"
        SELECT="5% Trimmed Mean" "Median" "Variance" "Std. Deviation" "Minimum" "Maximum" "Range" "Interquartile Range" "Skewness" "Kurtosis"
        DIMENSION=ROWS
        HIDE=TRUE.

    Hope that it helps. I tried to reply on this thread twice before but they do not show here. Do not know why. 



    ------------------------------
    Khanh Huynh
    ------------------------------



  • 8.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 7 days ago

    Hi Khanh,

    Thank you for your reply. Your code is similar to what I was trying to do in the first place, but it outputs an empty table.

    Ki



    ------------------------------
    Ki Park
    ------------------------------



  • 9.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 6 days ago

    Hi Ki,

    I see. But your solution used SPSSINC MODIFY TABLES in the first place missing HIDE=TRUE so it doesn't do anything to the table.



    ------------------------------
    Khanh Huynh
    ------------------------------



  • 10.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 6 days ago

    Hi Khanh,

    Thank you again. I should have replied more clearly. I tried your code (and by the way my initial codes were wrong), but the table show no mean and the CIs. By empty table means that no row is shown (like hiding all the rows) and only shows the heading (see below).

    I have tried -using Jon's code- to see which subcommands are really affecting the code, and a shorter code below that is 'trimmed' from Jon's code works.  I tried to add the LEVEL and or PROCESS in your code, but it still continue to show only the headings. 

    SPSSINC MODIFY TABLES subtype="'Descriptives'"
    SELECT=3 4 5 6 7 8  9 10 11 12
    DIMENSION=ROWS LEVEL = -1 
    PROCESS = PRECEDING HIDE=YES.

    Thanks!

    Ki



    ------------------------------
    Ki Park
    ------------------------------



  • 11.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 7 days ago

    That works, too, but just using the column numbers in the SELECT saves typing and reduces the likelihood of errors.


    --





  • 12.  RE: Delete or hide rows EXAMINE-DESCRIPTIVES

    Posted 6 days ago

    Hi Khanh,

    I tried your code in steps, and when the code list only one row (e.g. "Median") it works, so I think it is more of a problem of "too many" in the list. When I tried with first two (see the code below) it actually kept the means and CIs as I wanted and hide all the rows below. Maybe it is just a bizarre behavior of my SPSS:

    SPSSINC MODIFY TABLES 
        SUBTYPE="Descriptives"
        SELECT="5% Trimmed Mean" "Median" 
        DIMENSION=ROWS   HIDE=TRUE.

    Thanks.

    Ki



    ------------------------------
    Ki Park
    ------------------------------