SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Syntax command for adding text to the output

    Posted Mon July 17, 2023 09:29 AM

    Hi folks! I was trying to find the correct way to add text to the output file. I'd like to add a title and also my comments on the results and I tried to do this via the commands TITLE and TEXT in the syntax. The commands are: TITLE "abc" and TEXT "abc", but TITLE is coming with red letters and the whole TEXT line has red letters too, indicating there might be something wrong even though both show up in the output file (although the TEXT is displayed only in a single very long line, which is not too handy). I'd be grateful for your advice on this.

    Best, Chris



    ------------------------------
    Christoph Janka
    ------------------------------


  • 2.  RE: Syntax command for adding text to the output

    Posted Mon July 17, 2023 09:48 AM
    TEXT is an extension command, so install it via Extensions > Extension Hub, since apparently you don't already have it.

    You can get help on the TEXT syntax by typing
    TEXT
    in a syntax window and pressing F1 with the cursor on the command.

    Here is the beginning of the syntax help for it.

    TEXT list of quoted strings
    /OUTLINE HEADING="text" TITLE="text" PAGEBREAK = NO** or YES

    /WRAP WRAP=number

    * Required
    ** Default

    TEXT /HELP displays this text and does nothing else.

    TEXT "The following analysis assumes normally distributed residuals" "If this assumption is false, confidence intervals may be incorrect." /OUTLINE HEADING="Attention" TITLE='Note to Reader'. 

    Here is an example using html markup

     TEXT "<html>Bold is in bold <b>bold</b><br/>" "This line has a <sup>superscript</sup> and a <sub>subscript</sub>.</html>" /OUTLINE HEADING="Comment" TITLE= "Html example".

    --





  • 3.  RE: Syntax command for adding text to the output

    Posted Tue July 18, 2023 05:04 AM

    Thanks Jon, works great!

    May I ask you for your advice on the TITLE command as well? I'm looking for a subcommand that lets me define the name shown at the icon in the output, so far it says by default "Page Title" and replicating the steps from the TEXT command does not work in this case. 

    Thanks a lot!



    ------------------------------
    Christoph Janka
    ------------------------------



  • 4.  RE: Syntax command for adding text to the output

    Posted Tue July 18, 2023 09:25 AM
    TEXT would not affect the titles, but the SPSSINC MODIFY OUTPUT extension command gives you a lot of control over the outline and item titling.  It has a special keyword for page titles.  Here is an example.

    SPSSINC MODIFY OUTPUT PAGETITLES
    /IF PROCESS=PRECEDING
    /REPLACE ITEMS OUTLINETITLE= "this is my outline title".

    You can install this via Extensions > Extension Hub if you don't already have it.  It has a lot of other options, too.

    --





  • 5.  RE: Syntax command for adding text to the output

    Posted Wed July 19, 2023 10:05 AM

    Works perfectly fine! Thanks a lot Jon!



    ------------------------------
    Christoph Janka
    ------------------------------