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 (October 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 6 Oct 2004 17:36:14 -0400
Reply-To:   "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Chakravarthy, Venky" <Venky.Chakravarthy@PFIZER.COM>
Subject:   Re: still questions on arrays and missing values
Comments:   To: "DePuy, Venita" <depuy001@DCRI.DUKE.EDU>
Content-Type:   text/plain; charset="iso-8859-1"

The data appear to be medical. Companies dealing with such data follow guidelines from their regulatory agencies for imputation of missing values. To the best of my knowledge the current standard (at least for summary tables) is to use the LOCF method.

Getting back to the question, I cannot offer anything that can match the elegance of Howard's solution. However, I do like to point out that this could easily have been a classic LOCF solution had the data remained in its normalized form. _________________________________ Venky Chakravarthy E-mail: swovcc_AT_hotmail_DOT_com

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of DePuy, Venita Sent: Wednesday, October 06, 2004 11:16 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: still questions on arrays and missing values

Just my 2 cents on Last Observation Carried Forward (LOCF) of dealing with missingness - Engels & Diehr's 2003 paper in Journal of Clinical Epidemiology looked at 14 different single imputation methods for dealing with missingness. They said, if you have data after the missing period, the Next Observation Carried Backwards method was the least biased. They also looked at averaging the before & after observations. If you don't have "after" data, LOCF is the best. But of course, we all know that multiple imputation is the best method for dealing with missingness! HTH Venita

> ---------- > From: Miller, Scott[SMTP:smiller@WVMI.ORG] > Reply To: Miller, Scott > Sent: Wednesday, October 06, 2004 11:09 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: still questions on arrays and missing values > > this might help you since it will carry forward the last non-missing value > of bp assuming you have at least a non missing value in bp1. > > data test; > input id cycle20 dx dxcycle bp1-bp7; > cards; > 1 5 1 3 96 98 97 100 112 115 120 > 2 6 1 6 112 110 120 118 114 . 111 > 3 3 1 3 127 120 131 125 120 122 115 > 4 6 1 6 104 97 100 . . . 88 > 5 4 1 1 98 100 111 99 100 101 99 > 6 7 0 . 96 95 97 99 96 95 94 > 7 2 0 . 74 77 80 78 75 75 70 > 8 1 0 . 80 79 85 87 84 84 88 > 9 5 0 . 77 80 90 85 70 71 75 > 10 3 0 . 100 101 95 93 92 96 80 > ; > run; > > data test1; set test; > array bp[*] bp1-bp7; > do x=2 to dim(bp); > if bp(x)=. then bp(x)=bp(x-1); > end; > run; > > > hope this helps you out. > > > Scott D. Miller, MA > > Evaluation and Informatics Analyst > West Virginia Medical Institute > (304) 346-9864 ext 2240 > > Every good scientist should be one part P.T. Barnum and one part B.F. > Skinner. > > Sumus quid sumus > > ...and why did I leave the plow in the field, and look for a job in the > town > > > > -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Tina > Costacou > Sent: Wednesday, October 06, 2004 10:57 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: still questions on arrays and missing values > > > I'm afraid I still cannot make this work. I have 7 values of blood > pressure from 7 different years. I'm interesting in getting the blood > pressure value from the year corresponding to cycle20. If that value is > missing, then I'd like to get the program to look for the previous to that > year non-missing blood pressure. > > Any help would be much appreciated. > Kind regards, > Tina. > > > data test; > input id cycle20 dx dxcycle bp1-bp7; > cards; > 1 5 1 3 96 98 97 100 112 115 120 > 2 6 1 6 112 110 120 118 114 . 111 > 3 3 1 3 127 120 131 125 120 122 115 > 4 6 1 6 104 97 100 . . . 88 > 5 4 1 1 98 100 111 99 100 101 99 > 6 7 0 . 96 95 97 99 96 95 94 > 7 2 0 . 74 77 80 78 75 75 70 > 8 1 0 . 80 79 85 87 84 84 88 > 9 5 0 . 77 80 90 85 70 71 75 > 10 3 0 . 100 101 95 93 92 96 80 > ; > run; > > data test1; set test; > > array bp{7} bp1-bp7; > > if .z<cycle20<7 then do; > do i=1 to cycle20; > if (dx=1) and (dxcycle<=i) then do; > dx20=1; bp20=bp{i}; > if bp{i}=. then do; > do ni=i-1 to i-6 until (bp20 ne .); > bp{i}=bp{ni}; > bp20=bp{ni}; > *retain ni; > end; > end; > end; > end; > end; > run; >

LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.


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