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
  • 1.  Making a vector in Custom Dialog Builder

    Posted 09/06/20 11:49 AM

    Hello,

    I'm trying to make a syntax in the Custom Dialog Builder for making a vector. In my traditional syntax this looks like:

    VECTOR score = score.1 to score.5.

    In the Custom Dialog I want to select the variables for this vector using a Target List. How do I need to specify this in the syntax template for this in the Custom Dilog Builder? (e.g., "VECTOR score = %%score%%." doesn't work).

    Hope anyone can help me with this.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Making a vector in Custom Dialog Builder

    Posted 09/06/20 07:10 PM

    From the CSR,

    "The TO convention must be used to specify the variable list. Thus, variables specified must be consecutive"

    If the data meet this requirement, you would use two single-variable target lists to specify the first and last variables in the vector.

    If this is not the case, you might be able to create a macro - directly or using the SPSSINC SELECT VARIABLES extension command depending on what you need to do with the vector.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: Making a vector in Custom Dialog Builder

    Posted 09/08/20 09:53 AM

    Thanks for this answer Jon, using two target lists did the job!






    #SPSSStatistics
    #Support
    #SupportMigration


  • 4.  RE: Making a vector in Custom Dialog Builder

    Posted 09/08/20 12:55 PM

    Great. You might want to add some static text in the dialog telling the user about the restriction, since it cannot be checked in the dialog box.






    #SPSSStatistics
    #Support
    #SupportMigration