<?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: Syntax to change missing values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/252337#M47866</link>
    <description>&lt;P&gt;Not having a nested&amp;nbsp;clause speeds things up a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table WANT as&lt;BR /&gt;select coalesce(DURATION, mean(DURATION) ) as DURATION&lt;BR /&gt;from HAVE;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2016 09:08:05 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2016-02-25T09:08:05Z</dc:date>
    <item>
      <title>Syntax to change missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247347#M46368</link>
      <description>&lt;P&gt;I am looking for syntax to change the missing values of a variable to the average of the remaining values of the same variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;for the variable duration-&lt;/P&gt;&lt;P&gt;duration : 10 20 30 40 . . . &amp;nbsp;( . meaning missing values )&lt;/P&gt;&lt;P&gt;I want to replace the three missing values with the average of 10 20 30 40. I want to repliate this over a variable having more than 1000 values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me out ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 00:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247347#M46368</guid>
      <dc:creator>ksaser</dc:creator>
      <dc:date>2016-02-02T00:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to change missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247351#M46370</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input duration;
cards;
10 
20 
30 
40 
. 
. 
. 
;
run;

proc stdize data=have missing=mean reponly out=want;
var _numeric_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2016 01:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247351#M46370</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-02T01:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to change missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247393#M46382</link>
      <description>&lt;P&gt;As an option, you could also do:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT as
  select  coalesce(DURATION,(select mean(DURATION) from HAVE)) as DURATION
  from    HAVE;
quit;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2016 10:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/247393#M46382</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-02-02T10:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to change missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/252337#M47866</link>
      <description>&lt;P&gt;Not having a nested&amp;nbsp;clause speeds things up a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create table WANT as&lt;BR /&gt;select coalesce(DURATION, mean(DURATION) ) as DURATION&lt;BR /&gt;from HAVE;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 09:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-to-change-missing-values/m-p/252337#M47866</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-02-25T09:08:05Z</dc:date>
    </item>
  </channel>
</rss>

