BookmarkSubscribeRSS Feed
Idjaz12
Calcite | Level 5

Suppose you are tasked with simulating a process where the inter-arrival times are not exponentially distributed, but Gamma(2, λ) under the fixed-count scheme, say 25 events, subject to the constraint that you must use the integral transform method of the Gamma distribution.

Im working using R.

The code below is what i used for an exponential distribution:
1 R> n = 25
2 R> lambda = 10
3 R> u = runif(n,0,1)
4 R> t = -1/lambda*log(1-u)

How would you modify it for a gamma distribution simulation.

Thanks

2 REPLIES 2
ed_sas_member
Meteorite | Level 14

Hi @Idjaz12 

 

Welcome to the SAS community users!

As this forum is exclusively dedicated to SAS matters, I am afraid your question is not at the right place here. I believe there are dedicated forums for R users, where you will find answers to your questions.

 

All the best,

Ksharp
Super User
It looks like you need CDF() . calling @Rick_SAS

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 966 views
  • 0 likes
  • 3 in conversation