<?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: imputing the median value into clusters in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/imputing-the-median-value-into-clusters/m-p/964661#M43271</link>
    <description>I don't understand what you are trying to do.&lt;BR /&gt;You want to impute missing value with median or just bring median into original dataset ?&lt;BR /&gt;&lt;BR /&gt;1) if you want to impute missing value with median, try this:&lt;BR /&gt;proc stdize data=have missing=median reponly;&lt;BR /&gt;by cluster;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;2)if you want to bring median value back into orginal dataset, try this:&lt;BR /&gt;&lt;BR /&gt;proc summary data=have;&lt;BR /&gt;by cluster;&lt;BR /&gt;var var;  &lt;BR /&gt;output out=median median=median_var;&lt;BR /&gt;run;&lt;BR /&gt;data want;&lt;BR /&gt;merge have median;&lt;BR /&gt;by cluster;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;3)Last, if you just simply impute missing WITHOUT median ,try PROC MI.&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/12/02/score-external-logistic-model.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/12/02/score-external-logistic-model.html&lt;/A&gt;</description>
    <pubDate>Sat, 19 Apr 2025 02:39:04 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-04-19T02:39:04Z</dc:date>
    <item>
      <title>imputing the median value into clusters</title>
      <link>https://communities.sas.com/t5/New-SAS-User/imputing-the-median-value-into-clusters/m-p/964656#M43270</link>
      <description>&lt;P&gt;I need to impute the median value for each cluster back into the data set. The clustering gives me this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="whyamihere_0-1745014646500.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106356iEAA054D4A271AD82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="whyamihere_0-1745014646500.png" alt="whyamihere_0-1745014646500.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I edited the code and added the following code but obviously got errors. Where should I go from here? What step am I missing?&amp;nbsp; Thanks so much&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc hpimpute data=_chardata_sorted out=supportimputed;
    by cluster;
    input charges=.;
    impute charges / method=pmedian;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Apr 2025 22:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/imputing-the-median-value-into-clusters/m-p/964656#M43270</guid>
      <dc:creator>whyamihere</dc:creator>
      <dc:date>2025-04-18T22:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: imputing the median value into clusters</title>
      <link>https://communities.sas.com/t5/New-SAS-User/imputing-the-median-value-into-clusters/m-p/964661#M43271</link>
      <description>I don't understand what you are trying to do.&lt;BR /&gt;You want to impute missing value with median or just bring median into original dataset ?&lt;BR /&gt;&lt;BR /&gt;1) if you want to impute missing value with median, try this:&lt;BR /&gt;proc stdize data=have missing=median reponly;&lt;BR /&gt;by cluster;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;2)if you want to bring median value back into orginal dataset, try this:&lt;BR /&gt;&lt;BR /&gt;proc summary data=have;&lt;BR /&gt;by cluster;&lt;BR /&gt;var var;  &lt;BR /&gt;output out=median median=median_var;&lt;BR /&gt;run;&lt;BR /&gt;data want;&lt;BR /&gt;merge have median;&lt;BR /&gt;by cluster;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;3)Last, if you just simply impute missing WITHOUT median ,try PROC MI.&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2020/12/02/score-external-logistic-model.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2020/12/02/score-external-logistic-model.html&lt;/A&gt;</description>
      <pubDate>Sat, 19 Apr 2025 02:39:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/imputing-the-median-value-into-clusters/m-p/964661#M43271</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-19T02:39:04Z</dc:date>
    </item>
  </channel>
</rss>

