Python Ctables Stats Merge

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

Python Ctables Stats Merge

Tim AT Home
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?

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.


Thanks!

Tim
Reply | Threaded
Open this post in threaded view
|

Re: Python Ctables Stats Merge

Peck, Jon
See below.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Tim Hennigar
Sent: Friday, July 13, 2007 7:33 AM
To: [hidden email]
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