a***d 发帖数: 336 | 1 需要在proc IML里用一个 1 到3000000的do loop。
每个loop里要给一个15000000*1的vector的几个element赋值。
跑一次要挺长时间。问题是这个loop是用来算loglikelihood的,
要被下面optimize的routine 反复的call。请教大家怎么能让
这个do loop快一些。
在R里有sapply之类可以替代for loop,算起来快无数倍,sas里有
sapply这样的function么?
code如下:
proc IML;
/* write the log-likelihood function*/
start LogLik(param) global (datain);
igrp = datain[,5];*datain[,5] is group id
X = datain[,1:4]; *datain[,1:4] are independent variables
expXb = exp(X*param);
uniqIgrp = unique(igrp)`;
sumExpXb = ... 阅读全帖 |
|
r***k 发帖数: 13586 | 2 %macro cover();
local i;
proc sort data=datain; by name day; run;
data dataout;
retain
%do i=1 %to 10;
sale&i.0d
%end;
;
set datain;
by name day;
if first.name then do;
%do i=1 %to 10;
sale&i.0d=0;
%end;
end;
%do i=1 %to 10;
if day>(&i-1)*10 and day<=&i*10 and sale ne . then
sale&i.0d=sale&i.0d+sale;
%end;
if last.name;
drop day sale;
run;
%mend cover;
data datain;
do name='a', 'b', 'c';
do day=1 to 100;
sale=ran... 阅读全帖 |
|
j**********3 发帖数: 305 | 3 这个用ods regions 的xy选项就可以实现啊!
example
ods layout start;
ods region x=0 in y=5.5 in height=4 in width=4 in;
%bar_chart(&dataIn, %scan(&varList,&i.,' '));
ods region x=4 in y=5.5 in height=4 in width=4 in;
%pie_chart(&dataIn, %scan(&varList,&i.,' '));
ods layout end; |
|
c**i 发帖数: 6973 | 4 (A) "There is limited escape from the absence of datain study of the records
of three areas that approach historical experiments--the Japanese in Japan,
and the Chinese in Manchuria, and in Taiwan."
Irene B. Taeuber, Manpower Utilizationand Demographic Transition: Japan,
Manchuria and Taiwan. Asian Survey, 1: 10-25 (1961; University of California
Press).
http://www.jstor.org/sici?sici=0004-4687(196105)1%3A3%3C19%3AMUADTJ%3E2.0.CO%3B2-B
(B)
(1) Chinese in Northeastern China were reported to have |
|
c**i 发帖数: 6973 | 5 【 以下文字转载自 TheStrait 讨论区 】
发信人: choi (choi), 信区: TheStrait
标 题: Re: 为什么东北人普遍没有台湾人那样的亲日情结
发信站: BBS 未名空间站 (Sun Dec 7 14:42:37 2008)
(A) "There is limited escape from the absence of datain study of the records
of three areas that approach historical experiments--the Japanese in Japan,
and the Chinese in Manchuria, and in Taiwan."
Irene B. Taeuber, Manpower Utilizationand Demographic Transition: Japan,
Manchuria and Taiwan. Asian Survey, 1: 10-25 (1961; University of California
Press).
http://www.j |
|
s*******9 发帖数: 1 | 6 public class GetInputFromKeyboard1 {
public static void main(String[] args){
BufferedReader dataIn = new BufferedReader(new InputStreamReader(
System.in));
BufferedReader is = new BufferedReader(new InputStreamReader(System.
in));
int number ;
System.out.println("How Many Names You Wish To Enter:");
String name = "";
String strIn = "";
try{
strIn = is.readLine();
}catch(IOException e){
System.out.println( |
|
S********a 发帖数: 359 | 7 data datain;
merge data1 (in=aa)
data2 (in=bb);
by x;
run;
括号里的in起什么作用? 双黄包答谢! |
|
c*****a 发帖数: 808 | 8 在这看过几篇paper相关文章,希望对你有用
SAS缺失数据处理 Missing Data Imputation in SAS
Multiple Imputation for Missing Data: Concepts and New Development(Version 9
.0) (very good article)
An Introduction to Multiple Imputation Methods: HandlingMissing Data with
SAS V8.2
Imputation Techniques Using SAS Software for Incomplete Datain Diabetes
Clinical Trials
A SAS Macro for Single Imputation
quote:
"This paper reviews methods for analyzing missing data, including
basic concepts and applications of multiple imputation
te... 阅读全帖 |
|
f**********0 发帖数: 142 | 9 add options to define the length
ods tagsets.excelxp
file="xx.xls"
options (sheet_name = "&datain"
frozen_headers='1'
absolute_column_width='15,10,25,10,10,15,15,15'
Embedded_titles='yes'
Embedded_Footnotes='no'
Autofit_Height = 'yes'); |
|
m******e 发帖数: 89 | 10 proc contents data=&dataIn out=_name(keep=name);
run;
proc sql ;
select "%T(outdata_var,",name,")" into :mvar separated by ";"
from _name
;
quit;
&mvar; |
|