<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LOCF coding check continued.. in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4760#M405</link>
    <description>I hope this will solve the problem.

Message was edited by: Sandeep</description>
    <pubDate>Wed, 19 Sep 2007 07:15:46 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-09-19T07:15:46Z</dc:date>
    <item>
      <title>LOCF coding check continued..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4757#M402</link>
      <description>the rest of the coding is ...&lt;BR /&gt;
&lt;BR /&gt;
*** if labvalue is within 5 days of dosing,retain it as a valid baseline.;&lt;BR /&gt;
 if 1 &amp;lt;=(dosedate-sampdate)&amp;lt;=5 then&lt;BR /&gt;
 do i = 1 to 3 ;&lt;BR /&gt;
 if chol{i} ne . then&lt;BR /&gt;
 base{i} = chol{i};&lt;BR /&gt;
 end;&lt;BR /&gt;
 *** keep last record per patient holding the locf values.;&lt;BR /&gt;
 if last.subject;&lt;BR /&gt;
 label b_hdl="baseline hdl"&lt;BR /&gt;
       b_ldl="baseline ldl"&lt;BR /&gt;
	   b_trig="baseline triglycerides";&lt;BR /&gt;
       run;&lt;BR /&gt;
&lt;BR /&gt;
thanx&lt;BR /&gt;
April.</description>
      <pubDate>Tue, 18 Sep 2007 14:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4757#M402</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-18T14:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: LOCF coding check continued..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4758#M403</link>
      <description>I hope I have understood your problem correctly. I have slightly modified the code. &lt;BR /&gt;
&lt;BR /&gt;
*** Input Sample cholesterol data;&lt;BR /&gt;
***subject=patient number,sampdate=lab sample date,&lt;BR /&gt;
***HDL=HDL,LDL=LDL,TRIG=Triglycerides.;&lt;BR /&gt;
data cholesterol_base;&lt;BR /&gt;
input subject $ sampdate date9. hdl ldl trig;&lt;BR /&gt;
cards;&lt;BR /&gt;
101 05sep2003 48 188 108&lt;BR /&gt;
101 06sep2003 49 185 .&lt;BR /&gt;
102 01oct2003 54 200 350&lt;BR /&gt;
102 02oct2003 52 . 360&lt;BR /&gt;
103 10nov2003 . 240 900&lt;BR /&gt;
103 11nov2003 30 . 880&lt;BR /&gt;
103 12nov2003 32 . .&lt;BR /&gt;
103 13nov2003 35 289 930&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
***input sample pill dosing date;&lt;BR /&gt;
***subject=patient number,dosedate=drug dosing date;&lt;BR /&gt;
data dosing;&lt;BR /&gt;
input subject $ dosedate date9.;&lt;BR /&gt;
cards;&lt;BR /&gt;
101 07sep2003&lt;BR /&gt;
102 07oct2003&lt;BR /&gt;
103 13nov2003&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
*** sorting cholesterol data for merging with dosing data;&lt;BR /&gt;
proc sort data=cholesterol_base;&lt;BR /&gt;
by subject sampdate;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
***sorting dosing data for merging with cholesterol data.;&lt;BR /&gt;
proc sort data=dosing;&lt;BR /&gt;
by subject;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
***DEFINE BASELINE HDL,LDL,TRIG VARIABLES.;&lt;BR /&gt;
data baseline(rename=(hdl=b_hdl ldl=b_ldl trig=b_trig));&lt;BR /&gt;
merge cholesterol_base dosing;&lt;BR /&gt;
by subject;&lt;BR /&gt;
keep subject sampdate dosedate hdl ldl trig;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=baseline;&lt;BR /&gt;
run;&lt;BR /&gt;
proc sort data=baseline;&lt;BR /&gt;
by subject sampdate;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Sandeep

Message was edited by: Sandeep</description>
      <pubDate>Wed, 19 Sep 2007 07:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4758#M403</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-19T07:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: LOCF coding check continued..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4759#M404</link>
      <description>*** Apply LOCF if the the value is within 5 days of dosing ***;&lt;BR /&gt;
data locf;&lt;BR /&gt;
  set baseline;&lt;BR /&gt;
  by subject sampdate;&lt;BR /&gt;
  diff=dosedate-sampdate;&lt;BR /&gt;
  array base{3} b_hdl b_ldl b_trig;&lt;BR /&gt;
  array chol{3} hdl ldl trig;&lt;BR /&gt;
  retain hdl ldl trig;&lt;BR /&gt;
  do i=1 to 3;&lt;BR /&gt;
    if not(first.subject) and base{i}=. and 0 le diff le 5 then do;&lt;BR /&gt;
      chol{i} + base{i};&lt;BR /&gt;
    end;&lt;BR /&gt;
    else do;&lt;BR /&gt;
      chol{i} = base{i};&lt;BR /&gt;
    end;&lt;BR /&gt;
   end;&lt;BR /&gt;
run;

Message was edited by: Sandeep</description>
      <pubDate>Wed, 19 Sep 2007 07:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4759#M404</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-19T07:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: LOCF coding check continued..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4760#M405</link>
      <description>I hope this will solve the problem.

Message was edited by: Sandeep</description>
      <pubDate>Wed, 19 Sep 2007 07:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4760#M405</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-19T07:15:46Z</dc:date>
    </item>
    <item>
      <title>zdifferent output ..plz reply..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4761#M406</link>
      <description>Hi Sandeep..&lt;BR /&gt;
&lt;BR /&gt;
thanx a lot for help.. n it actually produced an out put.&lt;BR /&gt;
but it does not show the base line variables . it gives all the dates n values.&lt;BR /&gt;
&lt;BR /&gt;
i want my report to look like this.&lt;BR /&gt;
&lt;BR /&gt;
subject    b_hdl   b_ldl   b_trig&lt;BR /&gt;
101         49        185    108&lt;BR /&gt;
102         52         .       360&lt;BR /&gt;
103         32         240   880&lt;BR /&gt;
so the final dataset produced will have a base line reading.. can u plz help again?</description>
      <pubDate>Thu, 20 Sep 2007 20:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4761#M406</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-20T20:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: zdifferent output ..plz reply..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4762#M407</link>
      <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I believe that you are expecting a final dataset containg variables subject and the baseline values for three parameters on which LOCF is used &lt;B&gt;and not&lt;/B&gt; the original baseline variables.&lt;BR /&gt;
Do this:-&lt;BR /&gt;
1) create a dataset by dropping b_hdl, b_ldl and b_trig&lt;BR /&gt;
2) create one more datset by setting the dataset from step 1) and rename hdl, ldl and trig as b_hdl, b_ldl and b_tig respectively.&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;OR&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Are you expecting, one record per subjects. If so, please check your baseline defination. Perform the above mentioned step and select the record as per the baseline defination.&lt;BR /&gt;
&lt;BR /&gt;
Let me know if you still have questions further. :-)

Message was edited by: Sandeep</description>
      <pubDate>Fri, 21 Sep 2007 04:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4762#M407</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-21T04:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: zdifferent output ..plz reply..</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4763#M408</link>
      <description>Try this:&lt;BR /&gt;
&lt;BR /&gt;
***DEFINE BASELINE HDL,LDL,TRIG VARIABLES.;&lt;BR /&gt;
data jessica.baseline;&lt;BR /&gt;
	merge jessica.cholesterol_base jessica.dosing;&lt;BR /&gt;
	by subject;&lt;BR /&gt;
	if dosedate - sampdate &amp;lt;= 5 and dosedate - sampdate &amp;gt; 0 then output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
* This has to be a separate DATA step in order for the BY variable to work properly.;&lt;BR /&gt;
data jessica.baseline;&lt;BR /&gt;
	set jessica.baseline;&lt;BR /&gt;
	by subject;&lt;BR /&gt;
	retain b_hdl b_ldl b_trig;&lt;BR /&gt;
	if first.subject then do;&lt;BR /&gt;
		b_hdl=.;&lt;BR /&gt;
		b_ldl=.;&lt;BR /&gt;
		b_trig=.;&lt;BR /&gt;
	end;&lt;BR /&gt;
	if hdl ne . then b_hdl = hdl;&lt;BR /&gt;
	if ldl ne . then b_ldl = ldl;&lt;BR /&gt;
	if trig ne . then b_trig = trig;&lt;BR /&gt;
	keep subject b_:;&lt;BR /&gt;
	if last.subject then output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=jessica.baseline;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 25 Sep 2007 16:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/LOCF-coding-check-continued/m-p/4763#M408</guid>
      <dc:creator>1162</dc:creator>
      <dc:date>2007-09-25T16:57:24Z</dc:date>
    </item>
  </channel>
</rss>

