CTABLES: selective sorting with MR sets

classic Classic list List threaded Threaded
4 messages Options
ThW
Reply | Threaded
Open this post in threaded view
|

CTABLES: selective sorting with MR sets

ThW
Is there a possibility @ Custom Tables to sort an MR set by count, BUT force some categories (=variables) to the end of the table (e.g. "don´t know; no answer")?

I know the genCategoryList-function from spssaux2.py and it works very efficient, but I at my state of knowledge I assume that it works only with single variables - whose categories can be sorted. But what about the variables of MR sets?
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: selective sorting with MR sets

Jon K Peck
Maybe, depending on exactly what statistics you want for the MR set.  With a multiple dichotomy set,  you could leave these variables out of the definition and include them separately in the table.  That wouldn't work with a multiple response set.

genCategoryList works on categories within a (regular) variable.  A different function would be needed to do something similar with MR variables.  It would generate a new MR set definition with the categories or variables sorted and the specials moved to one end or the other.  If you can send me more details and some sample data, I can look into that.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        ThW <[hidden email]>
To:        [hidden email],
Date:        07/19/2013 02:12 AM
Subject:        [SPSSX-L] CTABLES: selective sorting with MR sets
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Is there a possibility @ Custom Tables to sort an *MR set* by count, BUT
force some categories (=variables) to the end of the table (e.g. "don´t
know; no answer")?

I know the genCategoryList-function from spssaux2.py and it works very
efficient, but I at my state of knowledge I assume that it works only with
single variables - whose categories can be sorted. But what about the
variables of MR sets?



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-selective-sorting-with-MR-sets-tp5721265.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: selective sorting with MR sets

King Douglas
Jon,

I posted a similar query a couple of months ago.  I'm still very interested in a solution to this problem.

King Douglas
Texas Instruments Market Research


From: Jon K Peck <[hidden email]>
To: [hidden email]
Sent: Friday, July 19, 2013 8:30 AM
Subject: Re: CTABLES: selective sorting with MR sets

Maybe, depending on exactly what statistics you want for the MR set.  With a multiple dichotomy set,  you could leave these variables out of the definition and include them separately in the table.  That wouldn't work with a multiple response set.

genCategoryList works on categories within a (regular) variable.  A different function would be needed to do something similar with MR variables.  It would generate a new MR set definition with the categories or variables sorted and the specials moved to one end or the other.  If you can send me more details and some sample data, I can look into that.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        ThW <[hidden email]>
To:        [hidden email],
Date:        07/19/2013 02:12 AM
Subject:        [SPSSX-L] CTABLES: selective sorting with MR sets
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Is there a possibility @ Custom Tables to sort an *MR set* by count, BUT
force some categories (=variables) to the end of the table (e.g. "don´t
know; no answer")?

I know the genCategoryList-function from spssaux2.py and it works very
efficient, but I at my state of knowledge I assume that it works only with
single variables - whose categories can be sorted. But what about the
variables of MR sets?



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-selective-sorting-with-MR-sets-tp5721265.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD




ThW
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES: selective sorting with MR sets

ThW
This post was updated on .
In reply to this post by Jon K Peck
Thank you, Jon!

Your suggestion led me to a convenient method to solve the problem. As you correctly assumed, my sets are multiple dichotomy sets. It's not as complicated as I thought it would be. I wrote an SPSS macro which does the job, maybe not very niftily, but it works.

What the macro does, in detail:

1. All "special value" variables, that need to be sorted to the bottom of my table, are re-labeled
temporarily (using TEMPORARY.). They get a variable label that occurs nowhere else in any table of my
Output file, say "Cassiopeia", e.g. for the MR set $F120, consisting of F120_1 TO F120_8, while F120_8 means "don´t know, no answer":

var lab F120_8 "Cassiopeia".

2. All "spacial value" variables get new value labels, again using the effect of the previously written
TEMPORARY command: Value "0" gets the value label "Cassiopeia" and value "1" gets the the original
variable label as value label, e.g. "don´t know, no answer", e.g.:

val lab F120_8
0 "Cassiopeia"
1 "don´t know, no answer".

3. After doing so the CTABLES command is expanded, but the variable list of the /TABLE subcommand is
supplemented by all "special value" variables in order of desired display, but only the MR set needs to be
sorted via /CATEGORIES subcommand.

4. A custom table occurs in the viewer with the sorted categories of my MR set. At the original position of
"don´t know, no answer" stands "Cassiopeia". At the bottom of the table stands "Cassiopeia" again, trailed
by "don´t know, no answer".

5. Both "Cassiopeia"-named lines are erased by the python plugin-command SPSSINC MODIFY TABLES.
That step might as well been done at the end of the syntax job (if there are no meaningful "Cassiopeia"
categories at that level of Custom Tables which you want to keep).

Maybe this solution sounds a little bit cumbersome. But once integrated into a macro it is useful and since
the TEMPORARY-command is used even the original labels are reset after executing CTABLES.

If someone is interested in a sytax - I will be at my office again on Monday.
If someone found another way or finds any redundant or inefficient steps in my procedure, please leave a message.


Th W
Research Manager