LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 15 Aug 2006 18:21:10 -0400
Reply-To:     Nathaniel_Wooding@DOM.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Nat Wooding <Nathaniel_Wooding@DOM.COM>
Subject:      Re: Analysis
Comments: To: Vijay Wadhwa <vuw100@YAHOO.COM>
In-Reply-To:  <200608152203.k7FKDO9F021675@mailgw.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Vijay

Try the following.

Nat Wooding

data a; infile cards truncover; input ID datetime $20. loc;

cards; 1 26MAR06:13:17:00 10 1 26MAR06:13:20:00 10 1 28MAR06:19:47:00 12 1 25APR06:09:25:00 10 2 26APR06:09:27:00 8 2 29APR06:20:03:00 10 2 29APR06:20:03:00 10 2 29APR08:20:03:00 6 data a; set; by id notsorted loc; if first.loc; keep id loc; proc print; run;

Vijay Wadhwa <vuw100@YAHOO.COM > To Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU Discussion" cc <SAS-L@LISTSERV.U GA.EDU> Subject Analysis

08/15/2006 06:03 PM

Please respond to Vijay Wadhwa <vuw100@YAHOO.COM >

ID datetime loc 1 26MAR06:13:17:00 10 1 26MAR06:13:20:00 10 1 28MAR06:19:47:00 12 1 25APR06:09:25:00 10 2 26APR06:09:27:00 8 2 29APR06:20:03:00 10 2 29APR06:20:03:00 10 2 29APR08:20:03:00 6

I have data in the format above, I am trying to analyze the flow pattern,

For each ID I need the order in which the location appears in the data; for example ID 1 has location 10,10 ,12, 10 but since the 10,10 occurred twice it would only be counted as one 10, whereas the 10 after 12 would be considered since it comes after 12 (as there is a change in location); therefore for ID 1 the flow is 10,12,10 . In other words same location is to be counted just once unless it is interupted by another location

Similarly for ID 2 the flow is 8,10,6.

If anyone can give me any pointers on how I could achieve this, I would be very grateful.

Thank you

-vj

----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


Back to: Top of message | Previous page | Main SAS-L page