Random draws from conditional multinomial distribution
显示 更早的评论
I have to simulate data for 100 agents over 10,000 time periods for a variable, x. The initial value of x at time 0 for all agents is 0. The distribution of
is a multinomial distribution, conditional on the past period's value,
. Basically,
can remain unchanged with probability 0.2, increase by 2571 with probability 0.5, increase by 2571*2 with probability 0.2, and increase by 2571*3 with probability 0.1, at any period.
can never be lower than
. How do I generate random values for this distribution?
I have tried:
x = mnrnd()
command, but I can't fit it to these specifications. Any help would be greatly appreciated!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multinomial Distribution 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!