0

我使用EnvStats包更具体地说是模拟向量函数从 pdf 生成随机样本。

我尝试使用 Normal pdf 并更改截断此 pdf 的参数:

> vfy <- simulateVector(10, distribution = "norm",
+                param.list = list(mean = 400, sd = 40), seed = 47,
+                sort = FALSE, left.tail.cutoff = 1, right.tail.cutoff = 1)
> vfy
 [1] 479.7879 428.4457 407.4162 388.7294 404.3510 356.5705 360.5807 400.6052 389.9182 341.3700
> vfy <- simulateVector(10, distribution = "norm",
+                param.list = list(mean = 400, sd = 40), seed = 47,
+                sort = FALSE, left.tail.cutoff = 0, right.tail.cutoff = 0)
> vfy
 [1] 479.7879 428.4457 407.4162 388.7294 404.3510 356.5705 360.5807 400.6052 389.9182 341.3700

令我惊讶的是,结果并没有变化……怎么了?谢谢

4

1 回答 1

2

left.tail.cutoff和参数仅在用于拉丁超立方体采样right.tail.cutoff时才相关。sample.method = "LHS"

默认是sample.method = "SRS"简单随机抽样,它使用该rnomr()函数。帮助文件指出“如果 .,则忽略此参数sample.method="SRS"。”

有关?simulateVector()默认参数,请参阅。

于 2014-08-31T23:30:19.670 回答