How to simulate an upper and lower truncated Normal

Reply
Occasional Contributor
Posts: 11

How to simulate an upper and lower truncated Normal

I have found the example for creating right or left truncated normal distribution functions in FCMP but I am not sure how to modfiy to create a right and left truncated normal.  Thanks in advance for your reply.

Respected Advisor
Posts: 2,655

Re: How to simulate an upper and lower truncated Normal

Posted in reply to Jackie418

See 's blog post on the truncated normal: http://blogs.sas.com/content/iml/2013/07/24/the-truncated-normal-in-sas/

It's an IML implementation, rather than FCMP.

Steve Denham

Occasional Contributor
Posts: 11

Re: How to simulate an upper and lower truncated Normal

Posted in reply to SteveDenham

Thanks.  I will take a look. I don't have IML so hopefully I will be able to figure out how to do it using FCMP.

Respected Advisor
Posts: 4,930

Re: How to simulate an upper and lower truncated Normal

Posted in reply to Jackie418

You could also look at section 2.2 of article http://arxiv.org/pdf/0907.4010.pdf which covers two-sided truncation. - PG

PG
Respected Advisor
Posts: 2,655

Re: How to simulate an upper and lower truncated Normal

The acceptance-rejection algorithm in that article looks fairly easy to implement, so it should be do-able in PROC FCMP.  However, Rick's blog post also mentions that the inverse CDF method he presents should be relatively easy to implement in PROC FCMP.

Steve Denham

Ask a Question
Discussion stats
  • 4 replies
  • 254 views
  • 0 likes
  • 3 in conversation