|
Administrator
|
Jan,
Maybe you should post your aggregate code? This is probably what you need to do? I'll bet you are doing something like the first but NOT weighting the data. WEIGHT BY TOTAL. AGGREGATE OUTFILE * / BREAK DxGrp / N=N. Alternatively: AGGREGATE OUTFILE * / BREAK DxGrp / N=SUM(TOTAL). HTH, David On Thu, 2 Sep 2010 10:07:23 -0700, J McClure <[hidden email]> wrote: >Hi, >I have data from a one month period of time in an emergency room. The >data is by diagnosis not by individuals (var is Dx). For each of >diagnosis of 58 diagnoses I have the number of times it was listed as >the diagnosis (var 'total') for 224 individuals admitted to the >emergency department for that month. Because the 'total' reflects >listing of a diagnosis as a primary or secondary one, the 'total' sums >to more than 224. I created a new variable (DxGrp) and assigned each of >the 58 diagnoses to one of the 7 diagnostic groups. I want to 'collapse' >the information such that I have 7 diagnostic groups and the number of >times that group was the primary or secondary diagnoses. >I tried aggregate but got the number of times each DxGrp was found in >the list of 58 diagnose. I considered count but I don't think I need to >sum values across variables. I also considered compute but can't figure >out how to write the syntax. >Any help appreciated. Jan > >Here is a sample of the data. >Dx POSTTRAUMATIC STRESS DIS total 55 DxGrp 5 >Dx DEPRESSIVE DISORDER NEC total 39 DxGrp 1 >Dx ALCOH DEP NEC/NOS-UNSPEC total 16 DxGrp 7 >Dx RECURR DEPR DISORDER-MOD total 14 DxGrp 1 > >===================== >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
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 |
