I have two questions concerning custom tables.
Q1 The first is that I need to be able to have multiple layers - as used to be the case with general tables. i.e. if I have say 2 layered variables that are stacked, and I also wish that the statistics are displayed as layer, then I can see 3 independent layers from within pivot tables and can move any of them around independently.
I have tried using the LAYER option in CUSTOM TABLES and also the /SLABEL POSITION subcommand from the syntax commands, but the output shows all categories as part of a single large layer - such as male-under20-percent, male-under20-count, female-under20-percent and female-under20-count etc.
Q2 I have created man tables using custom tables with 2 or more row and 1 or more column variables. Now I need to add a new variable (eg. Sex) in each of the tables so that each of the current column variable compares male with females. In old SPSS I could simply put this new variable as a SPLIT file variable, but CUSTOM TABLES ignores the SPLIT FILE command.
IS there any other way of running the commands and split output with this new variable - preferable showing results in the same table - as with SPLIT FILE and COMPARE GROUPS? All suggestions appreciated in advance.
Forcheh Professor Ntonghanwah Forcheh Department of Statistics, University of Botswana Private Bag UB00705, Gaborone, Botswana. Office: +267 355 2696, Mobile: Orange +267 75 26 2963, Bmobile: 73181378: Mascom 754 21238 fax: +267 3185099; Alternative Email: [hidden email] *@Honesty is a Virtue, Freedom of the Mind is Power. Motto: Never be afraid to be honest, Never lie to yourself, Trust in the Truth and you will be forever free.* |
Layers are routine with CTABLES as the
second BY (/table x by y by z). In the gui, you need to click
the Layers button over the canvas to access the third dimension.
Because CTABLES does support layers, we decided years ago that split files was redundant and unnecessary. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Ntonghanwah Forcheh <[hidden email]> To: [hidden email], Date: 02/11/2014 08:21 AM Subject: [SPSSX-L] LAYERS IN CUSTOM TABLES Sent by: "SPSSX(r) Discussion" <[hidden email]> I have two questions concerning custom tables. Q1 The first is that I need to be able to have multiple layers - as used to be the case with general tables. i.e. if I have say 2 layered variables that are stacked, and I also wish that the statistics are displayed as layer, then I can see 3 independent layers from within pivot tables and can move any of them around independently. I have tried using the LAYER option in CUSTOM TABLES and also the /SLABEL POSITION subcommand from the syntax commands, but the output shows all categories as part of a single large layer - such as male-under20-percent, male-under20-count, female-under20-percent and female-under20-count etc. Q2 I have created man tables using custom tables with 2 or more row and 1 or more column variables. Now I need to add a new variable (eg. Sex) in each of the tables so that each of the current column variable compares male with females. In old SPSS I could simply put this new variable as a SPLIT file variable, but CUSTOM TABLES ignores the SPLIT FILE command. IS there any other way of running the commands and split output with this new variable - preferable showing results in the same table - as with SPLIT FILE and COMPARE GROUPS? All suggestions appreciated in advance. Forcheh -- Professor Ntonghanwah Forcheh Department of Statistics, University of Botswana Private Bag UB00705, Gaborone, Botswana. Office: +267 355 2696, Mobile: Orange +267 75 26 2963, Bmobile: 73181378: Mascom 754 21238 fax: +267 3185099; Alternative Email: Forchehn@... *@Honesty is a Virtue, Freedom of the Mind is Power. Motto: Never be afraid to be honest, Never lie to yourself, Trust in the Truth and you will be forever free.* |
Good day Jon,
Many thanks for responding to my query on custom tables. Indeed the old way of doing things was phased out around version 14, and I missed it but always managed to do what I wanted with custom tables though often not as satisfactorily as with the old version of General Tables. Given your suggestion, I thought I might have missed something, so I have tried several tables but still cant get the three or more dimensionsin layers that I wanted. I have then tried to illustrate what I want using OLAPS - which still has theold-style layers that I am looking for. below are example data and three commands to generate the same output. With OLAPS output, I can use Pivot tables to move the dimensions around (three variables plus statistics around). With the 2 custom tables, I can only move all layer dimensions around. Kindly check I assist on what I should do. I have been able to use /SLABEL to move statistics into a layer, but in this case it just gets stock with other layer variables. Many thanks for the help. example DATA LIST FREE /residence (F1.0) Chld_Sex (F1.0) Agegrp (F1.0) Ht_cm (F4.0) Wt_kg (F4.1). BEGIN DATA 1 1 1 53 3.1 1 1 2 104 10.8 1 1 2 74 5.6 1 1 1 66 5.6 1 2 1 57 4.5 1 1 3 110 11.4 1 1 1 49 2 1 2 3 80 7.4 1 2 1 58 5.2 1 2 3 124 16.3 3 1 2 62 3.2 3 2 3 98 10.7 2 2 1 51 3.5 2 2 3 55 5 2 1 3 68 5.4 2 2 2 103 12 3 2 2 89 8.5 3 2 1 52 2.6 3 2 3 71 5.6 3 2 1 50 2.8 3 1 1 44 3.7 2 2 2 101 10.4 3 1 1 61 5.5 3 1 2 71 6.2 2 1 2 117 15.3 3 2 3 95 10.2 3 1 1 55 3.3 2 2 2 48 3 3 2 1 51 3.7 3 1 3 76 5.4 3 2 1 51 4 3 1 2 67 6.2 2 1 1 54 3.1 2 2 3 76 7.5 2 1 2 86 8.3 2 1 1 49 2.6 2 1 3 101 11.2 2 2 2 90 8.9 2 2 1 71 6 2 2 3 78 7.8 2 1 1 49 4.4 3 1 2 60 5.2 3 2 1 47 2.6 3 1 3 75 7.2 3 2 1 57 5.3 2 2 1 57 5 3 2 1 54 4.8 3 1 3 56 3.1 3 1 1 55 4.9 2 2 1 50 4 3 2 1 60 5.3 2 1 1 68 6 2 1 1 56 3.4 2 2 1 53 3.9 3 2 1 70 6 3 2 2 70 4.6 3 2 1 53 4.6 2 1 3 108 11 2 1 1 54 3.3 2 2 1 51 4.2 3 2 3 69 3.5 3 2 2 70 6.1 2 2 2 89 8.2 2 1 1 76 4.8 3 2 2 99 8 3 2 3 99.9 9.1 END DATA. VALUE LABELS residence 1 Urban 2 Peri-Urban 3 Rural /Chld_Sex 1 Male 2 Female /Agegrp 1 0-11 2 12-23 3 24+. OLAP CUBES Ht_cm Wt_kg BY residence BY Chld_Sex BY Agegrp /CELLS=MEAN STDDEV COUNT /TITLE='OLAP Cubes'. * Custom Tables. CTABLES /VLABELS VARIABLES=Agegrp Ht_cm Wt_kg residence Chld_Sex DISPLAY=LABEL /TABLE Agegrp BY Ht_cm [MEAN COMMA40.1, STDDEV COMMA40.1, COUNT F40.0] + Wt_kg [MEAN COMMA40.1, STDDEV COMMA40.1, COUNT F40.0] BY (residence + Chld_Sex) /CATEGORIES VARIABLES=Agegrp ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES POSITION=AFTER /CATEGORIES VARIABLES=residence Chld_Sex ORDER=A KEY=VALUE EMPTY=INCLUDE. * Custom Tables. CTABLES /VLABELS VARIABLES=Agegrp Ht_cm Wt_kg residence Chld_Sex DISPLAY=LABEL /TABLE Agegrp [C] BY Ht_cm [S][MEAN COMMA40.1, STDDEV COMMA40.1, COUNT F40.0] + Wt_kg [S][MEAN COMMA40.1, STDDEV COMMA40.1, COUNT F40.0] BY (residence [C] > Chld_Sex [C]) /CATEGORIES VARIABLES=Agegrp ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES POSITION=AFTER /CATEGORIES VARIABLES=residence Chld_Sex ORDER=A KEY=VALUE EMPTY=INCLUDE. On 2/11/14, Jon K Peck <[hidden email]> wrote: > Layers are routine with CTABLES as the second BY (/table x by y by z). In > the gui, you need to click the Layers button over the canvas to access > the third dimension. > > Because CTABLES does support layers, we decided years ago that split files > was redundant and unnecessary. > > > Jon Peck (no "h") aka Kim > Senior Software Engineer, IBM > [hidden email] > phone: 720-342-5621 > > > > > From: Ntonghanwah Forcheh <[hidden email]> > To: [hidden email], > Date: 02/11/2014 08:21 AM > Subject: [SPSSX-L] LAYERS IN CUSTOM TABLES > Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > > I have two questions concerning custom tables. > > Q1 > The first is that I need to be able to have multiple layers - as used to > be the case with general tables. i.e. if I have say 2 layered variables > that are stacked, and I also wish that the statistics are displayed as > layer, then I can see 3 independent layers from within pivot tables and > can move any of them around independently. > I have tried using the LAYER option in CUSTOM TABLES and also the /SLABEL > POSITION subcommand from the syntax commands, but the output shows all > categories as part of a single large layer - such as male-under20-percent, > male-under20-count, female-under20-percent and female-under20-count etc. > > Q2 > I have created man tables using custom tables with 2 or more row and 1 or > more column variables. Now I need to add a new variable (eg. Sex) in each > of the tables so that each of the current column variable compares male > with females. In old SPSS I could simply put this new variable as a SPLIT > file variable, but CUSTOM TABLES ignores the SPLIT FILE command. > IS there any other way of running the commands and split output with this > new variable - preferable showing results in the same table - as with > SPLIT FILE and COMPARE GROUPS? > > All suggestions appreciated in advance. > Forcheh > > > > -- > Professor Ntonghanwah Forcheh > Department of Statistics, > University of Botswana > Private Bag UB00705, Gaborone, Botswana. > Office: +267 355 2696, > Mobile: Orange +267 75 26 2963, Bmobile: 73181378: Mascom 754 > 21238 > fax: +267 3185099; > Alternative Email: [hidden email] > *@Honesty is a Virtue, Freedom of the Mind is Power. > Motto: Never be afraid to be honest, Never lie to yourself, Trust in the > Truth and you will be forever free.* > > > -- Professor Ntonghanwah Forcheh Department of Statistics, University of Botswana Private Bag UB00705, Gaborone, Botswana. Office: +267 355 2696, Mobile: Orange +267 75 26 2963, Bmobile: 73181378: Mascom 754 21238 fax: +267 3185099; Alternative Email: [hidden email] *@Honesty is a Virtue, Freedom of the Mind is Power. Motto: Never be afraid to be honest, Never lie to yourself, Trust in the Truth and you will be forever free.* ===================== 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 |
Free forum by Nabble | Edit this page |