有没有办法从分布中生成随机数,这样这些数字对于组内的行是常见的?在不平衡的面板中,有一个household_id变量,根据该变量,我想使用rtruncnorm从截断的正态分布中生成随机数。
谢谢。
Household_id Random number 1 0.6 1 0.6 1 0.6 2 0.1 3 0.9 3 0.9 4 0.2 5 0.7 6 0.3 6 0.3So, the household_id is for identifying the household in this unbalanced panel. Now, I want to generate random numbers using rtruncnorm such as shown, they are the same for within household cells.
谢谢