请选择 进入手机版 | 继续访问电脑版
楼主: priis
2240 3

SAS怎么用loop生成随机数?? [推广有奖]

  • 0关注
  • 0粉丝

高中生

5%

还不是VIP/贵宾

-

威望
0
论坛币
39 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
216 点
帖子
6
精华
0
在线时间
29 小时
注册时间
2014-11-14
最后登录
2019-11-15

priis 发表于 2015-11-8 04:08:09 |显示全部楼层 |坛友微信交流群
30论坛币
如题,
Finding the sampling distribution of a Poisson distribution. Using do-loops, generate 20 samples of size n= 15 from a Poisson Distribution (ranpoi) with a mean of 3.  Use the computer clock as the seed number. Find the mean of each of your samples. (You don't have to show me this values)

用do-loops生成20组随机数,每组15个数字,并且符合柏松分布,mean=3
另外seed用电脑的时间
试了半天不知道怎么分组?
望大神解答。。。

最佳答案

sas那个石家庄人 查看完整内容

data samples; seed1=date(); do sample = 1 to 20; do i=1 to 15; call ranpoi(seed1, 3, number); output; end; end; drop i seed1; run;
关键词:生成随机数 loop 随机数 distribution Sampling computer generate number values 电脑
data samples;
seed1=date();
do sample = 1 to 20;
do i=1 to 15;
call ranpoi(seed1, 3, number);
output;
end;
end;
drop i seed1;
run;
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
teqel + 2 + 2 + 2 精彩帖子

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

使用道具

teqel 发表于 2015-11-10 03:32:53 |显示全部楼层 |坛友微信交流群
sas那个石家庄人 发表于 2015-11-10 01:43
data samples;
seed1=date();
do sample = 1 to 20;
正解。就是把date()改成time()

使用道具

jingju11 发表于 2015-11-21 09:58:09 |显示全部楼层 |坛友微信交流群
computer clock as the seed number == seed(0). Jingju

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-29 10:06