<?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: Randome sampling from a lognormal distribution shape in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698670#M88377</link>
    <description>&lt;P&gt;If I understand your interest correctly, I think Simulate ( &lt;A href="https://www.jmp.com/support/help/en/17.1/#page/jmp/simulate.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/17.1/#page/jmp/simulate.shtml#&lt;/A&gt; ) is what you need.&lt;/P&gt;
&lt;P&gt;The idea is so sub-sample from your data and fit Lognormal repeatedly and collect summary statistics. I attach a modified Big Class sample data to illustrate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the script in the data table. It fits Lognormal to "weight" variable, but use "random freq" as Freq.&lt;/P&gt;
&lt;P&gt;Now right click on a statistic of interest, and choose "Simulate":&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1700056256302.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58727i6B2865F959CB4109/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1700056256302.png" alt="peng_liu_0-1700056256302.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the dialog, choose "random freq" on both sides, click Ok:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_1-1700056302819.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58728i897F4B4A9EF0400C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_1-1700056302819.png" alt="peng_liu_1-1700056302819.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And you will get a table like the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_2-1700056368356.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58729i4D8EE9B17D77B4A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_2-1700056368356.png" alt="peng_liu_2-1700056368356.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The last two columns are the summary statistics of individual fits to sub-samples.&lt;/P&gt;
&lt;P&gt;The "random freq" column use "Resample Freq" function:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_3-1700059401364.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58731i282FFB209CD30646/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_3-1700059401364.png" alt="peng_liu_3-1700059401364.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What you need to do is to tweak the threshold in the column formula, so you can get the total of 5/10/20 as you wish.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_4-1700059480327.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58732iCC7BC26FF6C1348B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_4-1700059480327.png" alt="peng_liu_4-1700059480327.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 14:45:30 GMT</pubDate>
    <dc:creator>peng_liu</dc:creator>
    <dc:date>2023-11-15T14:45:30Z</dc:date>
    <item>
      <title>Randome sampling from a lognormal distribution shape</title>
      <link>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698507#M88366</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a distribution lognormal with bellow shape/scale parameter (made by 165 data)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to randome sampling with different sample size (5pcs, 10pcs...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is I expect when running more data it will still follow this distribution shape.&amp;nbsp;&lt;BR /&gt;So I want to simulate what kind of data I will receive when sampling 5/ 10/20 samples in different times.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect each time will show abit different result just cause by sampling eror&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any way I can do it in Jmp&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Justin_Bui_0-1700024289526.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58719i514489686180A6C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Justin_Bui_0-1700024289526.png" alt="Justin_Bui_0-1700024289526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 05:00:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698507#M88366</guid>
      <dc:creator>Justin_Bui</dc:creator>
      <dc:date>2023-11-15T05:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Randome sampling from a lognormal distribution shape</title>
      <link>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698670#M88377</link>
      <description>&lt;P&gt;If I understand your interest correctly, I think Simulate ( &lt;A href="https://www.jmp.com/support/help/en/17.1/#page/jmp/simulate.shtml#" target="_blank"&gt;https://www.jmp.com/support/help/en/17.1/#page/jmp/simulate.shtml#&lt;/A&gt; ) is what you need.&lt;/P&gt;
&lt;P&gt;The idea is so sub-sample from your data and fit Lognormal repeatedly and collect summary statistics. I attach a modified Big Class sample data to illustrate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run the script in the data table. It fits Lognormal to "weight" variable, but use "random freq" as Freq.&lt;/P&gt;
&lt;P&gt;Now right click on a statistic of interest, and choose "Simulate":&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1700056256302.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58727i6B2865F959CB4109/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1700056256302.png" alt="peng_liu_0-1700056256302.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In the dialog, choose "random freq" on both sides, click Ok:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_1-1700056302819.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58728i897F4B4A9EF0400C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_1-1700056302819.png" alt="peng_liu_1-1700056302819.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And you will get a table like the following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_2-1700056368356.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58729i4D8EE9B17D77B4A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_2-1700056368356.png" alt="peng_liu_2-1700056368356.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The last two columns are the summary statistics of individual fits to sub-samples.&lt;/P&gt;
&lt;P&gt;The "random freq" column use "Resample Freq" function:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_3-1700059401364.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58731i282FFB209CD30646/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_3-1700059401364.png" alt="peng_liu_3-1700059401364.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;What you need to do is to tweak the threshold in the column formula, so you can get the total of 5/10/20 as you wish.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_4-1700059480327.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58732iCC7BC26FF6C1348B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_4-1700059480327.png" alt="peng_liu_4-1700059480327.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 14:45:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698670#M88377</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2023-11-15T14:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Randome sampling from a lognormal distribution shape</title>
      <link>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698741#M88383</link>
      <description>&lt;P&gt;This example illustrates how you can use the parameter estimates for the distribution model to simulate new samples of different sizes.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// role of arguments
nRows = 25;
nCols = 1;
μ = 1.038356;
σ = 0.7746626;

sample = J( nRows, nCols, Random Lognormal( μ, σ ) );

dt = New Table( "Sample from LogNormal Population",
	New Column( "Sample", "numeric", "Continuous", Values( sample ) )
);

dt &amp;lt;&amp;lt; Distribution( Y( :Sample ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Nov 2023 15:42:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Randome-sampling-from-a-lognormal-distribution-shape/m-p/698741#M88383</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2023-11-15T15:42:05Z</dc:date>
    </item>
  </channel>
</rss>

