SPSS Statistics

Expand all | Collapse all

OUTPUT EXPORT does not include CTABLES significance test

  • 1.  OUTPUT EXPORT does not include CTABLES significance test

    Posted Fri July 23, 2021 11:01 AM
    Edited by Konrad Gałuszko Fri July 23, 2021 11:02 AM
    There's something odd with OUTPUT EXPORT command and I don't know if a problem is on my side or SPSS's.

    Normally when I turn on significance test in CTABLES I have a following footnote below Z-test table:
    Results are based on two-sided tests. For each significant pair, the key of the category with the smaller column proportion appears in the category with the larger column proportion.

    Significance level for upper case letters (A, B, C): 0,05.


    I also see this footnote in output window. However when I use a macro to export - footnotes are not present in a final Excel file.

    define oexport (!positional !charend('/')
    /!positional !default("name.xlsx") !cmdend)

    output modify
    /select all except (charts tables models texts pagetitles)
    /deleteobject delete = yes.

    OUTPUT EXPORT
    /CONTENTS EXPORT = visible LAYERS = all MODELVIEWS = printsetting
    /XLSX DOCUMENTFILE = !quote(!unquote(!2))
    OPERATION = createsheet
    sheet = !quote(!unquote(!1))
    LOCATION = lastcolumn NOTESCAPTIONS = no

    !enddefine.


    Aditionally, I use two Python scripts in order to disable/enable logging some unnecessary elements to output window. I run them before (disable) and after (enable) creating a report. Still, I can see CTABLES footnote after I run this script:

    import spss
    import SpssClient
    
    SpssClient.StartClient()
    
    SpssClient.SetPreference(SpssClient.PreferenceOptions.DisplayCommandsLog,r"Off")
    SpssClient.SetPreference(SpssClient.PreferenceOptions.LogContents,r"hidden")
    SpssClient.SetPreference(SpssClient.PreferenceOptions.NotesContents,r"hidden")
    
    SpssClient.StopClient()
    SpssClient.Exit()


    I use SPSS 27. Is this a bug or my error somewhere?
    ------------------------------

    Konrad Gałuszko
    ------------------------------


  • 2.  RE: OUTPUT EXPORT does not include CTABLES significance test

    Posted Fri July 23, 2021 12:29 PM
    There is a setting in OUTPUT EXPORT for whether or not to display notes.  You have it set to NO

    From the CSR:
    The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported
    document.

    Also, although your Python scripts will work fine, you can suppress these objects directly using OMS.  You would write
    OMS SELECT LOGS TABLES/IF SUBTYPES="Notes"
    /DESTINATION VIEWER=NO.

    <other commands>
    OMSEND.

    --





  • 3.  RE: OUTPUT EXPORT does not include CTABLES significance test

    Posted Fri July 23, 2021 01:06 PM
    You were right! Thanks! Now I wonder how I could have not noticed it earlier...

    ------------------------------
    Konrad Gałuszko
    ------------------------------