Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个来自 Weibull 分布的 365 个形状参数的向量和一个 365 个比例参数的向量。
如何从 R 中的相应参数模拟 365 个值?
我的问题的背景是:我的日平均风速遵循独特参数的 Weibull 分布。现在,我需要根据数据模拟每日风速。
使用该rweibull功能。顺便说一句,每个参数对只需要一个模拟值吗?
rweibull
无论如何,这应该是为了nobs观察次数。您也可以选择 n=1。
nobs
simulations <- mapply(rweibull, shapes, scales, MoreArgs=list(n=nobs))
其中shapes是包含形状参数scales的向量,同样是包含比例参数值的向量。
shapes
scales