SAS中文论坛

标题: 请高手指点如何把把输出结果存在一个数据集中? [打印本页]

作者: shiyiming    时间: 2011-1-28 17:21
标题: 请高手指点如何把把输出结果存在一个数据集中?
data a;
input TRIAL VD VWD NVD NVWD LATITUDE YEAR ALLOC;
LN_OR=log((VD/VWD)/(NVD/NVWD));
EST=1/VD+1/VWD+1/NVD+1/NVWD;
datalines;
1 4 119 11 128 44 48 1
2 6 300 29 274 55 49 1
3 3 228 11 209 42 60 1
4 62 13536 248 12619 52 77 1
5 33 5036 47 5761 13 73 2
6 180 1361 372 1079 44 53 2
7 8 2537 10 619 19 73 1
8 505 87886 499 87892 13 80 1
9 29 7470 45 7232 27 68 1
10 17 1699 65 1600 42 61 3
11 186 50448 141 27197 18 74 3
12 5 2493 3 2338 33 69 3
13 27 16886 29 17825 33 76 3
;
proc print;run;
Proc mixed method =ml data=a;
class trial;
model ln_or=/ s cl;
repeated /group=trial;
parms / parmsdata=a eqcons=1 to 13;
run;
data b;
set a;
keep est;
run;
Proc mixed cl method =ml data=a;
class trial;
model ln_or=/ s cl;
repeated /group=trial;
random int/ subject=trial s;
parms (0.01 to 2.00 by 0.01)(0.35712)
(0.20813)(0.43341)(0.02031)(0.05195)
(0.00991)(0.22701)(0.00401)(0.05698)
(0.07542)(0.01253)(0.53416)(0.07164)
/eqcons=2 to 14;
run;
得到结果,我如何才能把我最想要的 “Solution for Fixed Effects”这一行储存于一个数据集中呢?要添加什么语句呢?多谢高人指点!!!
作者: shiyiming    时间: 2012-8-6 16:01
标题: Re: 请高手指点如何把把输出结果存在一个数据集中?
[code:8qe8ui27]
data a;
input TRIAL VD VWD NVD NVWD LATITUDE YEAR ALLOC;
LN_OR=log((VD/VWD)/(NVD/NVWD));
EST=1/VD+1/VWD+1/NVD+1/NVWD;
datalines;
1 4 119 11 128 44 48 1
2 6 300 29 274 55 49 1
3 3 228 11 209 42 60 1
4 62 13536 248 12619 52 77 1
5 33 5036 47 5761 13 73 2
6 180 1361 372 1079 44 53 2
7 8 2537 10 619 19 73 1
8 505 87886 499 87892 13 80 1
9 29 7470 45 7232 27 68 1
10 17 1699 65 1600 42 61 3
11 186 50448 141 27197 18 74 3
12 5 2493 3 2338 33 69 3
13 27 16886 29 17825 33 76 3
;
proc print;run;
Proc mixed method =ml data=a;
class trial;
model ln_or=/ s cl;
repeated /group=trial;
parms / parmsdata=a eqcons=1 to 13;
run;
data b;
set a;
keep est;
run;

ods listing close;
ods output SolutionF=solutionf;

Proc mixed cl method =ml data=a;
class trial;
model ln_or=/ s cl;
repeated /group=trial;
random int/ subject=trial s;
parms (0.01 to 2.00 by 0.01)(0.35712)
(0.20813)(0.43341)(0.02031)(0.05195)
(0.00991)(0.22701)(0.00401)(0.05698)
(0.07542)(0.01253)(0.53416)(0.07164)
/eqcons=2 to 14;
run;

ods listing;

[/code:8qe8ui27]




欢迎光临 SAS中文论坛 (http://www.mysas.net/forum/) Powered by Discuz! X3.2