简体   繁体   English

R中的修正指数分布

[英]Modified exponential distribution in R

I would like to make my own probability density function in R to simulate some things from a paper. 我想在R中创建自己的概率密度函数,以模拟论文中的某些内容。

It is somehow similar to exponential distribution but what i really want to do is to redefine the exponential distribution into a "modified" one... 它在某种程度上类似于指数分布,但我真正想做的是将指数分布重新定义为“修改的”分布。

Is there such a way to do this? 有这种方法吗? Thanks. 谢谢。


I want to simulate this: 我想模拟一下:

b(x) = {(µ/p)(e ^ (-(µx-q)/p) , x > q(xbar) and 0 otherwise } b(x)= {(µ / p)(e ^(-(µx-q)/ p),x> q(xbar),否则为0}

xbar is an x with a line above it, mean, average xbar是一个x,上面有一条线,表示平均值

您是否知道从下面截断的指数分布仍然是指数分布?

I believe you can do what you want with ?sample . 我相信您可以使用?sample来做您想做的事情。 Use your known distribution function b(x) to generate a vector of probabilities, say bprob , then 使用已知的分布函数b(x)生成概率向量,例如bprob ,然后

sample(x,size, replace=TRUE,prob=bprob)

There are some very interesting methods for generating samples from arbitrary distributions. 有一些非常有趣的方法可以从任意分布中生成样本。 See for example, Normal RandomNumbers:UsingMachine AnalysisTo Choosethe BestAlgorithm WH PAYNE WashlngtonState University (somewhere on the web), or Numerical Recipes in C The Art of Scientific Computing Second Edition William H. Press,Saul A. Teukolsky et al, chapter 7.3 参见,例如,正常随机数:使用机器分析选择最佳算法WH PAYNE华盛顿州立大学(网上某处),或C中的数字食谱《科学计算的艺术》第二版William H. Press,Saul A. Teukolsky等,第7.3章

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM