|Date: ||Sun, 12 Aug 2007 10:48:37 -0500|
|Reply-To: ||"Peck, Jon" <email@example.com>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||"Peck, Jon" <firstname.lastname@example.org>|
|Subject: ||Re: Ctables/Python merge|
|Content-Type: ||text/plain; charset="UTF-8"|
You should be able to get pretty close with the Python tables module. You will find it on the downloads link under Tables module. The modules are listed alphabetically. It is easier to find things if you click "single page view" in the downloads header. There is also tables examples download that may help, and there are examples in the module itself.
Note that this module depends on a number of other modules that you will need to download from Developer Central and elsewhere, and, of course, Python 2.4 and the plug-in.
From: Manmit Shrimali [mailto:MShrimali@marketrx.com]
Sent: Sunday, August 12, 2007 1:15 AM
To: Peck, Jon; SPSSX-L@LISTSERV.UGA.EDU
Subject: RE: Re: Ctables/Python merge
Jon I was also facing similar type of problem. I have several custom tables and column proportions results. I want to merge the column proportion stat testing with the count and % table i.e. the significance should be placed next to the respective number. Is this doable using python? Someone suggested to see spss dcentral however i could not find the relevant code.
Any input is highly appreciated.
From: SPSSX(r) Discussion on behalf of Peck, Jon
Sent: Sat 8/11/2007 10:17 PM
Subject: Re: Ctables/Python merge
By default, the table merger looks for "Count" as the leaf element in the column to figure out the merge point. Since you have a different label, you have to tell it the merge point. Try adding
to the parameter list
If that doesn't work, I'd have to see an actual table (-> email@example.com) to see what is going on.
The general idea of the table merger is that it is doing a join of columns according to the criteria you specify, so if the join criteria don't match, it doesn't do anything.
(intermittently available over the next few weeks while recovering from surgery on my neck)
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Tim Hennigar
Sent: Wednesday, August 08, 2007 8:34 AM
Subject: [SPSSX-L] Ctables/Python merge
well here is a most basic example - that doesnt work - syntax runs - no
errors - BUT the only thing merged is the line
"results ..." in the caption or footnote (not even the rest "a: ...") any
BEGIN PROGRAM PYTHON.
import sys, spss, tables
/VLABELS VARIABLES=ALL DISPLAY=LABEL
/TABLE sex [C] [TOTALS[UCOUNT,'UWt',F6.0,COUNT,'Wgt',F6.0],
COUNT,'Wgt N', F5.0,COLPCT.VALIDN,'Wgt %',PCT5.0]
/SLABELS POSITION=ROW VISIBLE=YES
/CATEGORIES VAR=sex TOTAL=YES POSITION=BEFORE EMPTY=EXCLUDE
/COMPARETEST TYPE=PROP ALPHA=0.05
'SPSS TABLES EXAMPLE'
'Primary Banner - June 03 2005 (Weighted)'
'Run: Date-)DATE, Time-)TIME'
"(1) Respondent's Sex"
"BASE: ALL RESPONDENTS"
BEGIN PROGRAM PYTHON.
(1) Respondent's Sex
BASE: ALL RESPONDENTS
Comparisons of Column Proportions
Not Too Happy
SPSS TABLES EXAMPLE
Primary Banner - June 03 2005 (Weighted)
Run: Date-08/08/2007, Time-9:13:42 AM
Results are based on two-sided tests with significance level 0.05. For each
significant pair, the key of the category with the smaller column proportion
appears under the category with the larger column proportion.
Notice: This e-mail and any attachments may contain confidential and
privileged information. If you are not the intended recipient, please
notify the sender immediately by return e-mail, do not use the information,
delete this e-mail and destroy any copies. Any dissemination or use of this
information by a person other than the intended recipient is unauthorized
and may be illegal. Email transmissions cannot be guaranteed to be secure
or error free. The sender therefore does not accept any liability for errors
or omissions in the contents of this message that arise as a result of email