Controlling the list of labels in the output table

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

Controlling the list of labels in the output table

Alex Huang
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Jon Peck
So, you want to have empty categories appear in the output.  The best way to do this is with CTABLES (Analyze > Custom Tables).  It gives you explicit control over this, and it handles multiple response variables, too.

In other procedures, the hack is to add cases for the empty categories to your data.  Then create a weight variable that is 1 for all the real cases and a very tiny number for the made-up cases.

On Tue, Jan 5, 2016 at 3:55 AM, Alex Huang <[hidden email]> wrote:
Dear List,

I am wondering if there is a way to control the list of labels in the output
table. More exactly it is to fix the list of label in "FREQUENCIES" and
"MULT RESPONSE".

For example, I have a variable "gender" and run the frequency. The table
should look:

1 Male   460
2 Female    324
Total    784

If now I select only male cases, then:

1 Male   460
Total    460

Is it possible that I also include "2 Female" in the table so that the table
looks like:

1 Male   460
2 Female    0
Total    460

Could the same applied to MULT RESPONSE?

I would appreciate your help much.

Thanks,
Alex











--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202.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



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Maguin, Eugene
In reply to this post by Alex Huang
Recode sex(0=.001).
Format sex(f1.0).

Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Alex Huang
Sent: Tuesday, January 05, 2016 5:56 AM
To: [hidden email]
Subject: Controlling the list of labels in the output table

Dear List,

I am wondering if there is a way to control the list of labels in the output table. More exactly it is to fix the list of label in "FREQUENCIES" and "MULT RESPONSE".

For example, I have a variable "gender" and run the frequency. The table should look:

1 Male   460
2 Female    324
Total    784

If now I select only male cases, then:

1 Male   460
Total    460

Is it possible that I also include "2 Female" in the table so that the table looks like:

1 Male   460
2 Female    0
Total    460

Could the same applied to MULT RESPONSE?

I would appreciate your help much.

Thanks,
Alex











--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202.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

=====================
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: Controlling the list of labels in the output table

David Marso
Administrator
In reply to this post by Alex Huang
COMPUTE @wt@=SUM(.0000000001,(gender EQ 1) ).
WEIGHT BY @wt@.

Whatever.....
--
Alex Huang wrote
Dear List,

I am wondering if there is a way to control the list of labels in the output table. More exactly it is to fix the list of label in "FREQUENCIES" and "MULT RESPONSE".

For example, I have a variable "gender" and run the frequency. The table should look:

1 Male   460
2 Female    324
Total    784

If now I select only male cases, then:

1 Male   460
Total    460

Is it possible that I also include "2 Female" in the table so that the table looks like:

1 Male   460
2 Female    0
Total    460

Could the same applied to MULT RESPONSE?

I would appreciate your help much.

Thanks,
Alex
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

David Marso
Administrator
In reply to this post by Maguin, Eugene
???

Maguin, Eugene wrote
Recode sex(0=.001).
Format sex(f1.0).

Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Alex Huang
Sent: Tuesday, January 05, 2016 5:56 AM
To: [hidden email]
Subject: Controlling the list of labels in the output table

Dear List,

I am wondering if there is a way to control the list of labels in the output table. More exactly it is to fix the list of label in "FREQUENCIES" and "MULT RESPONSE".

For example, I have a variable "gender" and run the frequency. The table should look:

1 Male   460
2 Female    324
Total    784

If now I select only male cases, then:

1 Male   460
Total    460

Is it possible that I also include "2 Female" in the table so that the table looks like:

1 Male   460
2 Female    0
Total    460

Could the same applied to MULT RESPONSE?

I would appreciate your help much.

Thanks,
Alex











--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202.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

=====================
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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Maguin, Eugene
Welll, it works from a display point of view. But, yeah, it was an inelegant kludge. Gene Maguin


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David Marso
Sent: Tuesday, January 05, 2016 10:04 AM
To: [hidden email]
Subject: Re: Controlling the list of labels in the output table

???


Maguin, Eugene wrote
> Recode sex(0=.001).
> Format sex(f1.0).
>
> Gene Maguin
>
>
> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:

> SPSSX-L@.UGA

> ] On Behalf Of Alex Huang
> Sent: Tuesday, January 05, 2016 5:56 AM
> To:

> SPSSX-L@.UGA

> Subject: Controlling the list of labels in the output table
>
> Dear List,
>
> I am wondering if there is a way to control the list of labels in the
> output table. More exactly it is to fix the list of label in "FREQUENCIES"
> and "MULT RESPONSE".
>
> For example, I have a variable "gender" and run the frequency. The
> table should look:
>
> 1 Male   460
> 2 Female    324
> Total    784
>
> If now I select only male cases, then:
>
> 1 Male   460
> Total    460
>
> Is it possible that I also include "2 Female" in the table so that the
> table looks like:
>
> 1 Male   460
> 2 Female    0
> Total    460
>
> Could the same applied to MULT RESPONSE?
>
> I would appreciate your help much.
>
> Thanks,
> Alex
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-
> labels-in-the-output-table-tp5731202.html
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

>  (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
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

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





-----
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202p5731206.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

=====================
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: Controlling the list of labels in the output table

Alex Huang
In reply to this post by Jon Peck
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Jon Peck
Can you be more specific about what you mean by "expand the n layer"?  CTABLES is very flexible about layout, but we need to understand the goal better.

On Thu, Jan 7, 2016 at 3:03 AM, Alex Huang <[hidden email]> wrote:
Dear List,

I think Jon's CTABLE suggestion is a better suggestion given that the weight
of the data have already been defined. Thanks all and especially Jon for
your help.

Here I would further like to ask about the CTABLE comment. The question is
simply:

Is there a way to expand the n layer in CTABLE? I would like the very long
list of table for exporting and conducting some calculations.

It would be better if it could be done in syntax.

Many Thanks,
Alex







--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202p5731217.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



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Alex Huang
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

David Marso
Administrator
All of that manual stuff can be scripted.  You can do it in python or WinBasic with the PivotManager object APIs.

On Fri, Jan 8, 2016 at 12:29 AM, Alex Huang [via SPSSX Discussion] <[hidden email]> wrote:
Dear Jon,

As a custom table user, the generated output has an "interactive" nature. When a table of 3 dimension is constructed, we are only able to look at the top layer at first. If we wish to look at another layer, one would need to activate the table and alter the layer variable, from where we would get another table.

By "expand", I mean I would like all layers of the 3 dimension table to be explicitly displayed or ordered, where the 2nd layer is right after the 1st layer, and the 3rd is right after the 2nd, ... and all in 1 extra large table. I would like to have the table in one without further interacting with the table for the results.

It is just like how the table look when we use "MULT RESPONSE" with specifications "\TABLES=A BY B BY C" instead of "CTABLES", yet at this point of time I would like to control the list of labels in the output table, where leads me back to "CTABLES" instead of "MULT RESPONSE".

So I think this is how I would put the question, and I appreciate your help much.

Many thanks,
Alex


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202p5731231.html
To unsubscribe from Controlling the list of labels in the output table, click here.
NAML

Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Jignesh Sutar
I don't think you need scripting for this either, if I understand correctly. It is simple a case of specifying CTABLES in a nested rather than layered table format, which can all be done natively.

For example.

/* Produces a layered table by C */.
CTABLES /TABLE A BY B BY C.

/* Produces a nested (or expanded out) table with C furthermost left side */.
CTABLES /TABLE C>A BY B.


Is this not what is required?
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Jon Peck
Nesting the tables will make all the segments appear in the Viewer as a single table.  However, if you only want to export all the layers, the OUTPUT EXPORT command or File > Export in the Viewer window gives you the option of exporting all layers even if they are not all displayed.

On Fri, Jan 8, 2016 at 2:37 AM, Jignesh Sutar <[hidden email]> wrote:
I don't think you need scripting for this either, if I understand correctly.
It is simple a case of specifying CTABLES in a *nested* rather than *layered
*table format, which can all be done natively.

For example.

/* Produces a layered table by C */.
CTABLES /TABLE A BY B BY C.

/* Produces a nested (or expanded out) table with C furthermost left side
*/.
CTABLES /TABLE C>A BY B.


Is this not what is required?



--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Controlling-the-list-of-labels-in-the-output-table-tp5731202p5731233.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



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the list of labels in the output table

Alex Huang
CONTENTS DELETED
The author has deleted this message.