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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 634 views
  • 0 likes
  • 3 in conversation