|
Hi Richard
Thanks for you reply to my previous question on matching two files. As pointed out by you earlier, I needed to use the merge file/add cases function. Hence I did not use this function as suggested by you in your most recent email. AGGREGATE/OUTFILE=* MODE=ADDVARIABLES I have done that to get all person and orgn victims in one file. Next I sorted the Increfnumber in an ascending order which gave me all victim records for each corresponding INCRefnum. From this file I selected my victim records manually using the "Involvement status" variable to address the conditions in identifying a victim. Some business rules include the following For instance, where the increfnum had "involvement status" only as trauma I retain all of them where the increfnum had only an"involvement status" as not recorded I retain those organisation victim records but where the increfnum had both a trauma and an orgn victim I keep only the orgn victim record where the increfnum has financial, not recorded and trauma I retain only the financial and not recorded etc. It took me day to do this. I have to try and write syntax using all the rules and set up a process since I have to do this on a regular basis but i am not sure about the function i have to use. Am I right in thinking that i have to use lag function on Increfnumber based on do if "Involvement status" eq " " etc function? I also want to convert "Involvement Status" into a numeric variable before I attempt the syntax. I know I can use the "autorecode" function for this. 1=trauma, 2=financial, 3=not recorded , 4= trauma, 5=thru whom committed example condition 1 - Increfnum newInvolvementstatus 123 1 123 2 123 1 I need to retain only record 2 for this Incref number. example condition 2 - Increfnum newInvolvementstatus 124 2 124 3 124 1 I need to retain record 1 & 2 only for this incref number example condition 3 - Increfnum newInvolvementstatus 124 3 124 3 124 3 I retain to retain all the 3 records for this incref num Thank you once again regards Thara Vardhan Senior Statistician Performance Improvement & Planning _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The information contained in this email is intended for the named recipient(s) only. It may contain private, confidential, copyright or legally privileged information. If you are not the intended recipient or you have received this email by mistake, please reply to the author and delete this email immediately. You must not copy, print, forward or distribute this email, nor place reliance on its contents. This email and any attachment have been virus scanned. However, you are requested to conduct a virus scan as well. No liability is accepted for any loss or damage resulting from a computer virus, or resulting from a delay or defect in transmission of this email or any attached file. This email does not constitute a representation by the NSW Police Force unless the author is legally entitled to do so. ===================== 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 |
