|
Hi SPSS Guru's,
I have a question that is probably very simple, but here it goes. I need to select the top 3% of service users based on service minutes in a mental health department. The Population is all clients. What would the code for this be? Thanks Kevin Secrist, Administrative Analyst, Associate Butte County Department of Behavioral Health Administrative Services Division CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents or messages attached to it, may contain confidential information that is legally privileged. (Section 56.10 of the California Statutes: http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp <http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp> ) If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, then you are (1) notified that any disclosure, copying, distribution, saving, reading or use of this information is strictly prohibited, (2) requested to discard and delete this e-mail and any attachments, and (3) requested to immediately notify us by e-mail that you mistakenly received this message [hidden email], fax (530) 895-6548, or telephone (530) 879-3305. Thank you. ====================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 |
|
Hi Kevin,
Untested: begin program. import spss cases = spss.GetCaseCount * 0.03 spss.Submit(""" sort cases by service_minutes (d). n of cases %s. exe. """ % cases ) end program. Cheers!! Albert-Jan --- On Wed, 9/10/08, Secrist, Kevin <[hidden email]> wrote: > From: Secrist, Kevin <[hidden email]> > Subject: Selecting the top 3% of Service Users > To: [hidden email] > Date: Wednesday, September 10, 2008, 12:18 AM > Hi SPSS Guru's, > > I have a question that is probably very simple, but here it > goes. I > need to select the top 3% of service users based on service > minutes in a > mental health department. The Population is all clients. > What would the > code for this be? > > Thanks > > Kevin Secrist, Administrative Analyst, Associate > > Butte County Department of Behavioral Health > > Administrative Services Division > > > > CONFIDENTIALITY NOTICE: This e-mail transmission, and any > documents or > messages attached to it, may contain confidential > information that is > legally privileged. (Section 56.10 of the California > Statutes: > http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp > <http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp> > ) If > you are not the intended recipient, or a person responsible > for > delivering this e-mail to the intended recipient, then you > are (1) > notified that any disclosure, copying, distribution, > saving, reading or > use of this information is strictly prohibited, (2) > requested to discard > and delete this e-mail and any attachments, and (3) > requested to > immediately notify us by e-mail that you mistakenly > received this > message [hidden email], fax (530) 895-6548, or > telephone (530) > 879-3305. Thank you. > > > > ====================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 |
|
In reply to this post by Secrist, Kevin
Hi Kevin,
Try this (the first part is only for testing purposes). * create a fake dataset. INPUT PROGRAM. - loop ident = 1 to 1000. - compute service_minutes = uniform(100). - end case. - end loop. - END FILE. END INPUT PROGRAM. form ident (f4). execute. **** the solution ****. * create percentiles. RANK service_minutes (D) /NTILES (100) into percentiles . * select top 3%. select if percentiles <= 3. execute. Best regards, Jan -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Secrist, Kevin Sent: Wednesday, September 10, 2008 12:18 AM To: [hidden email] Subject: Selecting the top 3% of Service Users Hi SPSS Guru's, I have a question that is probably very simple, but here it goes. I need to select the top 3% of service users based on service minutes in a mental health department. The Population is all clients. What would the code for this be? Thanks Kevin Secrist, Administrative Analyst, Associate Butte County Department of Behavioral Health Administrative Services Division CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents or messages attached to it, may contain confidential information that is legally privileged. (Section 56.10 of the California Statutes: http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp <http://www.dmh.cahwnet.gov/Admin/regulations/confidentiality.asp> ) If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, then you are (1) notified that any disclosure, copying, distribution, saving, reading or use of this information is strictly prohibited, (2) requested to discard and delete this e-mail and any attachments, and (3) requested to immediately notify us by e-mail that you mistakenly received this message [hidden email], fax (530) 895-6548, or telephone (530) 879-3305. Thank you. ======= 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 _____________ Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem. Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu. This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission. Are you sure that you really need a print version of this message and/or its attachments? Think about nature. -.- -- ===================== 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 |
|
In reply to this post by Secrist, Kevin
At 06:18 PM 9/9/2008, Secrist, Kevin wrote:
>I need to select the top 3% of service users based on service >minutes in a mental health department. The Population is all clients. See Jan Spousta's solution, if you have one record per user. If you have a separate record for every visit, as is common, use AGGREGATE to create a dataset with total-usage records for every user. Albert-jan, curious: Why throw Python at a straightforward problem like this one? ===================== 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 |
| Free forum by Nabble | Edit this page |
