SPSS Statistics

 View Only
  • 1.  Sequence Transformations

    Posted Thu March 02, 2023 11:35 AM

    Is there a way to generate sequence transformations (a sequence of dummy variables times a numeric variable) through the user interface, other than creating them one by one?



    ------------------------------
    Robert Cale
    ------------------------------


  • 2.  RE: Sequence Transformations

    Posted Thu March 02, 2023 12:10 PM

    Not an automatic way, but you can duplicate lines and then edit them individually. Not perfect, but better than nothing. To do that:

    Open a syntax window (File > New > Syntax if you don't already have one open)

    On the Edit Menu, select the keyboard shortcuts:

    You could try COMMAND+U (For Windows, substitute CTRL for COMMAND for all of these, so CTRL+U on Windows) to duplicate the current line of a syntax file.



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



  • 3.  RE: Sequence Transformations

    IBM Champion
    Posted Thu March 02, 2023 12:35 PM
    Why not use do repeat?






  • 4.  RE: Sequence Transformations

    Posted Thu March 02, 2023 12:36 PM

    Because I didn't think of it. :)

    DO REPEAT is a great idea.



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



  • 5.  RE: Sequence Transformations

    IBM Champion
    Posted Thu March 02, 2023 01:11 PM
    You can do this using the DO REPEAT syntax.  For example,

    DO REPEAT #V = D1 TO D10.
    COMPUTE #V = #V * X.
    END REPEAT.

    If the dummies are not contiguous, you can just list the names.

    --





  • 6.  RE: Sequence Transformations

    Posted Thu March 02, 2023 02:09 PM

    Thank you both!