frequency counts across variables

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

frequency counts across variables

Jims More
I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 
 
Jims


Stay connected to the people that matter most with a smarter inbox. Take a look.
Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

ViAnn Beadle

What release of SPSS are you running? The syntax differs depending upon whether you are running the TABLES command or the CTABLES command.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jims More
Sent: Tuesday, February 24, 2009 5:38 PM
To: [hidden email]
Subject: frequency counts across variables

 

I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 

 

Jims

 


Stay connected to the people that matter most with a smarter inbox. Take a look.

Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

Jims More
In reply to this post by Jims More
Thank you for your reply, ViAnn.
 
I am using SPSS 16 with Table module.
 
I have tried running several Ctable commands before and fortunately all were working.  I dont know about "Table" command.  But I am very much thankful for any method you would provide.
 
Jims.


--- On Wed, 25/2/09, ViAnn Beadle <[hidden email]> wrote:

From: ViAnn Beadle <[hidden email]>
Subject: Re: frequency counts across variables
To: [hidden email]
Received: Wednesday, 25 February, 2009, 3:15 AM

What release of SPSS are you running? The syntax differs depending upon whether you are running the TABLES command or the CTABLES command.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jims More
Sent: Tuesday, February 24, 2009 5:38 PM
To: [hidden email]
Subject: frequency counts across variables

 

I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 

 

Jims

 


Stay connected to the people that matter most with a smarter inbox. Take a look.



Stay connected to the people that matter most with a smarter inbox. Take a look.
Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

Jims More
In reply to this post by Jims More
Thank you for your reply, ViAnn.
 
I am using SPSS 16 with Table module.
 
I have tried running several Ctable commands before and fortunately all were working.  I dont know about "Table" command.  But I am very much thankful for any method you would provide.
 
Jims.


--- On Wed, 25/2/09, ViAnn Beadle <[hidden email]> wrote:

From: ViAnn Beadle <[hidden email]>
Subject: Re: frequency counts across variables
To: [hidden email]
Received: Wednesday, 25 February, 2009, 3:15 AM

What release of SPSS are you running? The syntax differs depending upon whether you are running the TABLES command or the CTABLES command.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jims More
Sent: Tuesday, February 24, 2009 5:38 PM
To: [hidden email]
Subject: frequency counts across variables

 

I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 

 

Jims

 


Stay connected to the people that matter most with a smarter inbox. Take a look.



Stay connected to the people that matter most with a smarter inbox. Take a look.
Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

ViAnn Beadle

Make sure all your variables have exactly the same value labels and are defined as nominal. The Custom Tables dialog is overly strict and requires this initial step before proceeding.

 

1.       Open the custom tables dialog and drag all 20 variables to the columns.

2.       On the lower left of the main panel, change the Category Position drop-down to Column Labels in Rows.

3.       Paste this syntax to inspect it.  

4.       Place your cursor anywhere in the command and press F1 to open the help as you start figuring out what all the subcommands do. This is probably the best way to learn the syntax.

 

From: Jims More [mailto:[hidden email]]
Sent: Tuesday, February 24, 2009 9:02 PM
To: [hidden email]; ViAnn Beadle
Subject: Re: frequency counts across variables

 

Thank you for your reply, ViAnn.

 

I am using SPSS 16 with Table module.

 

I have tried running several Ctable commands before and fortunately all were working.  I dont know about "Table" command.  But I am very much thankful for any method you would provide.

 

Jims.



--- On Wed, 25/2/09, ViAnn Beadle <[hidden email]> wrote:


From: ViAnn Beadle <[hidden email]>
Subject: Re: frequency counts across variables
To: [hidden email]
Received: Wednesday, 25 February, 2009, 3:15 AM

What release of SPSS are you running? The syntax differs depending upon whether you are running the TABLES command or the CTABLES command.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jims More
Sent: Tuesday, February 24, 2009 5:38 PM
To: [hidden email]
Subject: frequency counts across variables

 

I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 

 

Jims

 


Stay connected to the people that matter most with a smarter inbox. Take a look.

 


Stay connected to the people that matter most with a smarter inbox. Take a look.

Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

Jims More
In reply to this post by Jims More
Thank you ViAnn, it works.  I've learned from you. 
Thank you, once again.
 
Jims


--- On Wed, 25/2/09, ViAnn Beadle <[hidden email]> wrote:

From: ViAnn Beadle <[hidden email]>
Subject: Re: frequency counts across variables
To: [hidden email]
Received: Wednesday, 25 February, 2009, 2:26 PM

Make sure all your variables have exactly the same value labels and are defined as nominal. The Custom Tables dialog is overly strict and requires this initial step before proceeding.

 

1.       Open the custom tables dialog and drag all 20 variables to the columns.

2.       On the lower left of the main panel, change the Category Position drop-down to Column Labels in Rows.

3.       Paste this syntax to inspect it.  

4.       Place your cursor anywhere in the command and press F1 to open the help as you start figuring out what all the subcommands do. This is probably the best way to learn the syntax.

 

From: Jims More [mailto:[hidden email]]
Sent: Tuesday, February 24, 2009 9:02 PM
To: [hidden email]; ViAnn Beadle
Subject: Re: frequency counts across variables

 

Thank you for your reply, ViAnn.

 

I am using SPSS 16 with Table module.

 

I have tried running several Ctable commands before and fortunately all were working.  I dont know about "Table" command.  But I am very much thankful for any method you would provide.

 

Jims.



--- On Wed, 25/2/09, ViAnn Beadle <[hidden email]> wrote:


From: ViAnn Beadle <[hidden email]>
Subject: Re: frequency counts across variables
To: [hidden email]
Received: Wednesday, 25 February, 2009, 3:15 AM

What release of SPSS are you running? The syntax differs depending upon whether you are running the TABLES command or the CTABLES command.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jims More
Sent: Tuesday, February 24, 2009 5:38 PM
To: [hidden email]
Subject: frequency counts across variables

 

I have 20 categorical variables with the same 9 category levels.  I want to create 20 colums by 9 rows table showing the frequency counts.  Can anyone suggest a syntax? I have spss table module.  Thank you 

 

Jims

 


Stay connected to the people that matter most with a smarter inbox. Take a look.

 


Stay connected to the people that matter most with a smarter inbox. Take a look.



Stay connected to the people that matter most with a smarter inbox. Take a look.
Reply | Threaded
Open this post in threaded view
|

Re: frequency counts across variables

hillel vardi
In reply to this post by Jims More
Shalom

Here is a way to get the table using data restructure and aggregate .


dataset close all .
run name           20 by 9 table .
input program.
vector    var(20,f2) .
loop      j=1 to 60.
loop      id=1 to 20.
COMPUTE    var(id) = trunc(RV.UNIFORM(1,10)) .
*compute    aa=RV.UNIFORM(1,9) .
*print      / i j aa .
end loop.
end case.
end loop.
end file.
end input program.
execute.


VARSTOCASES  /MAKE category FROM var1 var2 var3 var4 var5 var6 var7 var8
var9 var10 var11 var12 var13 var14 var15 var16
  var17 var18 var19 var20
 /INDEX = seq(20)
 /NULL = KEEP.
AGGREGATE
  /OUTFILE= *
  /BREAK=seq category
  /var=N(seq).
SORT CASES BY category  seq.
CASESTOVARS
 /ID =  category
 /INDEX = seq
 /GROUPBY = VARIABLE .



Hillel Vardi
BGU


Jims More wrote:

> I have 20 categorical variables with the same 9 category levels.  I
> want to create 20 colums by 9 rows table showing the frequency
> counts.  Can anyone suggest a syntax? I have spss table module.  Thank
> you
>
> Jims
>
>
> ------------------------------------------------------------------------
> Stay connected to the people that matter most with a smarter inbox.
> Take a look
> <http://au.rd.yahoo.com/galaxy/mail/tagline2/*http://au.docs.yahoo.com/mail/smarterinbox>.

=====================
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