|
list,
I have made a custom table with these characteristics: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) and so on... somebody knows how to make an it spaces between the variables (1 and 2), or to trace a line between variables, like in this example: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) or, Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) ----------------------------------------------------------------------------------------------------------- Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ----------------------------------------------------------------------------------------------------------- Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ---------------------------------------------------------------------------------------------------------- I don't find as making this modification systematically, mainly because I should build more than 100 tables. thank you for the help. --
Sebastián
Daza Aranzaes |
|
Sebastian,
Putting lines between the variables can be done easily by changing the table look file, you first need to make a new table look file or edit a current table look file and then set it as your defalt table look file under the options menu. This is easy to learn and instructions are available through the help menu. Don On 5/25/07, Sebastián Daza <[hidden email]> wrote: > > list, > I have made a custom table with these characteristics: > > > Country 1 > Country 2 Country 3 > Variable 1 Category1 % % > % > (n) > (n) (n) > Category1 % % > % > (n) > (n) (n) > Variable 2 Category1 % % > % > (n) > (n) (n) > Category2 % % > % > (n) > (n) (n) > and so on... > > somebody knows how to make an it spaces between the variables (1 and 2), > or to trace a line between variables, like in this example: > > > Country 1 > Country 2 Country 3 > > > Variable 1 Category1 % % > % > (n) > (n) (n) > Category1 % % > % > (n) > (n) (n) > > > > Variable 2 Category1 % % > % > (n) > (n) (n) > Category2 % % > % > (n) > (n) (n) > > > Variable 3 Category1 % % > % > (n) > (n) (n) > Category2 % % > % > (n) > (n) (n) > > or, > > > Variable 1 Category1 % % > % > (n) > (n) (n) > Category1 % % > % > (n) > (n) (n) > > > ----------------------------------------------------------------------------------------------------------- > > Variable 2 Category1 % % > % > (n) > (n) (n) > Category2 % % > % > (n) > (n) (n) > > > ----------------------------------------------------------------------------------------------------------- > > Variable 3 Category1 % % > % > (n) > (n) (n) > Category2 % % > % > (n) > (n) (n) > > > ---------------------------------------------------------------------------------------------------------- > > I don't find as making this modification systematically, mainly because I > should build more than 100 tables. > thank you for the help. > > -- > > Sebastián Daza Aranzaes > *Instituto de Sociología UC > *8-471 53 87 / 686 57 20 / Fax 5521834 > [hidden email] > |
|
In reply to this post by Sebastián Daza
Hi Sebastián
Here an example using a variabel named 'Spacer' to make some space between variabels in the table. Hope that helps. Christian data list list /Medi(F8.0) Sex(F8.1) Age(F8.2) . begin data 1 1 44.25 2 1 52.92 1 1 37.21 1 1 60.87 2 1 58.69 2 2 43.17 1 2 44.93 1 1 34.19 1 2 39.96 2 1 63.04 End Data. Var Label Medi 'Treatment'. Val Label Medi 1 'Verum' 2 'Palcebo'. Var Label Sex "Gender". Val Label Sex 1 "male" 2 "female". Compute Pat = 1. Var Label Pat "Total". VaL Label Pat 1 " ". Compute Spacer = 0. Var Label Spacer ' '. Val LAbel Spacer 1 ' '. Missing Values Spacer (0). CTABLES /FORMAT EMPTY = " " /VLABELS VARIABLES=Medi sex Age DISPLAY=DEFAULT /TABLE Pat [c] [Count " " F8.0] + Spacer [c] [Count " " ] + sex [C] [COUNT "N" F8.0, COLPCT.COUNT "%" PCT8.1] + Spacer [c] [Count " " ] + Age [VALIDN "Valid" F8.0, MEAN "Mean" F8.2, MAXIMUM "Maximum" F8.2, MINIMUM "Minimum" F8.2, MEDIAN "Median" F8.2, STDDEV "Std.dev." F8.2, PTILE 25 "Percentile 25" F8.2, PTILE 75 "Percentile 75" F8.2] BY Medi [c] /SLABELS POSITION=ROW /CATEGORIES VARIABLES = Medi ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER /CATEGORIES VARIABLES = Spacer EMPTY=INCLUDE /CATEGORIES VARIABLES=sex_num ORDER=A KEY=VALUE EMPTY=INCLUDE. ******************************* la volta statistics Christian Schmidhauser, Dr.phil.II Weinbergstrasse 108 Ch-8006 Zürich Tel: +41 (043) 233 98 01 Fax: +41 (043) 233 98 02 email: mailto:[hidden email] internet: http://www.lavolta.ch/ -----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von Sebastián Daza Gesendet: Freitag, 25. Mai 2007 16:17 An: [hidden email] Betreff: pivot table question list, I have made a custom table with these characteristics: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) and so on... somebody knows how to make an it spaces between the variables (1 and 2), or to trace a line between variables, like in this example: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) or, Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------- Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------- Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------ I don't find as making this modification systematically, mainly because I should build more than 100 tables. thank you for the help. -- Sebastián Daza Aranzaes Instituto de Sociología UC 8-471 53 87 / 686 57 20 / Fax 5521834 [hidden email] |
|
I tried this and found two small problems with this syntax:
1) you have to explicitly declare age to be scale or CTABLES will complain about the statistics requested for it and will not run. 2) a variable called sex_num is in referenced on the CTABLES CATEGORIES command. You'll be warned but the command will run. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics Sent: Friday, May 25, 2007 9:03 AM To: [hidden email] Subject: AW: pivot table question Hi Sebastián Here an example using a variabel named 'Spacer' to make some space between variabels in the table. Hope that helps. Christian data list list /Medi(F8.0) Sex(F8.1) Age(F8.2) . begin data 1 1 44.25 2 1 52.92 1 1 37.21 1 1 60.87 2 1 58.69 2 2 43.17 1 2 44.93 1 1 34.19 1 2 39.96 2 1 63.04 End Data. Var Label Medi 'Treatment'. Val Label Medi 1 'Verum' 2 'Palcebo'. Var Label Sex "Gender". Val Label Sex 1 "male" 2 "female". Compute Pat = 1. Var Label Pat "Total". VaL Label Pat 1 " ". Compute Spacer = 0. Var Label Spacer ' '. Val LAbel Spacer 1 ' '. Missing Values Spacer (0). CTABLES /FORMAT EMPTY = " " /VLABELS VARIABLES=Medi sex Age DISPLAY=DEFAULT /TABLE Pat [c] [Count " " F8.0] + Spacer [c] [Count " " ] + sex [C] [COUNT "N" F8.0, COLPCT.COUNT "%" PCT8.1] + Spacer [c] [Count " " ] + Age [VALIDN "Valid" F8.0, MEAN "Mean" F8.2, MAXIMUM "Maximum" F8.2, MINIMUM "Minimum" F8.2, MEDIAN "Median" F8.2, STDDEV "Std.dev." F8.2, PTILE 25 "Percentile 25" F8.2, PTILE 75 "Percentile 75" F8.2] BY Medi [c] /SLABELS POSITION=ROW /CATEGORIES VARIABLES = Medi ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER /CATEGORIES VARIABLES = Spacer EMPTY=INCLUDE /CATEGORIES VARIABLES=sex_num ORDER=A KEY=VALUE EMPTY=INCLUDE. ******************************* la volta statistics Christian Schmidhauser, Dr.phil.II Weinbergstrasse 108 Ch-8006 Zürich Tel: +41 (043) 233 98 01 Fax: +41 (043) 233 98 02 email: mailto:[hidden email] internet: http://www.lavolta.ch/ -----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von Sebastián Daza Gesendet: Freitag, 25. Mai 2007 16:17 An: [hidden email] Betreff: pivot table question list, I have made a custom table with these characteristics: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) and so on... somebody knows how to make an it spaces between the variables (1 and 2), or to trace a line between variables, like in this example: Country 1 Country 2 Country 3 Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) or, Variable 1 Category1 % % % (n) (n) (n) Category1 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------- Variable 2 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------- Variable 3 Category1 % % % (n) (n) (n) Category2 % % % (n) (n) (n) ---------------------------------------------------------------------------- ------------------------------ I don't find as making this modification systematically, mainly because I should build more than 100 tables. thank you for the help. -- Sebastián Daza Aranzaes Instituto de Sociología UC 8-471 53 87 / 686 57 20 / Fax 5521834 [hidden email] |
| Free forum by Nabble | Edit this page |
