由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS help...
相关主题
[新手求救]怎样输出logistic regression的结果?求助,SAS运行proc logistic 出现离奇的现象!
急问个简单的SAS ODS PDF的问题SAS 的问题... 多谢高手解答
SAS输出到Excel/pdf求书
How to format the SAS output?请教SAS split data的问题
关于SAS里面 PROC MODEL 的output,急!!SAS 问题
[SAS] data set options (obs=) in output tablesSAS DATA 求助
SAS Output 窗口里的东西怎么编辑?help: proc logistic
中级SAS问题SAS里怎么根据VALUE来选择需要OUTPUT的COLUMNS
相关话题的讨论汇总
话题: outdsn话题: logisticm话题: a1话题: sas话题: ods
进入Statistics版参与讨论
1 (共1页)
s******1
发帖数: 178
1
Dear all,
I have a SAS question needed to help. I have 20 variables a1-a10 and b1-b10
and want to fit a logistic regression but use the different combinations and
get odds ratio or estimate.
SAS code: how could get all 100 combination models????? Thanks so much!!!!
%macro logisticm (a=, b=, outdsn= );
ODS OUTPUT OddsRatios=&outdsn;
proc logistic data=one desc;
model iiq1=&a &b age;
run;
ODS OUTPUT CLOSE;
%mend;
%logisticm (a=a1, b=b1, outdsn=a1);
%logisticm (a=a1, b=b2, outdsn=a2);
.....
%logisticm (a=a2, b=b1, outdsn=a3);
%logisticm (a=a2, b=b2, ,outdsn=a4);
.....
.....
k*******a
发帖数: 772
2
可以用循环啊,比如
%do i=1 %to 10;
%do j=1 %to 10;
ODS OUTPUT OddsRatios=outa&i.b&j;
proc logistic data=one desc;
model iiq1=a&i b&j age;
run;
ODS OUTPUT CLOSE;
%end;
%end;
s******1
发帖数: 178
3
Thank you very much!

【在 k*******a 的大作中提到】
: 可以用循环啊,比如
: %do i=1 %to 10;
: %do j=1 %to 10;
: ODS OUTPUT OddsRatios=outa&i.b&j;
: proc logistic data=one desc;
: model iiq1=a&i b&j age;
: run;
: ODS OUTPUT CLOSE;
: %end;
: %end;

s******1
发帖数: 178
4
Sorry, I have another question. We still have the variables a1-a10 and b1-
b10 and I want to get another variable using all the combinations of a and b
, such as mix1=a1*b1, mix2=a1*b2, etc. There should be 100 combinations
totally. How should I do?
Thank you sooooo much!

【在 k*******a 的大作中提到】
: 可以用循环啊,比如
: %do i=1 %to 10;
: %do j=1 %to 10;
: ODS OUTPUT OddsRatios=outa&i.b&j;
: proc logistic data=one desc;
: model iiq1=a&i b&j age;
: run;
: ODS OUTPUT CLOSE;
: %end;
: %end;

j******o
发帖数: 127
5
还是用循环。
*------------------------------------;
%macro mix();
%do i=1 %to 10;
%do j=1 %to 10;
a&i*b&j as mix_a&i._b&j
%if &i^=10 or &j^=10 %then ,;
%end;
%end;
%mend mix;
proc sql;
create table two as
select *, %mix()
from one;
quit;
*------------------------------------;
s******1
发帖数: 178
6
Thank you very much!
1 (共1页)
进入Statistics版参与讨论
相关主题
SAS里怎么根据VALUE来选择需要OUTPUT的COLUMNS关于SAS里面 PROC MODEL 的output,急!!
怎么样给这样的一列用SAS算平均?[SAS] data set options (obs=) in output tables
help on a sas questionSAS Output 窗口里的东西怎么编辑?
如何比较两个proc contents的结果?中级SAS问题
[新手求救]怎样输出logistic regression的结果?求助,SAS运行proc logistic 出现离奇的现象!
急问个简单的SAS ODS PDF的问题SAS 的问题... 多谢高手解答
SAS输出到Excel/pdf求书
How to format the SAS output?请教SAS split data的问题
相关话题的讨论汇总
话题: outdsn话题: logisticm话题: a1话题: sas话题: ods