<?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 Output Parameters for Lognormal Distribution in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747642#M36382</link>
    <description>&lt;P&gt;I have a lognormal distribution and need to calculate an arithmetic mean and standard deviation. I can get these using the code below. The problem is that I need to also calculate confidence intervals using mean and stdev and I need to output these values to a dataset so I can do the calculation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=have;&lt;/P&gt;&lt;P&gt;var x;&lt;/P&gt;&lt;P&gt;histogram x/dist=lognormal;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I output this?: Bonus points if you can figure out how I can get confidence intervals for the mean and stdev below. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kec02171_0-1623615218140.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60313iD22B94BBF4CA32F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kec02171_0-1623615218140.png" alt="kec02171_0-1623615218140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Jun 2021 20:14:55 GMT</pubDate>
    <dc:creator>kec02171</dc:creator>
    <dc:date>2021-06-13T20:14:55Z</dc:date>
    <item>
      <title>Output Parameters for Lognormal Distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747642#M36382</link>
      <description>&lt;P&gt;I have a lognormal distribution and need to calculate an arithmetic mean and standard deviation. I can get these using the code below. The problem is that I need to also calculate confidence intervals using mean and stdev and I need to output these values to a dataset so I can do the calculation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc univariate data=have;&lt;/P&gt;&lt;P&gt;var x;&lt;/P&gt;&lt;P&gt;histogram x/dist=lognormal;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I output this?: Bonus points if you can figure out how I can get confidence intervals for the mean and stdev below. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kec02171_0-1623615218140.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60313iD22B94BBF4CA32F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kec02171_0-1623615218140.png" alt="kec02171_0-1623615218140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 20:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747642#M36382</guid>
      <dc:creator>kec02171</dc:creator>
      <dc:date>2021-06-13T20:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: Output Parameters for Lognormal Distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747655#M36383</link>
      <description>&lt;P&gt;To output the values to a SAS data set, you can use ODS OUTPUT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=have;
    ods output moments=moments;
    var x;
    histogram x/dist=lognormal;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't know of a way to compute the confidence intervals.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Jun 2021 21:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747655#M36383</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-13T21:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Output Parameters for Lognormal Distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747736#M36384</link>
      <description>&lt;P&gt;Once you get parameter of lognormal distribution, you can use QUANTITLE() function to get CI .&lt;/P&gt;
&lt;P&gt;Or try Bootstrap method.&lt;/P&gt;
&lt;P&gt;Or Calling&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 10:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747736#M36384</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-06-14T10:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Output Parameters for Lognormal Distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747740#M36385</link>
      <description>&lt;P&gt;By definition, if X ~ Lognormal(mu, sigma), then Y=log(X) is distributed as N(mu, sigma).&amp;nbsp; So, compute Y, find the confidence interval for the mean, and then apply the EXP transform to map it back to the lognormal scale:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
call streaminit(123);
do i = 1 to 1000;
   x = rand("Lognormal", 0.5, 1.3);
   output;
end;
run;

data Normal;
set Have;
logX = log(x);    /* logX ~ N(mu, sigma) */
run;

proc means data= Normal LCLM Mean UCLM;
var logX;
output out=MeansOut LCLM=lower UCLM=upper;
run;

data Want;
set MeansOut;
LCLM_LN = exp(lower);  /* transform the CI */
UCLM_LN = exp(upper);
run;

proc print data=Want; run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Jun 2021 11:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747740#M36385</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-06-14T11:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Output Parameters for Lognormal Distribution</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747950#M36391</link>
      <description>&lt;P&gt;Thanks all! This got me what I needed! To output the last table I used ods output parameterestimates=parest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 20:10:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Output-Parameters-for-Lognormal-Distribution/m-p/747950#M36391</guid>
      <dc:creator>kec02171</dc:creator>
      <dc:date>2021-06-14T20:10:00Z</dc:date>
    </item>
  </channel>
</rss>

