"Icabalceta, Jorge L." <[EMAIL PROTECTED]> writes: > I was trying to generate random numbers with a gamma distribution. In R the > function is: > rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if > X~gamma(alpha, beta) and I want to generate one random number where do I > plug alpha and beta in rgamma? and, what is the meaning and use of rate?
Well, it depends on your definition of alpha and beta.... You need to match up your notation for the gamma density with that given on help(rgamma), which will also tell you what to do with them. The "rate" argument just allows you to specify the scale as its inverse. A large rate corresponds to a narrow distribution. I suspect this is popular notation for interarrival distributions in queuing theory. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
