Ctables how to get set of variable as column with values as rows?

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

Ctables how to get set of variable as column with values as rows?

Art Kendall
I am sure I have done this a few years ago but do not see how to do this in
the documentation.
Given this data how do I get a table with 4 columns and 17 rows?


data list fixed/Id, InVar1 to InVar4 (f2,4a1).
begin data
01abcd
02bbae
03dcba
04cheg
05flnz
06rhod
07neck
08blah
09stri
10gnae
end data.
AUTORECODE variables = InVar1 to InVar4 /INTO  Mention1 to Mention4 /GROUP
/PRINT.
* Define Multiple Response Sets.
MRSETS
  /MCGROUP NAME=$mentions LABEL='order mentioned' VARIABLES=Mention1
Mention2 Mention3 Mention4
  /DISPLAY NAME=[$mentions].




-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Ctables how to get set of variable as column with values as rows?

Jon Peck
Well, this syntax would give a 17 x 4 table, but I don't know whether it bears any other similarities to what you want.
CTABLES
  /TABLE $mentions BY (Mention1+Mention2+Mention3+Mention4)[S][MEAN].

On Fri, Jun 11, 2021 at 11:35 AM Art Kendall <[hidden email]> wrote:
I am sure I have done this a few years ago but do not see how to do this in
the documentation.
Given this data how do I get a table with 4 columns and 17 rows?


data list fixed/Id, InVar1 to InVar4 (f2,4a1).
begin data
01abcd
02bbae
03dcba
04cheg
05flnz
06rhod
07neck
08blah
09stri
10gnae
end data.
AUTORECODE variables = InVar1 to InVar4 /INTO  Mention1 to Mention4 /GROUP
/PRINT.
* Define Multiple Response Sets.
MRSETS
  /MCGROUP NAME=$mentions LABEL='order mentioned' VARIABLES=Mention1
Mention2 Mention3 Mention4
  /DISPLAY NAME=[$mentions].




-----
Art Kendall
Social Research Consultants
--
Sent from: http://spssx-discussion.1045642.n5.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


--
Jon K Peck
[hidden email]

===================== 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