<?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: Normal Weight distribution problem in simulated dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170551#M301388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the problem lies in assuming that the data has a normal distribution.&amp;nbsp; We know, a priori, that there is a cutoff on the low end at zero, so the real underlying data is skewed, and most likely follows a log normal distribution or something similar.&amp;nbsp; When you plug in values from historical controls with a specified mean and standard deviation, you have to expect that you could get negative values (and here I am not at all surprised, as the mean for female weight is only about 2.5 standard deviations above zero, and for males about 3 standard deviations above zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see two choices.&amp;nbsp; You have already coded the first--you live with the skew generated by truncating.&amp;nbsp; The other involves simulating a log normal distribution with specified parameters, which is a bit more difficult than a single function call.&amp;nbsp; See Rick Wicklin's &lt;EM&gt;Simulating Data with SAS&lt;/EM&gt;, page 111 for an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lnweight_m=rand('NORMAL', 5.24597, 4.0792);&lt;/P&gt;&lt;P&gt;weight_lbs_m=round(exp(lnweight_m),1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the parameters passed to the rand function are the natural logs of the values you currently use.&amp;nbsp; This might be more useful.&amp;nbsp; But be warned, the resulting data will be skewed.&amp;nbsp; No getting around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 19:41:43 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2013-12-11T19:41:43Z</dc:date>
    <item>
      <title>Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170550#M301387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Created a simulated dataset however when I look at the distribution for weight, it includes negative values. If I put a Min value - then it skews the distribution. Any ideas on what to change in the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*'if age ge 20 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gender="M" then weight_lbs=round(rand('NORMAL',189.8,59.1),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if gender="F" then weight_lbs=round(rand('NORMAL',162.9,65.6),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gender="M" then height_inches=round(rand('NORMAL',69.2,6.6),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if gender="F" then height_inches=round(rand('NORMAL',63.8,6.6),1);&lt;/P&gt;&lt;P&gt; end;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a minimum, it skews the distribution. See below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if age ge 20 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gender="M" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight_lbs=max(100,round(rand('NORMAL',189.8+5*(height_inches-69.2),59.1),1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if gender="F" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight_lbs=max(90,round(rand('NORMAL',162.9+5*(height_inches-63.8),65.6),1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 18:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170550#M301387</guid>
      <dc:creator>slivingston</dc:creator>
      <dc:date>2013-12-11T18:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170551#M301388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the problem lies in assuming that the data has a normal distribution.&amp;nbsp; We know, a priori, that there is a cutoff on the low end at zero, so the real underlying data is skewed, and most likely follows a log normal distribution or something similar.&amp;nbsp; When you plug in values from historical controls with a specified mean and standard deviation, you have to expect that you could get negative values (and here I am not at all surprised, as the mean for female weight is only about 2.5 standard deviations above zero, and for males about 3 standard deviations above zero).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see two choices.&amp;nbsp; You have already coded the first--you live with the skew generated by truncating.&amp;nbsp; The other involves simulating a log normal distribution with specified parameters, which is a bit more difficult than a single function call.&amp;nbsp; See Rick Wicklin's &lt;EM&gt;Simulating Data with SAS&lt;/EM&gt;, page 111 for an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lnweight_m=rand('NORMAL', 5.24597, 4.0792);&lt;/P&gt;&lt;P&gt;weight_lbs_m=round(exp(lnweight_m),1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the parameters passed to the rand function are the natural logs of the values you currently use.&amp;nbsp; This might be more useful.&amp;nbsp; But be warned, the resulting data will be skewed.&amp;nbsp; No getting around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 19:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170551#M301388</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-11T19:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170552#M301389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're also likely to have an issue with simulated data containing people that are too tall, or at least more in the over 7 feet range than you expect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 20:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170552#M301389</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-12-11T20:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170553#M301390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As others have said, the real issue is "waht is the model."&amp;nbsp; Once you decide on a model, then the simulation simuates from that model.&amp;nbsp; If you get nonsensical data, you have to revise the model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want data that looks normally distributed but is truncated outside of some interval [a,b], you can use the truncated normal distribution: &lt;A href="http://blogs.sas.com/content/iml/2013/07/24/the-truncated-normal-in-sas/" title="http://blogs.sas.com/content/iml/2013/07/24/the-truncated-normal-in-sas/"&gt; Implement the truncated normal distribution in SAS - The DO Loop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 19:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170553#M301390</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-12-13T19:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170554#M301391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rick, I reviewed your documentation and still have some confusion. I have pasted my codeing below. I am trying to create a model that is based off of literature regarding the US population's mean on height and weight. However, still after my codeing, my distribution on the weight, is one sided. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname save "libname location here";&lt;/P&gt;&lt;P&gt;%let numsims=10000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sim1;&lt;/P&gt;&lt;P&gt;input x;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sim1;&lt;/P&gt;&lt;P&gt;set sim1;&lt;/P&gt;&lt;P&gt;do i=1 to &amp;amp;numsims; *change this to desired number of simulations (e.g. 10,000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;drop x;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sim1;&lt;/P&gt;&lt;P&gt;set sim1;&lt;/P&gt;&lt;P&gt;id=i;&lt;/P&gt;&lt;P&gt;race_ethnicity_rand=rand('UNIFORM');&lt;/P&gt;&lt;P&gt;if race_ethnicity_rand le 0.8 then race_ethnicity="A";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if race_ethnicity_rand le 5.3 then race_ethnicity="B";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if race_ethnicity_rand le 17.6 then race_ethnicity="C";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if race_ethnicity_rand le 82.7 then race_ethnicity="D";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if race_ethnicity_rand le 98.5 then race_ethnicity="E";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else race_ethnicity="X";&lt;/P&gt;&lt;P&gt;systolic_rand=rand('UNIFORM');&lt;/P&gt;&lt;P&gt; if systolic_rand le .286 then systolic=round(140+39*rand('UNIFORM'));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else systolic=round(90+39*rand('UNIFORM'));&lt;/P&gt;&lt;P&gt;gender_rand=rand('BERNOULLI',0.5);&lt;/P&gt;&lt;P&gt;if gender_rand=0 then gender="M";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else gender="F"; **need to check the gender distribution;&lt;/P&gt;&lt;P&gt;age10_rand=rand('UNIFORM'); **check distribution of age ranges below;&lt;/P&gt;&lt;P&gt;if age10_rand le .05 then age10=0; *5%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .15 then age10=1; *10%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .35 then age10=2; *20%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .55 then age10=3; *20%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .74 then age10=4; *19%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .84 then age10=5; *10%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .93 then age10=6; *9%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if age10_rand le .97 then age10=7; *4%;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else age10=8; *3%;&lt;/P&gt;&lt;P&gt;age=10*age10 + floor(10*rand('UNIFORM'));&lt;/P&gt;&lt;P&gt; if age ge 20 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *if gender="M" then weight_lbs=round(rand('NORMAL',189.8,59.1),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *else if gender="F" then weight_lbs=round(rand('NORMAL',162.9,65.6),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gender="M" then height_inches=round(rand('NORMAL',69.2,6.6),1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if gender="F" then height_inches=round(rand('NORMAL',63.8,6.6),1);&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if age ge 20 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if gender="M" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight_lbs=max(100,round(rand('NORMAL',189.8+5*(height_inches-69.2),59.1),1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if gender="F" then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weight_lbs=max(90,round(rand('NORMAL',162.9+5*(height_inches-63.8),65.6),1));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data=sim1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 19:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170554#M301391</guid>
      <dc:creator>slivingston</dc:creator>
      <dc:date>2013-12-17T19:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170555#M301392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is because the true distribution is "one-sided."&amp;nbsp; Weight and height are not normally distributed, so assuming that they are.&amp;nbsp; There are biological reasons for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, check your coding for generation of the race/ethnicity variable.&amp;nbsp; Rand('Uniform") should return a value between 0 and 1, so you may want to replace the code with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;race_ethnicity_rand=100*rand('UNIFORM');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, at some point, you will probably want to install some sort of seed control, or else you will get different values every time you run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 20:11:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170555#M301392</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-17T20:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170556#M301393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if its not "normal," how would you code for height/weight. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be the seed of my confusion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 20:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170556#M301393</guid>
      <dc:creator>slivingston</dc:creator>
      <dc:date>2013-12-17T20:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170557#M301394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I had a large enough data set of actual values I'd be very tempted to select from that using Proc Surveyselect. Check the CDC website for NHIS or BRFSS datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 21:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170557#M301394</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-12-17T21:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Normal Weight distribution problem in simulated dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170558#M301395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would code these as lognormally distributed, with the parameters being the natural logs of the mean and standard deviation.&amp;nbsp; As I said above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lnweight_m=rand('NORMAL', 5.24597, 4.0792);&lt;/P&gt;&lt;P&gt;weight_lbs_m=round(exp(lnweight_m),1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the parameters passed to the rand function are the natural logs of the values you currently use.&amp;nbsp; This might be more useful.&amp;nbsp; But be warned, the resulting data will be skewed.&amp;nbsp; No getting around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I mean, there is no getting around the fact that the real data are not normally distributed.&amp;nbsp; If it were, there would be a nonzero probability of people with negative heights or weights.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 18:21:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Normal-Weight-distribution-problem-in-simulated-dataset/m-p/170558#M301395</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2013-12-18T18:21:11Z</dc:date>
    </item>
  </channel>
</rss>

