SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Script for analysis table

    Posted Fri October 28, 2022 04:17 AM

    Can you please tell me if it is possible to script the construction of a certain analysis in the table?
    Each time you have to re-age the table, and this is a long time.

    Example:
    - Analyze
    - custom tables
    - New custom tables
    - Rows: F2_2 (variables)
    - Columns : F4 (variables)



    ------------------------------
    Andranik Galstyan
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Script for analysis table

    Posted Fri October 28, 2022 09:58 AM
    I am not sure what you are asking, but you can paste CTABLES syntax from the canvas and then just edit the changing parts.  You could also create a macro where the variable(s) you want to change are parameters.  If you can be more specific about what you want to vary, we can provide more information.

    --





  • 3.  RE: Script for analysis table

    Posted Tue November 08, 2022 08:03 AM

    The first line contains data in 151, how can I see what data is there?

    ------------------------------
    Andranik Galstyan
    ------------------------------



  • 4.  RE: Script for analysis table

    Posted Tue November 08, 2022 09:23 AM
    The table is displaying the variable label, so I don't know the variable name. If you are asking how to see the data for the 151 cases that have the first value for that variable, there are different ways. It depends on how much of the data you want to see. If you want to see the data in the output viewer, you could run syntax like below, only substitute the variable name you want and the value that corresponds to the 151 cases in the table.

    TEMPORARY.
    SELECT IF <that_variable_name> = <whatever_the_first_value_is>.
    SUMMARIZE <whatever variables you want to see, or to see all variables use ALL> /FORMAT LIST /CELLS NONE /STATISTICS NONE.

    If you have a lot of variables, ALL can give you a very wide table, so be careful.

    If you want to see the data in the data editor, you could run syntax like this:

    SORT CASES BY <that_variable_name>.

    then go to the data editor and actually scroll around and look at the first 151 cases.

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



  • 5.  RE: Script for analysis table

    Posted Wed November 09, 2022 12:34 AM
    Greetings.
    According to the table above, I need to find the following
    Which of the people to the question "F2_2" is the name of the variable
    Answered "Almazar district (Sobir Rakhimov district)", so I have difficulties.

    When I write:
    TEMPORARY.
    SELECT IF=F2_2
    SUMMARIZE=Almazar district (Sobir Rakhimovsky district)
    /FORMAT LIST /CELLS NONE /STATISTICS NONE.

    The script throws an error:
    >Error number 4024p in column 10. Text: =
    >Invalid sequence of operations detected. Check the expression for
    >omitted or extra operands, operators, and parentheses.
    >Execution of this command is terminated.

    ------------------------------
    Andranik Galstyan
    ------------------------------



  • 6.  RE: Script for analysis table

    Posted Wed November 09, 2022 09:48 AM
    I suggest that for now you use the menus to generate the syntax as there are several errors in this code.  Using the menus will get the valid syntax .

    --