Getting statistics using Python DisplayDictionary module-basic question

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

Getting statistics using Python DisplayDictionary module-basic question

Cleland, Patricia (EDU)
On Developer Central, the write up on DisplayDicitonary states:

To include counts for values of categorical values and labelled values
of scale variables and means and validn for scale variables, specify
stats='cats' in the call. stats='all' can be used to get counts for all
values of all variables along with scale variable means. Means are only
available with SPSS 15.0.1 or later.
(http://www.spss.com/devcentral/index.cfm?pg=downloadDet&dId=19)


My question is: What is meant by "the call"?

Here's the syntax that I use for DisplayDictionary:

BEGIN PROGRAM.
import spss, spssaux, DisplayDict
print ' '
print "Data Dictionary for:", spssaux.GetDatasetInfo()
print ' '
print "Number of Variables:", spss.GetVariableCount()
print ' '
DisplayDict.dictionary(alphaorder=False)
END PROGRAM.

Where do I add stats='cats' or stats='all'?


Pat

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Getting statistics using Python DisplayDictionary module-basic question

Peck, Jon
You can just change the line DisplayDict.dictionary(alphaorder=False)
to read
DisplayDict.dictionary(alphaorder=False, stats='cats')
 
and the summary statistics will appear integrated with the output.
 
You may be glad to know that in SPSS 16, using the new extension facility, Python modules can be wrapped in SPSS syntax, so you could write, without using BEGIN/END PROGRAM,
 
CODEBOOK /OPTIONS ALPHAORDER=FALSE STATS=CATS.
 
Regards,
Jon Peck

________________________________

From: SPSSX(r) Discussion on behalf of Cleland, Patricia (EDU)
Sent: Mon 10/29/2007 9:13 AM
To: [hidden email]
Subject: [SPSSX-L] Getting statistics using Python DisplayDictionary module-basic question



On Developer Central, the write up on DisplayDicitonary states:

To include counts for values of categorical values and labelled values
of scale variables and means and validn for scale variables, specify
stats='cats' in the call. stats='all' can be used to get counts for all
values of all variables along with scale variable means. Means are only
available with SPSS 15.0.1 or later.
(http://www.spss.com/devcentral/index.cfm?pg=downloadDet&dId=19)


My question is: What is meant by "the call"?

Here's the syntax that I use for DisplayDictionary:

BEGIN PROGRAM.
import spss, spssaux, DisplayDict
print ' '
print "Data Dictionary for:", spssaux.GetDatasetInfo()
print ' '
print "Number of Variables:", spss.GetVariableCount()
print ' '
DisplayDict.dictionary(alphaorder=False)
END PROGRAM.

Where do I add stats='cats' or stats='all'?


Pat

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

====================To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD