楼主: cherrystrawbery
2227 10

[原创博文] 求助编程问题 [推广有奖]

  • 1关注
  • 2粉丝

大专生

83%

还不是VIP/贵宾

-

威望
0 级
论坛币
4 个
通用积分
0.1020
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
843 点
帖子
61
精华
0
在线时间
47 小时
注册时间
2010-5-31
最后登录
2020-6-29

楼主
cherrystrawbery 发表于 2012-2-29 13:18:46 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
如下编程,fund000001中有100个数据,对其做了1000次bootstrap。因为是时间数据,希望做block bootstrap。请教高手,将100个数据分成10组,对这10组做bootstrap,应该怎样修改程序?

data bootsamp000001;
do sampnum=1 to 1000;
do i=1 to nobs;
x=round(ranuni(0)*nobs);
set fund000001
nobs=nobs
point=x;
output;
end;
end;
stop;
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Bootstrap Bootstra ranuni output boots 程序

沙发
aibieli731001 发表于 2012-2-29 13:21:59
这个俺不懂,顶起吧。

藤椅
zhangzachary 发表于 2012-2-29 13:25:01
都已经会在do loop里嵌套set 并且使用nobs 和point 这些set options了,那么对数据分组的操作步骤应该没有任何困难的……
寒冰凤凰 My blog: http://blog.sina.com.cn/u/1058955485

板凳
cherrystrawbery 发表于 2012-2-29 14:44:28
zhangzachary 发表于 2012-2-29 13:25
都已经会在do loop里嵌套set 并且使用nobs 和point 这些set options了,那么对数据分组的操作步骤应该没有任 ...
木有哇,这个是看大牛文章学习的,用在自己的程序里。修改就不会了。其实是SAS小白一个。

报纸
cherrystrawbery 发表于 2012-3-1 15:47:51
自己顶,求高手指教。

地板
jingju11 发表于 2012-3-1 23:16:19
  1. proc surveyselect data=fund000001 method=urs n=10 reps=1000 seed=40070 out=bootSample000001 outhits noprint;
  2.    cluster group;
  3. run;
复制代码
Assume variable GROUP to separate different time series groups. CLUSTER statement is a newer statement in SAS.
JingJu

7楼
cherrystrawbery 发表于 2012-3-2 10:24:34
jingju11 发表于 2012-3-1 23:16
Assume variable GROUP to separate different time series groups. CLUSTER statement is a newer stateme ...
thank you for your answer. However, when I copy your code in SAS, run it, the word cluster always turn out to be red. The result show ineffective code in the procedure. What's the matter?

8楼
jingju11 发表于 2012-3-2 10:28:25
your sas version is too old, i think.
older than sas 9.2?

9楼
cherrystrawbery 发表于 2012-3-2 10:51:45
jingju11 发表于 2012-3-2 10:28
your sas version is too old, i think.
older than sas 9.2?
Actually mine is SAS9.2.

10楼
jingju11 发表于 2012-3-2 11:00:03
from sas note:
...Beginning with SAS/STAT 9.22 in SAS 9.2 TS2M3,...the SAMPLINGUNIT or CLUSTER statement to...sample(ing) units as groups of observations (clusters).

jingju

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-11-20 14:33