且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在R中生成具有指定对数正态分布的随机数?

更新时间:2023-02-10 12:00:33

rlnorm函数:

rlnorm(20, log(10), log(2.5))

通常,R中的分布通常以d,p,q,r形式提供,这些字母排在最前面,然后是分布词干:normlnormunifgamma,...他们的帮助页面将包含参数的细节,如果使用weibull或其他约定没有完全标准化的发行版,则这是必不可少的.

More generally distributions in R are generally available in d,p,q,r forms with those letters coming first followed by the distribution stem: norm, lnorm, unif, gamma, ... etc. Their help pages will contain the specifics of the parameters, which can be essential if working with weibull or other distribution for which conventions are not completely standardized (as it were).