<?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: Missing Data Analysis in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17447#M3314</link>
    <description>Perhaps these datalines will work better.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
30000     64831     94831    118500      1.25        A        spring         1&lt;BR /&gt;
30000     50765     80765     93900         .                      winter        0&lt;BR /&gt;
46651     18573     65224         .          1.16         B                         1&lt;BR /&gt;
45990     91402         .        184000     1.34         C         winter        1&lt;BR /&gt;
42394         .         40575    168000     1.43                                     0&lt;BR /&gt;
    .          3351      51102    169000     1.12         D         winter        1&lt;BR /&gt;
63596      2182      65778         .          1.26         E         spring        1&lt;BR /&gt;
56658     53806     10464     255000     1.21                                     0&lt;BR /&gt;
51428     72451         .         .              1.18         F         spring        1&lt;BR /&gt;
93200         .         4321      422000     1.04                                     0&lt;BR /&gt;
76125     78172     54297    290000      1.14         G        winter        1&lt;BR /&gt;
    .         61934     16294    237000      1.10         H        spring        1&lt;BR /&gt;
   65376     34458         .    286500   1.43       winter&lt;BR /&gt;
   42400         .     57446         .    .    K    &lt;BR /&gt;
   40800     92606     33406    168000   1.26  S    &lt;BR /&gt;
;&lt;BR /&gt;
run;</description>
    <pubDate>Fri, 15 Oct 2010 09:48:52 GMT</pubDate>
    <dc:creator>newbie123</dc:creator>
    <dc:date>2010-10-15T09:48:52Z</dc:date>
    <item>
      <title>Missing Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17446#M3313</link>
      <description>Very new to this, need to formulate a missing value pattern table in SAS. Let me explain.&lt;BR /&gt;
 &lt;BR /&gt;
&lt;BR /&gt;
data test;&lt;BR /&gt;
input landval improval totval salepric saltoapr city $6. season $8. truefalse;&lt;BR /&gt;
datalines;&lt;BR /&gt;
   30000     64831     94831    118500   1.25  A    spring 	1&lt;BR /&gt;
   30000     50765     80765     93900    .         winter 	0&lt;BR /&gt;
   46651     18573     65224         .   1.16  B       		1&lt;BR /&gt;
   45990     91402         .    184000   1.34  C    winter 	1&lt;BR /&gt;
   42394         .     40575    168000   1.43        		0&lt;BR /&gt;
       .      3351     51102    169000   1.12  D    winter 	0&lt;BR /&gt;
   63596      2182     65778         .   1.26  E    spring 	1&lt;BR /&gt;
   56658     53806     10464    255000   1.21      			0&lt;BR /&gt;
   51428     72451         .         .   1.18  F    spring 	0&lt;BR /&gt;
   93200         .      4321    422000   1.04      			1&lt;BR /&gt;
   76125     78172     54297    290000   1.14  G    winter 	1&lt;BR /&gt;
       .     61934     16294    237000   1.10  H    spring 	0&lt;BR /&gt;
   65376     34458         .    286500   1.43       winter 	1&lt;BR /&gt;
   42400         .     57446         .    .    K     		0&lt;BR /&gt;
   40800     92606     33406    168000   1.26  S     		0&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
 &lt;BR /&gt;
There are missing values in the above table, except for the column truefalse. If i create a missing pattern data like this&lt;BR /&gt;
&lt;BR /&gt;
data miss_pattern (drop=i);&lt;BR /&gt;
  set test;&lt;BR /&gt;
  array mynum(*) _numeric_;&lt;BR /&gt;
  do i=1 to dim(mynum);&lt;BR /&gt;
    if  mynum(i) =. then mynum{i}=1;&lt;BR /&gt;
      else mynum(i)=0;&lt;BR /&gt;
  end;&lt;BR /&gt;
  array mychar(*) $ _character_;&lt;BR /&gt;
  do i=1 to dim(mychar);&lt;BR /&gt;
    if  mychar(i) ="" then mychar{i}=1;&lt;BR /&gt;
      else mychar(i)=0;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
proc freq data=miss_pattern;&lt;BR /&gt;
  tables landval*improval*totval*salepric*saltoapr*city*season /list;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I get the desired output, except i would like to add a column in this table called "number of truefalse = 1"&lt;BR /&gt;
&lt;BR /&gt;
which would tell me how many combinations had the value 1 for that column in the original table. Any minor changes to the code that I can make?</description>
      <pubDate>Fri, 15 Oct 2010 09:30:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17446#M3313</guid>
      <dc:creator>newbie123</dc:creator>
      <dc:date>2010-10-15T09:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17447#M3314</link>
      <description>Perhaps these datalines will work better.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
30000     64831     94831    118500      1.25        A        spring         1&lt;BR /&gt;
30000     50765     80765     93900         .                      winter        0&lt;BR /&gt;
46651     18573     65224         .          1.16         B                         1&lt;BR /&gt;
45990     91402         .        184000     1.34         C         winter        1&lt;BR /&gt;
42394         .         40575    168000     1.43                                     0&lt;BR /&gt;
    .          3351      51102    169000     1.12         D         winter        1&lt;BR /&gt;
63596      2182      65778         .          1.26         E         spring        1&lt;BR /&gt;
56658     53806     10464     255000     1.21                                     0&lt;BR /&gt;
51428     72451         .         .              1.18         F         spring        1&lt;BR /&gt;
93200         .         4321      422000     1.04                                     0&lt;BR /&gt;
76125     78172     54297    290000      1.14         G        winter        1&lt;BR /&gt;
    .         61934     16294    237000      1.10         H        spring        1&lt;BR /&gt;
   65376     34458         .    286500   1.43       winter&lt;BR /&gt;
   42400         .     57446         .    .    K    &lt;BR /&gt;
   40800     92606     33406    168000   1.26  S    &lt;BR /&gt;
;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 15 Oct 2010 09:48:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17447#M3314</guid>
      <dc:creator>newbie123</dc:creator>
      <dc:date>2010-10-15T09:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data Analysis</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17448#M3315</link>
      <description>&amp;gt; I get the desired output, except i would like to add&lt;BR /&gt;
&amp;gt; a column in this table called "number of truefalse =&lt;BR /&gt;
&amp;gt; 1"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; which would tell me how many combinations had the&lt;BR /&gt;
&amp;gt; value 1 for that column in the original table. Any&lt;BR /&gt;
&amp;gt; minor changes to the code that I can make?&lt;BR /&gt;
&lt;BR /&gt;
"Combinations"?? of what? (Do you mean "combinations" in the statistical sense, e.g. how many ways can I choose 5 objects out of 7?)&lt;BR /&gt;
&lt;BR /&gt;
Does truefalse or these "combinations" have anything to do with your missings?</description>
      <pubDate>Fri, 15 Oct 2010 11:58:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data-Analysis/m-p/17448#M3315</guid>
      <dc:creator>Paige</dc:creator>
      <dc:date>2010-10-15T11:58:53Z</dc:date>
    </item>
  </channel>
</rss>

