SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Viewing code - Transform/Compute variable

    Posted Mon August 22, 2022 05:01 PM
    Hello!
    Another newbie question...

    I used "transform" to "compute" or "recode" variables which all worked ok.
    But now, I do not remember how I wrote the numeric expression.
    (When I wrote syntax for a different variable, I copied it into a back up doc but I did not track this in this instance).

    Is there a way to look this up? 

    Thank you!



    ------------------------------
    A MC
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Viewing code - Transform/Compute variable

    Posted Mon August 22, 2022 05:51 PM
    All the code from the dialog boxes actually runs by generating syntax and submitting it to the SPSS backend.  That means that, assuming you have the journal file turned on, which it is by default, you can open the journal file and find the syntax you ran implicitly.

    Go to Edit > Options > Files, and you will see the journal file name and location, so you can open it via File > Open > Syntax.  It can get pretty big, so jump to the end of the file and scroll backwards until you find your COMPUTE (or use Edit > Search).

    --





  • 3.  RE: Viewing code - Transform/Compute variable

    Posted Mon August 22, 2022 06:58 PM
    Thank you! I turned it on.

    ------------------------------
    A MC
    ------------------------------



  • 4.  RE: Viewing code - Transform/Compute variable

    Posted Mon August 22, 2022 06:02 PM
    Edit > Options > File Locations

    Look for Session Journal. That is a journal file that holds all the commands you have run. Navigate to that and open it. Warning - it can get kinda large. Now and then you might want to delete stuff out of it you don't want. You'll notice that you also have the option to overwrite the journal every time you start SPSS. Maybe keep appending to it, but every now and then think about editing it down a little.

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



  • 5.  RE: Viewing code - Transform/Compute variable

    Posted Mon August 22, 2022 06:59 PM
    Thanks much!

    ------------------------------
    A MC
    ------------------------------