<?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 Imputing Missing Data Using the Mean in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46515#M2033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just googled a few pages regarding proc stdize. It seems like it would work, but how would I tell SAS to use the method above in the "missing=" statement? I don't want it to just standardize them, but to use the mean of the given values, only if less than 75% are missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC STDIZE data=h.ginaimputed REPONLY MISSING= ????????;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Gina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 16:39:49 GMT</pubDate>
    <dc:creator>ginak</dc:creator>
    <dc:date>2012-03-28T16:39:49Z</dc:date>
    <item>
      <title>Imputing Missing Data Using the Mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46513#M2031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to compute some 3 summary scores, and there are N=61 participations, each of which would receive 3 summary scores (IPTFACTOR, DTFACTOR and CBTFACTOR). Each factor is the summary score of 5 or 6 variables. I have defined them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;CBTFACTOR = SUM(PP_05, PP_07, PP_08,&amp;nbsp; PP_11, PP_12, PP_14);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;DTFACTOR = SUM(PP_02, PP_06, PP_10, PP_13, PP_16);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;IPTFACTOR = SUM(PP_01, PP_03, PP_04, PP_09, PP_15);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;Here's a way of wording&amp;nbsp; it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;Example: Looking at CBTFACTOR:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;We &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;should probably impute a score for those items that are missing on the &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;scale (i.e., summary score) for those who completed 75% of the items of the scale (i.e., summary score). If they miss &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;more than that, our imputation may not be very good estimate. So for &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;example, the CBT FACTOR has 6 items. But the person is missing one score. &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;Let's say they scored 3, 3, 3, 4, 5, [missing/no response]. Then their average is 3.6. So &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;they would get a 3.6 for PP_14. So their average score will be 3.6, but &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;their total CBT factor score will be 21.6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Lucida Console', Courier, 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Lucida Console', Courier, 'Courier New';"&gt;So I tried writing this in SAS, for the CBT score:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Lucida Console', Courier, 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF nmiss(PP_05, PP_07, PP_08,&amp;nbsp; PP_11, PP_12, PP_14)&amp;gt;4 then CBTFACTOR=MEAN(PP_05, PP_07, PP_08,&amp;nbsp; PP_11, PP_12, PP_14)*6;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Lucida Console', Courier, 'Courier New';"&gt;But now, I want to tell SAS to make the missing entry, PP_14 (if you see how CBTFACTOR is calculated above, PP_14 is the last entry), 3.6. How do I do this? I just have the above code but not sure what to do with it. I hope I am being clear...&amp;nbsp; But if they have more than 75% of entries missing then we won't impute. Any ideas on how to code this in SAS? I don't think&amp;nbsp; it is supposed to be too&amp;nbsp; difficult, but I'm not sure what&amp;nbsp; to write after the line of code above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Lucida Console', Courier, 'Courier New';"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Lucida Console', Courier, 'Courier New';"&gt;Gina&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 08:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46513#M2031</guid>
      <dc:creator>ginak</dc:creator>
      <dc:date>2012-03-28T08:41:08Z</dc:date>
    </item>
    <item>
      <title>Imputing Missing Data Using the Mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46514#M2032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check &lt;/P&gt;&lt;P&gt;proc stdize&amp;nbsp; reponly missing=&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 09:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46514#M2032</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-03-28T09:02:47Z</dc:date>
    </item>
    <item>
      <title>Imputing Missing Data Using the Mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46515#M2033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just googled a few pages regarding proc stdize. It seems like it would work, but how would I tell SAS to use the method above in the "missing=" statement? I don't want it to just standardize them, but to use the mean of the given values, only if less than 75% are missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC STDIZE data=h.ginaimputed REPONLY MISSING= ????????;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Gina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 16:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46515#M2033</guid>
      <dc:creator>ginak</dc:creator>
      <dc:date>2012-03-28T16:39:49Z</dc:date>
    </item>
    <item>
      <title>Imputing Missing Data Using the Mean</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46516#M2034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can't you get what you want with a fairly simple datastep?&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input PP_01-PP_16;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16&lt;/P&gt;&lt;P&gt;16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1&lt;/P&gt;&lt;P&gt;1 2 3 4 5 6 . 8 9 10 11 . 13 14 15 16&lt;/P&gt;&lt;P&gt;1 2 3 4 3 6 3 3 9 10 4 5 13 . 15 16&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array cbt pp_05 pp_07 pp_08 pp_11 pp_12 pp_14;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array dft pp_02 pp_06 pp_10 pp_13 pp_16;&lt;/P&gt;&lt;P&gt;&amp;nbsp; array ipt pp_01 pp_03 pp_04 pp_09 pp_15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CBTmean=mean(of cbt(*));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if nmiss(of cbt(*)) le 2 then do over cbt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(cbt) then cbt=CBTmean;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DFTmean=mean(of dft(*));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if nmiss(of dft(*)) le 1 then do over dft;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(dft) then dft=DFTmean;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IPTmean=mean(of ipt(*));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if nmiss(of ipt(*)) le 1 then do over ipt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if missing(ipt) then ipt=IPTmean;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CBTFACTOR = SUM(PP_05, PP_07, PP_08,&amp;nbsp; PP_11, PP_12, PP_14);&lt;/P&gt;&lt;P&gt;&amp;nbsp; DTFACTOR = SUM(PP_02, PP_06, PP_10, PP_13, PP_16);&lt;/P&gt;&lt;P&gt;&amp;nbsp; IPTFACTOR = SUM(PP_01, PP_03, PP_04, PP_09, PP_15);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 17:56:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Imputing-Missing-Data-Using-the-Mean/m-p/46516#M2034</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-03-28T17:56:06Z</dc:date>
    </item>
  </channel>
</rss>

