m********1 发帖数: 368 | 1 Exactly! However, I didn't find any software that can specify this
restriction...
that
then
genmod to
specific model, you may be able to do it with other procedures. For example
, you can do proc logistic, if the link is a logit... |
|
v*******g 发帖数: 334 | 2 我的 Model 是
Proc Genmod ;
class X Y ;
model count=A B X Y /dist=poisson link=log scale=D;
A B 是 continuous variables , A 是我想 test 的 variable , B X Y 是
covariates
it looks proc power or proc glmpower don't couple with poisson model. |
|
k*******d 发帖数: 20 | 3 Try this!
proc genmod data=yourdata;
model y=x/dist=binomial link=log;
run; |
|
s*********e 发帖数: 1051 | 4 you didn't miss anything. the answer given was wrong. x * x in model
statement won't work in proc reg.
however, try it in proc glm/genmod. i would be surprised if it won't work.
please post results after you try such that others could learn as well.
thanks. |
|
h**l 发帖数: 4883 | 5 Thanks. So basically students can fail maximally 5 tests and then they'll be
kicked out.
So the study will have 12 tests, most of the students will fail less than 5
tests so the odds ratio would be # of failed tests/ 12. But for those who're
kicked out, the odds ratio would be 5/# tests they take. In this case, it's
negative binomial?
well, so I think I should use proc GENMOD? how do you perform logistic
regression of negative binomial variables?
Thanks a lot.
to |
|
l********s 发帖数: 430 | 6 MLwiN?
不知道 proc genmod可不可以 |
|
l*******n 发帖数: 13 | 7 proc freq;
proc genmode;
proc catmod;
....... |
|
l*******n 发帖数: 13 | 8 the procedures deal with count data, the raw dataset should be aggregated
before analysis if it is too large. for example
A B RESPONSE
1 1 0
1 1 0
1 0 1
1 0 0
.....
TO
A B RES0 RES1
1 1 SUM(0) SUM(1)
...
PROC GENMOD IS BEST FOR LOG LINEAR MODEL (multiple responses), can also be
used to fit logit model, allowing predictor variables
PROC FREQ gives simple statistics to represent the association, not for real
-sense modeling |
|
l******1 发帖数: 292 | 9 在sas 里面,poisson regression model里面,response variable可以是binary吗?
我用了proc genmod option/dist/poisson,不是很清楚如果dependent variable是
binary (0,1)可以用/poisson还是用别的选项?菜鸟,等大虾指点! |
|
s*r 发帖数: 2757 | 10 i doubt they can reproduce proc mixed and genmod |
|
B*****e 发帖数: 31 | 11 今天忽然发现以前用sas跑loglinear model的时候的count都是输进去的,那么在一个
现成dataset里面没有count的情况下怎么快速搞出来呢?用似乎可以proc freq得到两
个变量的cell count,但是变量再多或者cell比较多怎么办?而且貌似proc freq出来
的结果只能自己看,怎么把它生成那个count变量(能直接被sas用来计算)呢?
e.g.proc genmod;model count=x+y+z+x*y/dist=poi link=log;
也许这个问题太菜了,汗。谢谢回复! |
|
t********y 发帖数: 469 | 12 我很肯定,你必须给sparse data 加一个weight,才能做proc logistic,不过怎么创建weight,你可以自己选择不同的方法,这个可以很灵活。比如说x的值,可以取group的mean,median之类的。具体的操作,我记不大清楚了,以前看别的组有人这么做过。
如果是proc genmod
你可以先group这些data再来run你的model
model y/n = x /dist=bin link=logit;
hope |
|
j*****e 发帖数: 182 | 13 to turnanyway,
in proc genmod/logistic, there is a weight statement. This is to handle
different format of data input.
Also, if the data is a case-control data and you do know the true marginal
probability of the outcome, you can adjust it in proc logistic.
Neither situation is true here. |
|
t********y 发帖数: 469 | 14 sparse data
proc logistic 创建weight 变量,是我公司别的组作modeling的时候用的方法
proc genmod 用grouped data比ungrouped data的deviance更可靠,是学校的老师教授的。
你爱信不信。
你也甭跟我抬杠了,你觉得我说的不对,你就给个正确答案好了。 |
|
h*****5 发帖数: 14 | 15 想建gee model,因为是特殊的分布,不能直接用proc genmod.
网上找了一个gee macro, 但总有一些错误。
有用过的大侠能否指点那里可以找到合适的code.
谢谢先。 |
|
j*****e 发帖数: 182 | 16 proc genmod;
model x=/link=glogit;
weight count;
run;
You can use contrast statement to tests on intercepts. Those p-values
correspond to the ones you need for your tests of desire. |
|
a********a 发帖数: 346 | 17 Thank you all. To jsdagre, should the link in the following code be clogit
instead of glogit since glogit is not recoginzed in sas.
proc genmod;
model x=/link=glogit;
weight count;
run; |
|
j*****e 发帖数: 182 | 18 using glogit as the link is the key. Genmod has it. Clogit shouldn't be used
. |
|
c*********n 发帖数: 87 | 19 I only know: the offset variable could not be response or independent
variables. Wait for more about it..... |
|
s*********e 发帖数: 1051 | 20 it is so damned straightforward. i don't understand what the problem might
be.
offset term is just a RHS with beta = 1. that's all. or am i missing
something? |
|
x********u 发帖数: 64 | 21 这2个是一样的么?
还是有什么区别
好像log-linear model,是用proc genmod,dist=poisson
模型是
log (E(y))=ax
而poisson regression呢? |
|
g********d 发帖数: 2022 | 22 I think the cumulative logit function should be interpreted this way:
intercept1 for p1
intercept2 for p1+p2
etc. |
|
c****s 发帖数: 63 | 23 Thanks for your reply!
Yes, you are right.
So according what you said, can I use lasso in 'proc glmselect' in SAS to
find the best variables and then put those variables in 'proc genmod'?
Or do you have any suggestions? Thanks! |
|
c****s 发帖数: 63 | 24 请问,如果用lasso来选择变量,有没有什么限制,比如说对数据的distribution上。
它可以用于gamma 的分布吗?
另外,它的操作方法是什么呢?在SAS里,用lasso先选择变量,然后把它带到proc
genmod中去,是这样吗?
希望知道的各位兄弟姐妹帮帮忙,谢谢了! |
|
d*******o 发帖数: 493 | 25 你的意思是想用log去transform Gamma distribution的cost吗?那就transform后进去
好了。
proc glmselect;
class
model LogCost=var1 var2 /selection=lasso;
run;
Proc Genmod 好像没有stepwise, backward,lasso这些选项 |
|
b******d 发帖数: 3 | 26 ods output parametersestimate的dataset里的"variable"的长度是20, 我有的变量
interaction长度超过20被截了腰,有什么办法改default的变量长度吗? |
|
T***9 发帖数: 73 | 27 Hi all,
Got stuck with the following error. Any help? Thanks in advance!
WARNING: Apparent symbolic reference _PROB not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition
where a numeric operand
is required. The condition was: &_prob=SIG
ERROR: The macro EXTRAPOI will stop executing.
336 proc print data=_stats;run;
ERROR: File WORK._STATS.DATA does not exist.
The original codes:
options MPRINT;
*Using proc genmod to perform Poisson regression;
* and sav |
|
c****t 发帖数: 19049 | 28 CS就是用的东西换的太快了。
保险业里经常就会run个genmod或glmmix,啥前处理,后处理都不会的都跩得二五八万
的。。 |
|
B******y 发帖数: 9065 | 29 PROC REPORT, MEANS, FREQ, GLM and LOGISTICS,包括换汤不换药的有UNIVARIATE,
MIXED, GENMOD等,基本上涵括了90%以上的工作。剩下的10%就为PROC LIFETEST,
PHREG,POWER,PLAN等等了。 |
|
|
|
m*********7 发帖数: 343 | 32 你的问题就看两个东西之间的关系,应该可以不用regression model吧,对于每个问题
,把数据写成
Q \GPA A B C D
student1 1
2
3
4
5
student2 1
2
3
4
5
.....
然后用 proc freq; table student*Q*GPA / cmh; run; 用nonzero correlation那行
的p-value就行了,这样就知道对于每个问题,选什么level是不是和GPA高低有关了。
或者在proc logitistic, proc catmod和proc genmod里面用proportional odds
model, 但是每个问题的1,2,3,4,5要写成dummy |
|
l*********s 发帖数: 5409 | 33 It means you are asking a wrong question; could be due to rank deficiency,
or overspecification. |
|
x*******i 发帖数: 1590 | 34 CONTRAST a*b 0 0 0 0 1 -1;
the last one '-1' is a reference group. is this the reason? |
|
A*******s 发帖数: 3942 | 35 check out the chapter about estimability in any linear theory textbook. |
|
x*******i 发帖数: 1590 | 36 a is a continuous variable.
b has 6 categories, 6th is the reference. |
|
e****t 发帖数: 766 | 37 i guess you forget label ?
label
identifies the contrast on the output. A label is required for every
contrast specified. Labels can be up to 20 characters and must be enclosed
in single quotes. |
|
|
x*******i 发帖数: 1590 | 39 谢谢,是work了。
可是model变了。
我的是
model outcome=a b a*b;
这结果能用的上吗? |
|
j*****e 发帖数: 182 | 40 It is the same model. Just different parameterization.
You use "a b a*b" to check interaction. You use "a*b" to check contrast,
since it is easier to write the contrast this way. |
|
j*****e 发帖数: 182 | 41 It is the same model. Just different parameterization.
You use "a b a*b" to check interaction. You use "a*b" to check contrast,
since it is easier to write the contrast this way. |
|
e****t 发帖数: 766 | 42 what do you want to test ?
you want to test each of linear combination = zero. or all five simutanious
= zero.
if first, try
CONTRAST 'test 1 ' a*b 1 -1 0 0 0 0 ;
CONTRAST 'test 2 ' a*b 0 1 -1 0 0 0 ;
CONTRAST 'test 3 ' a*b 0 0 1 -1 0 0 ;
CONTRAST 'test 4 ' a*b 0 0 0 1 -1 0 ;
CONTRAST 'test 5 ' a*b 0 0 0 0 1 -1 ;
there will be five p values ;
if second, i guess what you specify in contrast is right.
there will be one p value . i am not sure whether is about your data |
|
x*******i 发帖数: 1590 | 43 各位,不好意思,确实不是统计专业出生却在做一些统计的活,不太懂一些名词。
有了问题,就到处google,然后依葫芦画瓢。
我是想test 6 interactions(b*a) coefficients 的不同。网上找到了这个:
http://www.ats.ucla.edu/stat/sas/faq/compreg3.htm
里面有一个sas codes
"PROC GLM DATA=htwt2 ;
CLASS age ;
MODEL weight = age height age*height / SOLUTION ;
CONTRAST 'test equal slopes' age*height 1 -1 0,
age*height 0 1 -1 ;
RUN;“
例子里是Ho: B1 = B2 = B3
我想test ho: B1 = B2 = B3=B4= B5 = B6,所以就模仿了他的contrast code.
这是一个contrast statement
CONTRAST 'test equa |
|
A*******s 发帖数: 3942 | 44 这应该是说B5-B6是non-estimable的 |
|
j*****e 发帖数: 182 | 45 B5-B6 corresponds to the value of B5 in the B*A parameter estimation section
of the output. The slope estimate of B6 is given by A. This is a typical
ANCOVA parameterization. |
|
x*******i 发帖数: 1590 | 46 楼上各位,那我这个non-estimable问题是不是data的问题呀?
另外,jsdagre (na), 用了你的code后(class provfs b/param=ref ref=last;),出
现了out of memory的问题。如果没有/param=ref ref=last,则还好。 |
|
j*****e 发帖数: 182 | 47 First of all, you did not tell the whole story.
What kind of outcome do you have? What is the modeling distribution and what
is the link function here? By default, it is normal with identity link. Is
this what you want? If so, what not use proc mixed?
Second, what does weight=c means?
Third, you can write two class statements, one with provfs and one with b
using the options that I gave.
You have to understand the parameterization of linear models before you use
SAS. Otherwise, it will be a disa |
|
y****a 发帖数: 536 | 48 在SAS中
proc genmod data=XXX descending;
class uid protstatus(ref='2') Hivstatus(ref='1') mher/param=ref desc
order=internal;
model newrole=protstatus Hivstatus mher protstatus*Hivstatus/dist=binomial
link=logit type3;
repeated subject=uid /covb type=AR(1);
run;
为什么加上VARIABLE mher 以后,就出现error in computing the variance function
,
error in parameter estimate covariance computation error in estimation
routine, 大家知道怎么处理这个问题吗?谢谢 |
|
|
p*5 发帖数: 311 | 50 谢谢楼上几位的回复,有些我不太懂,我再查查。
在SAS,GEE是用 PROC GENMOD吗?
MIXED effects model,是用PROC MIX吗?
另外,看到有人用receiver operator curves,和zero-inflated poisson regression
,不懂,能有人给点简单解释吗? |
|