Stat merge in Ctables with Python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Stat merge in Ctables with Python

Auberth Hurtado
Help!,
I can't merge two tables with Ctables with Python.
I follow the next steps:

1. I install Python 2.4.3 (instalation cd) or 2.4.4 (web page), i try with
two programs
2  I install 'the spss-python integration plug-in.exe',
3. later install 'pywin32-210.win32-py2.4.exe' (web page)
4. and then copy optional modules (tables.py, viewer.py and spssaux.py) in
'C:\Python24\Lib\site-packages\'
5. I run the next syntax in artificial data:

BEGIN PROGRAM.
import tables
reload(tables)
cmd=\
r"""CTABLES
  /TABLE sex > race [COUNT 'n' COLPCT.COUNT '%'] BY region
  /CATEGORIES VARIABLES=region [1, 2, SUBTOTAL, 3, OTHERNM] EMPTY=INCLUDE
TOTAL=YES POSITION=AFTER
  /CATEGORIES VARIABLES=sex ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES
POSITION=AFTER
  /CATEGORIES VARIABLES=race ORDER=A KEY=VALUE EMPTY=INCLUDE
 /TITLES TITLE='This is the Main Table'
  /COMPARETEST TYPE=PROP ALPHA=0.05 ADJUST=BONFERRONI ORIGIN=COLUMN.
"""

tables.mergeLatest(cmd, label='n', mode='merge')
END PROGRAM.

And then my computer blocks itself.
what I am making wrong. Any suggestion?

Thanks

Auberth Eduardo Hurtado