蓝色 发表于 2017-6-6 07:31
stata13 那个命令就不对
stata14那个命令就是对的
谢谢老版主
我有看过help,也看过文件,只是的确没有发现他说只适用于14,因为我这里版本是13.1
runiform()
Range: 0 to nearly 1 (0 to 1 − 2−32)
Description: returns uniform random variates.
runiform() returns uniformly distributed random variates on the interval
[ 0, 1). runiform() takes no arguments, but the parentheses must be typed.
runiform() can be seeded with the set seed command; see the technical note at
the end of this subsection. (See Matrix functions for the related matuniform()
matrix function.)
To generate random variates over the interval [ a, b), use
a+(b-a)*runiform().
To generate random integers over [ a, b ], use a+int((b-a+1)*runiform()).
同时我也查看过这个错误代码,里面也没提到版本问题
[P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 198
invalid syntax;
option __________ incorrectly specified;
option __________ not allowed;
__________ invalid;
range invalid;
__________ invalid obs no;
invalid filename;
__________ invalid varname;
__________ invalid name;
multiple by's not allowed;
__________ found where number expected;
on or off required;