Hello All:
My query is similar to the question posted at the following link i.e. "http://spssx-discussion.1045642.n5.nabble.com/Alternative-for-MRSETS-MCGROUP-or-how-to-get-rid-of-quot-conflicting-labels-warning-quot-td5731660.html". However, i want to explain it in a more detailed way. Below is the syntax: DATA LIST LIST /SERIAL(F3) MENTION1 MENTION2 MENTION3. BEGIN DATA 1 1 1 1 2 2 2 2 3 3 3 4 4 4 END DATA. LIST. VALUE LABELS MENTION1 MENTION2 1 "BRAND1" 2 "BRAND2" 3 "BRAND3" 4 "BRAND4". VALUE LABELS MENTION3 1 "BRAND2" 2 "BRAND4". MRSETS /MCGROUP NAME=$MENTION LABEL="MENTION|MENTIONS DATA - TOTAL MENTION" VARIABLES=MENTION1 TO MENTION3 /DISPLAY NAME=[$MENTION]. CTABLES /VLABELS VARIABLES =ALL DISPLAY=LABEL /TABLES (SERIAL+$MENTION) /SLABELS POSITION=ROW/SLABELS VISIBLE=NO /CATEGORIES VARIABLES=ALL ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=BEFORE LABEL="TOTAL". If I consider the above syntax, while running the CTABLE I am getting a warning message i.e. Warnings TABLE: MC Set $MENTION. Two or more set variables use conflicting labels for the same data value. the results are wrong since across mentions the labels seems to be different for the same codes. Hence the error. Now, I have to recode the MENTION3 variables data accordingly to be in-lined with the MENTION1 & MENTION2 in order to get the correct results. As a second option: I tried the same with converting them to string variables. However, there is no error and the results are correct. Below is the syntax for illustration. DATA LIST LIST /SERIAL(F3) MENTION1(A8) MENTION2(A8) MENTION3(A8). BEGIN DATA 1 BRAND1 BRAND1 BRAND2 2 BRAND2 BRAND2 BRAND4 3 BRAND3 BRAND3 4 BRAND4 BRAND4 END DATA. LIST. MRSETS /MCGROUP NAME=$MENTION LABEL="MENTION|MENTIONS DATA - TOTAL MENTION" VARIABLES=MENTION1 TO MENTION3 /DISPLAY NAME=[$MENTION]. CTABLES /VLABELS VARIABLES =ALL DISPLAY=LABEL /TABLES (SERIAL+$MENTION) /SLABELS POSITION=ROW/SLABELS VISIBLE=NO /CATEGORIES VARIABLES=ALL ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=BEFORE LABEL="TOTAL". Now my question is, can anyone help me in providing the code in python for the Multiple response variables when it is in the numeric format and with labels different for the same codes? |
What do you expect to happen when the same numeric code means different things for different variables? It is the numeric values that procedures use, which is why you get the warning. In your string example, there are no value labels, so, just as with numeric values, the warning would not appear and the values would be used in tabulation. If you want to recode your numeric variable with the conflicting labels, you can do this with COMPUTE by using the VALUELABEL function to create a new variable, e.g., string strngmention1(A8). compute strngmention1 = valuelabel(mention1). On Mon, Mar 21, 2016 at 5:42 AM, jagadishpchary <[hidden email]> wrote: Hello All: |
Free forum by Nabble | Edit this page |