由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - [求助]:SAS Simulation for correlated binary data
相关主题
SAS statistics modeling role in NYC or North Carolina请教工作中遇到的correlation问题
multicollinearity and factor analysislogistic regression issue
SAS five-year rolling windowCONTINUOUS PREDICTOR AND BINARY OUTCOME
Ask 2 simple SAS questions,thanks[合集] simulation in SAS in Clinical trial
外行请教:这个问题有没有答案?Object oriented programming in SAS
请教一个SIMULATION的问题[合集] 问一个SAS做randomization assignment 的问题
问一个用simulation的问题请教如何用SAS处理这个RANDOM SAMPLING的问题
一般的统计仿真实验和monte carlo simulation是一回事吗?Test independence
相关话题的讨论汇总
话题: sas话题: simulation话题: correlated话题: ranbin话题: binary
进入Statistics版参与讨论
1 (共1页)
K****a
发帖数: 67
1
请版上好心人帮帮我一下,感激不尽
需要用SAS Monte Carlo simulation,模拟一组实验数据 group randomization trial:
要求outcomes within a group are correlated and binary(0/1),given
correlation coefficient as rho=0.01.
predictor variables 有categorical (e.g. treatment, gender ....)和continous
类型。
我搜了许多文献,许多写道要用beta-binomial distribution 来生成数据,可是依然
没有弄明白怎么写code,把这个outcome的相关系数rho插进去,或者我怎么确定相关度
是我想要的呢?
谢谢各位
这是网上一个例子:
data test;
>> b0 = -1.3;
>> b1 = 2.2;
>> b2 = 0;
>> s = 0.6;
>> do group=1 to 30;
>> gamma = s*rannor(123);
>> do id=1 to 25;
>> x1 = ranbin(123,1,0.5);
>> x2 = ranbin(123,1,0.5);
>> eta = gamma + b0 + b1*x1 + b2*x2;
>> p = exp(eta) / (1 + exp(eta));
>> y = ranbin(123,1,p);
>> output;
>> end;
>> end;
>> keep group id x1 x2 y;
>> run;
1 (共1页)
进入Statistics版参与讨论
相关主题
Test independence外行请教:这个问题有没有答案?
如何解释OUTPUT请教一个SIMULATION的问题
问一个sampling from multivariate distribution 的问题问一个用simulation的问题
请教如何用proc glimmix 分析 repeated measures with binary outcome.一般的统计仿真实验和monte carlo simulation是一回事吗?
SAS statistics modeling role in NYC or North Carolina请教工作中遇到的correlation问题
multicollinearity and factor analysislogistic regression issue
SAS five-year rolling windowCONTINUOUS PREDICTOR AND BINARY OUTCOME
Ask 2 simple SAS questions,thanks[合集] simulation in SAS in Clinical trial
相关话题的讨论汇总
话题: sas话题: simulation话题: correlated话题: ranbin话题: binary