<?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: Imput missing data with avaiable values in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515809#M3014</link>
    <description>&lt;P&gt;Not clear with this&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"." =&amp;gt; 35,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you want missings to be imputed with previous non missing value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID     Date          Age        Group             Workout_mins ;
cards;
1       1                 35           35                   60
1       2                   .             .                     45
1       3                   .             .                      0 
;

data want;
update have(obs=0) have;
by id;
output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 25 Nov 2018 18:55:58 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-11-25T18:55:58Z</dc:date>
    <item>
      <title>Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515808#M3013</link>
      <description>&lt;P&gt;Hello SAS members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I merged some data sets and got some missing values in my new merged data set. Currently it looks like this:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Age&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Workout_mins&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;45&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;So basically age and group stay the same, how can I imput&amp;nbsp;the values based on existing values to the .&amp;nbsp;in the data set (i.e. "." =&amp;gt; 35, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 18:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515808#M3013</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-11-25T18:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515809#M3014</link>
      <description>&lt;P&gt;Not clear with this&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"." =&amp;gt; 35,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you want missings to be imputed with previous non missing value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID     Date          Age        Group             Workout_mins ;
cards;
1       1                 35           35                   60
1       2                   .             .                     45
1       3                   .             .                      0 
;

data want;
update have(obs=0) have;
by id;
output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 Nov 2018 18:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515809#M3014</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-25T18:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515817#M3018</link>
      <description>&lt;P&gt;Yes, since the person with ID 1 is 35 years old as seen in the row above, the .&amp;nbsp;in the below row should be the same value (35). Could you explain what is&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;have&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;obs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;0&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt; have&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in your codes?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 19:24:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515817#M3018</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-11-25T19:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515826#M3022</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID     Date          Age        Group             Workout_mins ;
cards;
1       1                 35           35                   60
1       2                   .             .                     45
1       3                   .             .                      0 
;

data want;
retain h_age 0;
set have;
if first.id then h_age = age;
if age &amp;lt;= h_age then age = h_age;
by id;
drop h_age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 21:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515826#M3022</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-25T21:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515830#M3024</link>
      <description>Hi VDD, what does 0 in the second coding line indicate (retain h_age 0)?</description>
      <pubDate>Sun, 25 Nov 2018 22:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515830#M3024</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-11-25T22:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515832#M3025</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203915"&gt;@mkt_apprentice&lt;/a&gt;&amp;nbsp; some reading about update statement here&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001329151.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will help you&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 22:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515832#M3025</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-11-25T22:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Imput missing data with avaiable values</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515834#M3026</link>
      <description>Thank you for the reference reading!&lt;BR /&gt;I got that "want" is the newly modified data set by revising master data set "have(obs=0)" by the information in the data set "have". Could you help explain what does "have (obs=0)" refer to? Obs is not a variable right, so what does obs=0 refer to?</description>
      <pubDate>Sun, 25 Nov 2018 22:22:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Imput-missing-data-with-avaiable-values/m-p/515834#M3026</guid>
      <dc:creator>mkt_apprentice</dc:creator>
      <dc:date>2018-11-25T22:22:21Z</dc:date>
    </item>
  </channel>
</rss>

