| Date: | Fri, 13 Jul 2007 10:14:00 -0500 |
| Reply-To: | "Peck, Jon" <peck@spss.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | "Peck, Jon" <peck@spss.com> |
| Subject: | Re: Python Ctables Stats Merge |
|
| In-Reply-To: | A<000601c7c549$ee1693d0$b000a8c0@dragon> |
| Content-Type: | text/plain; charset="UTF-8" |
See below.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Tim Hennigar
Sent: Friday, July 13, 2007 7:33 AM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: [SPSSX-L] Python Ctables Stats Merge
Quick questions
I am running 500 tables - some have stat testing some dont, some have
proportions and mean testing and some
one or the other ... the Python add-on that merges tables - is this run once
on the complete tabels output or am
I calling the Python program after each table?
[>>>Peck, Jon] It is up to you. The tables.py module on SPSS Developer Central that merges and censors tables has functions that allow you to execute a Ctables command and immediately merge it, or you can specify the particular items in the Viewer that you want to merge.
If you use the mergeLatest function as in the following example, you run the command and immediately merge it. If you use mergeSelected you can work more interactively on tables in a selection, and if you use the tmerge function, you can pass whichever tables you want into the merge. mergeLatest in fact does a little housekeeping and calls tmerge to do the work.
begin program.
import tables
cmd=\
r'''CTABLES
/TABLE sex > race [COUNT COLPCT.COUNT] BY region
/TITLES TITLE='This is the Main Table'
/COMPARETEST TYPE=PROP ALPHA=0.05 ADJUST=BONFERRONI ORIGIN=COLUMN.
'''
tables.mergeLatest(cmd, label='Count')
end program.
Also - I have noticed when simply running tables that when both proportions
and mean testing are requested - that
the second (mean) table in this case is missing row labels (this might
because of the fact I dont have VAR lab on the
mean vars for aesthetics in the tables or it might not) - just wondering if
anyone has experienced issues with the
merge being able to 'line' up the columns correctly.
[>>>Peck, Jon] I would have to see more detail to comment on this.
-Jon Peck
Thanks!
Tim
|