SPSS Statistics

SPSS Statistics

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

 View Only
Expand all | Collapse all

variables

  • 1.  variables

    Posted Thu July 15, 2021 09:17 AM

    Dear

    I need to convert three independent variables (V1; V2; V3) into categories of a new variable (V (n): Cat1 (v1) .; Cat2 (v2); Cat3 (v3)). I have studied the procedures of Counting and recoding variables but they do not work. Please could you tell me if it is possible to create the new three category variable in SPSS.

    Thank you



    ------------------------------
    DAMIAN HERRERA
    ------------------------------

    #SPSSStatistics


  • 2.  RE: variables

    Posted Thu July 15, 2021 09:19 AM
    Please clarify with an example.

    --





  • 3.  RE: variables

    Posted Thu July 15, 2021 11:44 AM

    Dear Jon Peck

    I have three variables: V1 (Non-religious); V2 (something religious); V3 (very religious)

    I want to unite the three variables in a single variable (religiosity) with three categories: Category 1 (Non-religious); Category 2 (somewhat religious); category 3 (very religious)

     

    How could I do it with SPSS?

     

    Thanks

     

     

    Please clarify with an example. -- Jon K Peck jkpeck@gmail.com -posted to the "SPSS Statistics" group

    IBM Community

    SPSS Statistics

    Post New Message

     

    Re: variables

    Jon Peck

    Jul 15, 2021 9:19 AM

    Jon Peck

    Please clarify with an example.

     

    --

    Jon K Peck
    jkpeck@gmail.com




      Reply to Group Online   View Thread   Recommend   Forward  


    Dear<o:p></o:p>

    I need to convert three independent variables (V1; V2; V3) into categories of a new variable (V (n): Cat1 (v1) .; Cat2 (v2); Cat3 (v3)). I have studied the procedures of Counting and recoding variables but they do not work. Please could you tell me if it is possible to create the new three category variable in SPSS.<o:p></o:p>

    Thank you<o:p></o:p>



    ------------------------------
    DAMIAN HERRERA
    ------------------------------



     

     

    You are subscribed to "SPSS Statistics" as DAMIHERRERA@HOTMAIL.COM. To change your subscriptions, go to My Subscriptions. To unsubscribe from this community discussion, go to Unsubscribe.




    Original Message:
    Sent: 7/15/2021 9:19:00 AM
    From: Jon Peck
    Subject: RE: variables

    Please clarify with an example.

    --




  • 4.  RE: variables

    Posted Thu July 15, 2021 12:37 PM
    So, I suppose that the input variables are dichotomous.  Assuming that they are 0/1 you can just do
    compute religiosity = v1 + 10 * v2 + 100* v3.
    or something similar.

    --





  • 5.  RE: variables

    Posted Thu July 15, 2021 01:01 PM

    Dear Jon Peck

    Ok, but I don't want to count but build a new variable with three categories.

    I have recoded the three dichotomous variables 0/1 into a different variable with value 1.

    Now I want to create a new variable with the three variables converted into categories of the new variable.

    I am trying to do it with SPSS but I don't think it can?

    Thanks

     






  • 6.  RE: variables

    Posted Thu July 15, 2021 01:26 PM
    I don't see your logic here.  Three variables with two categories each means eight possible categories.  The code I posted puts these three variables together.  It doesn't count anything.

    Maybe it would help if you can explain what you want to do with this composite variable.

    --





  • 7.  RE: variables

    Posted Fri July 16, 2021 03:50 AM

    Dear

     

    Excuse

     

    The fault is mine for not knowing how to explain myself well.

     

    A)    I have built the variables (0/1) with the count procedure

    Popular classes ((0/1)

    Middle classes (0/1)

    Upper classes (0/1)

     

    B) I HAVE RECODED IN THE SAME VARIABLES

    Popular classes (1)

    Middle classes (1)

    Upper classes (1)

     

    C) I WANT TO CATEGORIZE THE VARIABLES UNDER THE SAME VARIABLE

     

    Variable (socioeconomic position):

     

    Category 1 Popular Classes (1)

    Category 2 Middle classes (1)

    Category 3 Upper classes (1)

     

     






  • 8.  RE: variables

    Posted Fri July 16, 2021 09:38 AM

    hello,

    did you mean this?

    do repeat a = v1 v2 v3/
                     kat = 1 2 3.
    if (a = 1) religiosity = kat.
    end repeat. 

    or

    if (v1 = 1) religiosity = 1.
    if (v2 = 1) religiosity = 2.
    if (v3 = 1) religiosity = 3.

     regards,

    xq



    ------------------------------
    xiaoqin Oezener-Wan
    ------------------------------



  • 9.  RE: variables

    Posted Fri July 16, 2021 11:45 AM

    Dear xiaoqin

    Thanks

    but through what SPSS procedure could it be carried out (Transform, Build new variables), or would it be necessary to write it?

     






  • 10.  RE: variables

    Posted Mon July 19, 2021 02:16 AM
    Hello Damian,

    it is necessary to write the lines in SPSS syntax editor, and let them run, the new variable will be created 

    best regards,

    xiaoqin

    ------------------------------
    xiaoqin Oezener-Wan
    ------------------------------



  • 11.  RE: variables

    Posted Mon July 19, 2021 04:09 AM

    OK

    Thanks