<?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: How to Populate the missing values with baseline result in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766026#M30622</link>
    <description>&lt;P&gt;In a DATA step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if missing(v4) then v4=v1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 04 Sep 2021 11:33:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-09-04T11:33:42Z</dc:date>
    <item>
      <title>How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766023#M30621</link>
      <description>&lt;P&gt;Populate the missing values with baseline result where consider Visit=V1 as baseline.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;USUBJID&lt;/TD&gt;&lt;TD&gt;PARAM&lt;/TD&gt;&lt;TD&gt;_NAME_&lt;/TD&gt;&lt;TD&gt;V1&lt;/TD&gt;&lt;TD&gt;V2&lt;/TD&gt;&lt;TD&gt;V3&lt;/TD&gt;&lt;TD&gt;V4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;SYSBP&lt;/TD&gt;&lt;TD&gt;AVAL&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;130&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;SYSBP&lt;/TD&gt;&lt;TD&gt;AVAL&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 04 Sep 2021 11:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766023#M30621</guid>
      <dc:creator>Haricasas12</dc:creator>
      <dc:date>2021-09-04T11:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766026#M30622</link>
      <description>&lt;P&gt;In a DATA step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if missing(v4) then v4=v1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Sep 2021 11:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766026#M30622</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-04T11:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766028#M30623</link>
      <description>&lt;P&gt;Here you are:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input USUBJID $ PARAM $ _NAME_ $ V1 V2 V3 V4;
cards;
10	SYSBP	AVAL	100	120	130	110
20	SYSBP	AVAL	90	100	120	.
;
run;

data want(drop=i);
 set have;
 array vs{*} V:;
 do i=2 to dim(vs);
  if vs(i)=. then vs(i)=v1;
 end;
run;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 11:37:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766028#M30623</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-09-04T11:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766030#M30624</link>
      <description>Thanks a lot.. Its working.. Can briefly explain the code.. how is it working</description>
      <pubDate>Sat, 04 Sep 2021 11:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766030#M30624</guid>
      <dc:creator>Haricasas12</dc:creator>
      <dc:date>2021-09-04T11:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766033#M30625</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's (data step) array processing.&lt;/P&gt;
&lt;P&gt;You put all the variables starting with the letter 'V' in a numerical array (the colon : is a wildcard to avoid putting V1 V2 V3 V4).&lt;/P&gt;
&lt;P&gt;You then use a do-loop to screen V2, V3 and V4 for a missing value. If missing, put the value of V1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 12:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766033#M30625</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-09-04T12:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Populate the missing values with baseline result</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766040#M30626</link>
      <description>Thank you so much for explanation..</description>
      <pubDate>Sat, 04 Sep 2021 17:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-Populate-the-missing-values-with-baseline-result/m-p/766040#M30626</guid>
      <dc:creator>Haricasas12</dc:creator>
      <dc:date>2021-09-04T17:25:51Z</dc:date>
    </item>
  </channel>
</rss>

