<?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 data transformation for normal distribution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897877#M354881</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;How to transform data through the log transformation to ensure a normal distribution for the somatic cells count variable, please?&lt;/P&gt;
&lt;P&gt;is there any test to test the normality of the data before?&lt;/P&gt;
&lt;P&gt;Finally, is there a procedure or other way to do the log transformation?&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2023 21:31:16 GMT</pubDate>
    <dc:creator>always-good</dc:creator>
    <dc:date>2023-10-09T21:31:16Z</dc:date>
    <item>
      <title>data transformation for normal distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897877#M354881</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;How to transform data through the log transformation to ensure a normal distribution for the somatic cells count variable, please?&lt;/P&gt;
&lt;P&gt;is there any test to test the normality of the data before?&lt;/P&gt;
&lt;P&gt;Finally, is there a procedure or other way to do the log transformation?&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 21:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897877#M354881</guid>
      <dc:creator>always-good</dc:creator>
      <dc:date>2023-10-09T21:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: data transformation for normal distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897889#M354884</link>
      <description>&lt;P&gt;To transform a variable to its logarithmic form, you just need to apply "log()" function, this function returns the natural (base e) logarithm. You can also use "log2()" (base 2) and "log10()" (base 10).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  x=10;
  y1=log(x);
  y2=log2(x);
  y3=log10(x);
  put y1=/ y2=/ y3=;
run;

y1=2.302585093
y2=3.3219280949
y3=1&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To test the normality of data, you can use "proc univariate" with a "normal" option.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=sashelp.class normal qqplot;
  var height;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The result window will show you test result like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 349px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88731iC71D90C3E7F4622B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also use qqplot statement in this procedure, to get a Q-Q plot of analysis variable.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 02:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897889#M354884</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2023-10-10T02:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: data transformation for normal distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897939#M354910</link>
      <description>For single variable to test the normality try NORMATEST option:&lt;BR /&gt;&lt;BR /&gt;proc univariate data=sashelp.heart normaltest;&lt;BR /&gt;var weight;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;For multiple variables to test normality try &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; 's blog:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2012/03/02/testing-data-for-multivariate-normality.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2012/03/02/testing-data-for-multivariate-normality.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;For transforming data to conform normal distribution ,try Box-Cox transformation:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/08/22/box-cox-transform.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/08/22/box-cox-transform.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/08/17/box-cox-regression.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/08/17/box-cox-regression.html&lt;/A&gt;</description>
      <pubDate>Tue, 10 Oct 2023 11:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-transformation-for-normal-distribution/m-p/897939#M354910</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-10-10T11:23:43Z</dc:date>
    </item>
  </channel>
</rss>

