counting IDs

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

counting IDs

Scott Roesch
Hi all:

We have a stacked data set where we have an id variable that
represents teams (individuals are nested within teams). We need to
count the number of cases per team and create a new
 variable such that identifies team size. Any help in this regard
would be greatly appreciated.

Scott

--
***********************************************
Scott C. Roesch, PhD
Department of Psychology
San Diego State University
San Diego, CA 92182-4611

office phone: 619 594-2652
fax: 619 594-1332
email: [hidden email]
**********************************************

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

Automatic reply: counting IDs

Harmon, Judith, PED




I will be out of the office until Tuesday February 19th.  If you need assistance with SOAP, please contact Pascal Buser at [hidden email] or by phone at 505-827-6595 or Kennedy Baiywo at 505-827-6721. I will respond to your e-mail when I return.

 Thanks!

 

Reply | Threaded
Open this post in threaded view
|

Re: counting IDs

Martha Hewett
In reply to this post by Scott Roesch
For TeamID being your ID variable, this creates a new variable N_BREAK that is the number of cases with each team ID.

AGGREGATE 
  /OUTFILE=* MODE=ADDVARIABLES 
  /BREAK=TeamID 
  /N_BREAK=N


You can do this through the menus using  DATA/AGGREGATE and setting TeamID as the break varaible. Leave Aggregated Variables blank, check the Number of cases box, and use the default variable name N_BREAK.

Martha Hewett  | 
Director of Research | 612.335.5865
Center for Energy and Environment
212 Third Avenue North, Suite 560 | Minneapolis, MN 55401
(cell) 612.839.2358 | (fax) 612.335.5888 | www.mncee.org



On Mon, Feb 18, 2013 at 1:12 PM, Scott Roesch <[hidden email]> wrote:
Hi all:

We have a stacked data set where we have an id variable that
represents teams (individuals are nested within teams). We need to
count the number of cases per team and create a new
 variable such that identifies team size. Any help in this regard
would be greatly appreciated.

Scott

--
***********************************************
Scott C. Roesch, PhD
Department of Psychology
San Diego State University
San Diego, CA 92182-4611

office phone: 619 594-2652
fax: 619 594-1332
email: [hidden email]
**********************************************

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



This e-mail transmission and any attachments accompanying it may contain confidential and/or proprietary information and is intended only for the person or entity to whom it was originally addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or other use of this information is strictly prohibited. Any unauthorized interception of this transmission is illegal. If you have received this transmission in error, please notify the sender by reply e-mail, and then destroy all copies of this transmission