<?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: Fixing Missing Data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456928#M284385</link>
    <description>&lt;P&gt;For each missing "All" value, the male and female values are there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each missing "Female" values, the all and male values are there.&lt;/P&gt;&lt;P&gt;For each missing "Male" value, the all and female values are there.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Apr 2018 15:44:29 GMT</pubDate>
    <dc:creator>Greg95</dc:creator>
    <dc:date>2018-04-24T15:44:29Z</dc:date>
    <item>
      <title>Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456906#M284381</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;The question I have is I am cleaning data for use with a predictive model and one of the tables I am looking at has to do with disease cases. I have gender, disease, year, age group, population as variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem I am running into is : for example I have osteoporosis disease with 20,000 cases for males and 20,000 cases for females. For the "all" gender there is missing value, how can I make this calculation?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456906#M284381</guid>
      <dc:creator>Greg95</dc:creator>
      <dc:date>2018-04-24T15:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456924#M284382</link>
      <description>&lt;P&gt;From the sample you showed, the only time that the All category has missing cases is when there are missing cases for both Females and Males. Is this always the case?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456924#M284382</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2018-04-24T15:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456926#M284383</link>
      <description>&lt;P&gt;Yes, there is only a missing value in all if there is a value for both male and female.&lt;/P&gt;&lt;P&gt;If there is a value missing for females then there is a value for male and all for that age group/disease category.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:38:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456926#M284383</guid>
      <dc:creator>Greg95</dc:creator>
      <dc:date>2018-04-24T15:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456927#M284384</link>
      <description>&lt;P&gt;I think you meant to say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, there is only a missing value in all if there is a &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;missing&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;value for both male and female.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In this case, there is nothing that you can do to fix this. There is no way to calculate the All category without individual cases for either Female or Male.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456927#M284384</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2018-04-24T15:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456928#M284385</link>
      <description>&lt;P&gt;For each missing "All" value, the male and female values are there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For each missing "Female" values, the all and male values are there.&lt;/P&gt;&lt;P&gt;For each missing "Male" value, the all and female values are there.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456928#M284385</guid>
      <dc:creator>Greg95</dc:creator>
      <dc:date>2018-04-24T15:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456929#M284386</link>
      <description>&lt;P&gt;This doesn't seem to be reflected in your sample. Is your data different?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 15:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456929#M284386</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2018-04-24T15:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fixing Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456943#M284387</link>
      <description>&lt;P&gt;I've recreated a small sample of your sample here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data diseases;
   infile datalines dlm=' ' dsd;
   input year age $ gender $ disease :$50. cases pop;
datalines;
1990 0-17 All Asthma 182000 64177000
1990 0-17 All "Dementia and Alzheimer's disease" . 64177000
1990 0-17 Female Asthma 71000 31295000
1990 0-17 Female "Dementia and Alzheimer's disease" 22000 31295000
1990 0-17 Male Asthma 111000 32883000
1990 0-17 Male "Dementia and Alzheimer's disease" . 32883000
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you do have a scenario as you mentioned, the easiest way to validate your data is to transpose it and then check that all = sum of females and males, as below. If it isn't, then make it so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=diseases;
   by year age disease;
run;

proc transpose data=diseases out=diseases_t;
   by year age disease;
   var cases pop;
   id gender;
run;

data diseases_validated;
   set diseases_t;
   valid = (all=sum(female,male));
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>Tue, 24 Apr 2018 16:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fixing-Missing-Data/m-p/456943#M284387</guid>
      <dc:creator>antonbcristina</dc:creator>
      <dc:date>2018-04-24T16:15:33Z</dc:date>
    </item>
  </channel>
</rss>

