由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - sas simulation big dataset problem
相关主题
如何用DATAFRAME里的数字作为参数去产生随即数做SIMULATIONR LOOP自动退出的问题
请教这个do while 为什么只给出循环最里面的output(ndat=1,id=1, time= 1 to &niobs)请教:如何能加速R codes 运行?
[合集] 怎么合并(merge)很多外部的文件?[合集] simulation in SAS in Clinical trial
菜鸟请教关于赋给macro variables变量值a simulation problem
question about using sas macro variable and do loopR code question
求一个简单点的方法写一段SAS请教一个SIMULATION的问题
请教一道simulation的问题Object oriented programming in SAS
[合集] SAS的问题珍惜生命,远离hsbc。
相关话题的讨论汇总
话题: sas话题: simulation话题: loop话题: macro话题: dataset
进入Statistics版参与讨论
1 (共1页)
b**********i
发帖数: 1059
1
写了个sas simulation,主要用nlmixed procedure。simulated datset 有160万个
record(1000次simulation合一起),10几个variable。昨天test了100次simulation
(也就是16万个record),只花了半个多小时。昨天走前设成1000次sim一早来程序还
在慢慢爬。问问先进是不是因为sas到了瓶颈了。 我的机器Q6600 2G RAM, winxp.
想着改写成个loop 让sas一次simulate一个 dataset 1600 个record,应该会快。不过
还不不清楚sas里怎么实现。 用别的语言的话在一个loop里面run就可以了。
R的话类似
result<-matrix(...).
for (ndat in 1:1000){
...
result[ndat,]<-...} 就可以了
用sas的话 datastep 或者procedure怎么在loop里面实现?是用macro吗,哪位大虾给
个意见?
谢谢
x***x
发帖数: 3401
2
Go to the log and see how much time is spent on CPU. If the CPU time is just
a small fraction of the real time, that means it is not the calculation
itself that's taking the time but the data I/O etc.
You definitely should use loop. Yes, use loop in macro.
b**********i
发帖数: 1059
3
谢谢,还得学习一下macro,不知道怎么写loop。能不能请你给几行code让我看看大概
是咋样。我悟性还不错的。
log file 存到盘上了。等关了sas才能看。
刚刚看了一下specification,晕我把simulation 次数设成10000. 这个实在是。。。。
什么时候sas能用上多核啊?

just

【在 x***x 的大作中提到】
: Go to the log and see how much time is spent on CPU. If the CPU time is just
: a small fraction of the real time, that means it is not the calculation
: itself that's taking the time but the data I/O etc.
: You definitely should use loop. Yes, use loop in macro.

x***x
发帖数: 3401
4
100 for 30 min, so that is 10000 for 3000 mins (50 hrs). No wonder it
takes the whole night.
Just google 'sas macro', pick some short tutorial to get you started.
From what you said, i dont think you even need a macro program. Just some
macro variables to construct a simple loop.

。。

【在 b**********i 的大作中提到】
: 谢谢,还得学习一下macro,不知道怎么写loop。能不能请你给几行code让我看看大概
: 是咋样。我悟性还不错的。
: log file 存到盘上了。等关了sas才能看。
: 刚刚看了一下specification,晕我把simulation 次数设成10000. 这个实在是。。。。
: 什么时候sas能用上多核啊?
:
: just

b**********i
发帖数: 1059
5
谢谢。macro variables 我有用在program里。 如果large dataset size不是个issue
的话,我目前程序是不需要macro。只是想多知道点东东哈哈。

【在 x***x 的大作中提到】
: 100 for 30 min, so that is 10000 for 3000 mins (50 hrs). No wonder it
: takes the whole night.
: Just google 'sas macro', pick some short tutorial to get you started.
: From what you said, i dont think you even need a macro program. Just some
: macro variables to construct a simple loop.
:
: 。。

1 (共1页)
进入Statistics版参与讨论
相关主题
珍惜生命,远离hsbc。question about using sas macro variable and do loop
请问:simulation tool for haplotype with LD求一个简单点的方法写一段SAS
问一个用simulation的问题请教一道simulation的问题
simulation问题请指教[合集] SAS的问题
如何用DATAFRAME里的数字作为参数去产生随即数做SIMULATIONR LOOP自动退出的问题
请教这个do while 为什么只给出循环最里面的output(ndat=1,id=1, time= 1 to &niobs)请教:如何能加速R codes 运行?
[合集] 怎么合并(merge)很多外部的文件?[合集] simulation in SAS in Clinical trial
菜鸟请教关于赋给macro variables变量值a simulation problem
相关话题的讨论汇总
话题: sas话题: simulation话题: loop话题: macro话题: dataset