turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to incorporate shape, scale and location param...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-17-2016 04:49 PM

Hello All,

I am starting to do more simulations and have a general question regarding simulating a lognormal distribution. I have existing data that looks like the following (I've fitted a lognormal curve to the data). I would like to simulate more data using the MLE estimated shape, scale and location parameters for the exisiting data. I noticed the RAND function does not support location, shape or scale for the lognormal distribution. How can I incorporate these parameters so that I can simulate data to look like my original data? I thought I could do Y = location parameter + scale parameter*X, where X =RAND("LOGNORMAL"). Am I on the right track here? Any help appreciated!!!

Accepted Solutions

Solution

05-18-2016
08:40 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jonesk48

05-17-2016 09:08 PM

Chapter 7 of Wicklin (2013) *Simulating Data with SAS *has a section on "Adding Location and Scale Parameters" (p. 107-109).

For the lognormal function it says:

The RAND("Normal", mu, sigma) function generates X ~ N(mu, sigma). The random variable Y = exp(X) is

lognormally distributed with parameters mu and sigma..... Notice that the location and scale parameters are added before the

exponential transformation is applied.

You can add a threshold parameter by generating theta+Y.

For an example in teh DATA step, see "Simulate lognormal data with specified mean and variance."

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jonesk48

05-17-2016 04:55 PM

Just for clarity, the embedded picture is from my acutal data. I would like to simulate more data that looks like this.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jonesk48

05-17-2016 05:13 PM

Look at the PDF('LOGNORMAL') function

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to ballardw

05-17-2016 05:19 PM

Yes I will, thank you! I didn't think about using the pdf function.

Solution

05-18-2016
08:40 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jonesk48

05-17-2016 09:08 PM

Chapter 7 of Wicklin (2013) *Simulating Data with SAS *has a section on "Adding Location and Scale Parameters" (p. 107-109).

For the lognormal function it says:

The RAND("Normal", mu, sigma) function generates X ~ N(mu, sigma). The random variable Y = exp(X) is

lognormally distributed with parameters mu and sigma..... Notice that the location and scale parameters are added before the

exponential transformation is applied.

You can add a threshold parameter by generating theta+Y.

For an example in teh DATA step, see "Simulate lognormal data with specified mean and variance."

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

05-18-2016 08:42 AM

Hi Rick,

Thank you for the feedback! I understand now, and the link you provided with the example helps greatly.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to jonesk48

05-17-2016 09:13 PM

Rick's blog might give you some help.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

05-18-2016 08:43 AM

Thank you! This link is very helpful, Rick also referred to the same content on his blog. I appreciate your feedback!