<?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: How to get a winsorized mean as a function of time-SAS Univariate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/481401#M124520</link>
    <description>&lt;P&gt;This code solved my problem&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jul 2018 09:58:12 GMT</pubDate>
    <dc:creator>jacksonan123</dc:creator>
    <dc:date>2018-07-26T09:58:12Z</dc:date>
    <item>
      <title>How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479909#M123942</link>
      <description>&lt;P&gt;I have the following data with the listed variables for time 1hr.&amp;nbsp; There are similar data sets for times 2,3,4,6,7,8,12,and 24 hrs.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; ID AMT Time CMT Y&lt;BR /&gt;15 1 0 1 3 0.40953 .&lt;BR /&gt;16 2 0 1 3 0.2531 .&lt;BR /&gt;17 3 0 1 3 30.549 .&lt;BR /&gt;18 4 0 1 3 2.2213 .&lt;BR /&gt;19 5 0 1 3 1.829 .&lt;BR /&gt;20 6 0 1 3 8.8514 .&lt;BR /&gt;21 7 0 1 3 29.094 .&lt;BR /&gt;22 8 0 1 3 4.2443 .&lt;BR /&gt;23 9 0 1 3 0.68437 .&lt;BR /&gt;24 10 0 1 3 3.3793 .&lt;BR /&gt;25 11 0 1 3 2.8721 .&lt;BR /&gt;26 12 0 1 3 0.7927 .&lt;BR /&gt;27 13 0 1 3 7.477 .&lt;BR /&gt;28 14 0 1 3 0.98951 .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have done a box plot and ID's 7 and 3 are outliers.&amp;nbsp; My question is there code that I can use with&amp;nbsp; SAS univariate that will allow me to obtain the Winsorized mean variable Y for each collection time period?&amp;nbsp; I&amp;nbsp; have searched but could not find code modification to do so.&amp;nbsp; I realize this could be done by brute force by analyzing each time separately.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479909#M123942</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2018-07-20T15:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479910#M123943</link>
      <description>&lt;P&gt;So you have separate data sets for each time? Then combine the datasets into one, and perform PROC UNIVARIATE with a BY statement.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:23:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479910#M123943</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-20T15:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479912#M123944</link>
      <description>This is my code but it says that it can't find Y but I did a proc contents&lt;BR /&gt;and Y was the variable name (see below).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Alphabetic List of Variables and Attributes&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;Variable&lt;BR /&gt;&lt;BR /&gt;Type&lt;BR /&gt;&lt;BR /&gt;Len&lt;BR /&gt;&lt;BR /&gt;Format&lt;BR /&gt;&lt;BR /&gt;Label&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2&lt;BR /&gt;&lt;BR /&gt;AMT&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;BEST12.&lt;BR /&gt;&lt;BR /&gt;AMT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;4&lt;BR /&gt;&lt;BR /&gt;CMT&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;BEST12.&lt;BR /&gt;&lt;BR /&gt;CMT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;1&lt;BR /&gt;&lt;BR /&gt;ID&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;BEST12.&lt;BR /&gt;&lt;BR /&gt;ID&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;6&lt;BR /&gt;&lt;BR /&gt;NAMT&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;3&lt;BR /&gt;&lt;BR /&gt;TIME&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;BEST12.&lt;BR /&gt;&lt;BR /&gt;TIME&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;5&lt;BR /&gt;&lt;BR /&gt;Y&lt;BR /&gt;&lt;BR /&gt;Num&lt;BR /&gt;&lt;BR /&gt;8&lt;BR /&gt;&lt;BR /&gt;BEST12.&lt;BR /&gt;&lt;BR /&gt;Y&lt;BR /&gt;&lt;BR /&gt;This is my code:&lt;BR /&gt;&lt;BR /&gt;ods exclude all;&lt;BR /&gt;&lt;BR /&gt;proc univariate data=NORM2A winsorized=0.1;&lt;BR /&gt;&lt;BR /&gt;ods output WinsorizedMeans=winMeans;&lt;BR /&gt;&lt;BR /&gt;Var y;&lt;BR /&gt;&lt;BR /&gt;by time;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;ods exclude none;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479912#M123944</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2018-07-20T15:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479929#M123951</link>
      <description>&lt;P&gt;1. Combine them into one data set and identify the source data set as the time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data combined;
set time.time_hour: indsname=source; *assuming you have a naming convention;

dsin=source;
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2. Calculate summary statistics&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=combined winsorized=5;
class dsin;
var y;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 15:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479929#M123951</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-20T15:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479930#M123952</link>
      <description>&lt;P&gt;Copy the code submitted and the messages from the log and paste that into a code box opened using the forum {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You do know that exclude all means no output is generated with the example code so your Winmeans data set will not be created.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 16:02:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/479930#M123952</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-20T16:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a winsorized mean as a function of time-SAS Univariate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/481401#M124520</link>
      <description>&lt;P&gt;This code solved my problem&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-winsorized-mean-as-a-function-of-time-SAS/m-p/481401#M124520</guid>
      <dc:creator>jacksonan123</dc:creator>
      <dc:date>2018-07-26T09:58:12Z</dc:date>
    </item>
  </channel>
</rss>

