This seems relatively simple, but this group can solve it faster than me, so here it goes!
I have a large sample with one variable identifying hospitals (numerically, about 1000) Within hospitals, I also have a identifier of staff position (12 different possible positions) How do I compute the average number of people within each staff position at the hospital level (e.g., the average hospital has XX radiologists) Can "count occurrences of values within cases" solve this? Many thanks! J |
I suspect it could be done under Data/Aggregate.
The Break Variable should be Hospital. You can choose the summary function for the data within each hospital (Click the Function button). Hongwei "Patrick" Yang, University of Kentucky -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of The Burl Sent: Thursday, August 22, 2013 4:16 PM To: [hidden email] Subject: Help computing a variable in a large dataset This seems relatively simple, but this group can solve it faster than me, so here it goes! I have a large sample with one variable identifying hospitals (numerically, about 1000) Within hospitals, I also have a identifier of staff position (12 different possible positions) How do I compute the average number of people within each staff position at the hospital level (e.g., the average hospital has XX radiologists) Can "count occurrences of values within cases" solve this? Many thanks! J -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Help-computing-a-variable-in-a-large-dataset-tp5721687.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |
Administrator
|
In reply to this post by The Burl
It sounds as if your data file has (up to) 12 rows for each Hospital ID, and a variable that gives a count for each position within each hospital. Is that correct? And it sounds as if you want a mean count (averaging across hospitals) for each of the 12 possible positions. Is this correct? If so, look at the MEANS procedure.
MEANS CountVar by Position. If this is not what you're after, please clarify, including an example of what the data file looks like. HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Yes, that is correct. Here might be an example of of one hospital's set of data.
|
Here is a mock file some of the data.
Again, I want to know the average number of a staff position across all hospitals (e.g., the average hospital has X pharmacists) Mock_Hospital_Data.sav |
Administrator
|
You may want to review the AGGREGATE command!
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |