由买买提看人间百态

topics

全部话题 - 话题: genmod
1 2 3 下页 末页 (共3页)
m*i
发帖数: 8
1
来自主题: Statistics版 - help with contrast statement in proc genmod
Hi,everybody
I have a question about how to write contrast in proc genmod to test whether
the effect of the two dummy variables are simultaneously zero, is the
following contrast correct? If not, how should I write the contrast?
Thanks in advance and happy holiday.
MDI
proc genmod data=work.tmp descending;
title "GEE";
class IDSubject dum1(ref='0') dum2(ref='0') /param=ref;
model &depVar=dum1 dum2/link=logit dist=bin offset=logmiles lrci waldci
type3;
repeated subject=IDSubject/type=ind;... 阅读全帖
B******y
发帖数: 9065
2
来自主题: Statistics版 - proc GLM和proc Reg、proc Genmod的比较
SAS中的PROC GLM的命名有重大的欺骗性,这里的GLM是指General Linear Model,而不
是Generalized Linear Model!!!一字之差,区别很大。PROC GLM是一种ANOVA的扩
展,是基于PROC ANOVA的更新程序(PROC GLM出了以后,PROC ANOVA基本上废了);而
PROC GENMOD才是大家常见的将非正态数据转成正态模型的,所以需要Link Function。
据说SAS公司后来非常后悔PROC GLM的定义,毕竟学术界更习惯于GLM是Generalized
Linear Model的缩写,但PROC GLM出现Generalized Linear Model被普遍接受之前,而
且SAS使用者已经习惯用它了。所以没有办法,只好创造了一个新的PROC GENMOD。
c**********e
发帖数: 2007
3
来自主题: Statistics版 - Question Proc GENMOD
I am running on the GENMOD. The data set is simple repeated measure.
The code is following.
proc genmod data=one;
class ... ...;
model ... ...;
repeated subject=id / type=exch;
output out = Residuals
pred = Pred
resraw = Resraw
reschi = Reschi
resdev = Resdev
stdreschi = Stdreschi
stdresdev = Stdresdev
reslik = Reslik;
run;
The weird thing is that the follo... 阅读全帖
k*z
发帖数: 4704
4
来自主题: Statistics版 - proc genmod 怎么预测?
有一个50G的数据,
一个model是genmod link at ZIP; 2400个independent variables;
有一段数据。只有independent variables,没有dependent variables,怎么预测
indepedent variables?
貌似genmod不能提取coefficients 也不能predict values using exsting dependent
variables,
有人用过么? 谢谢
z**********i
发帖数: 12276
5
来自主题: Statistics版 - genmod的问题
因为,到sas community去问了,只好用我蹩脚的英语,也懒得再变成中文,就直接贴
到这了,另外,也看看大家是否可以看懂。
We met with a wired issue when we use proc genmod.
The code is straightforward, we have repeated measures data for hospitals,
so we put hsp_ID as subject in the repeated statement. Totnum is total
numerator for each hospital by quarter and totdenom is total denominator for
each hospital by quarter. This step is variable seletion. By throwing one
candidate variable at a time and checking the p value, if p value is
greater than 0.... 阅读全帖
z****j
发帖数: 131
6
来自主题: Statistics版 - Proc Genmod 模型
请教, 如果使用
proc Genmod data=...;
class ...;
model ...;
repeated subject=../type=ar(1);
run;
出来的结果是 GEE estimates of parameters.
我们对于该数据,使用的这个模型应该是叫做mixed effects model呢,
还是marginal effect model 呢?
谢谢!
w*********e
发帖数: 235
7
来自主题: Statistics版 - proc genmod offset
anyone who knows how to offset some values in logistic model under proc
genmod. thanks.
x*********0
发帖数: 651
8
我用proc genmod建立了一个multinomial的model,怎么写程序可以让系统给你一个
sensitivity和specificity之类的东西呢?谢谢各位大虾!
x*********0
发帖数: 651
9
我用了genmod(descending)建了一个multinomial模型,distribution 是multimonial
,link是cumulative logit。我的response 有5个levels(nominal variable)。
然后我的输出是这样的:
intercept1 9.722
intercept2 10.564
intercept3 10.987
intercept4 12.098
x1 0.987
x2 0.345
....
然后我想把这个模型写出来:
p1=exp(9.722+0.987x1+0.345x2+...)/(1+exp(9.722+0.987x1+0.345x2+...))
p2=exp(10.564+0.987x1+0.345x2+...)/(1+exp(10.564+0.987x1+0.345x2+...))-p1
...
p5=1-p1-p2-p3-p4
这样算出这个record在5个levels几率,然后找到最大的那个,那个就是这个record所
应该属于的category。这样
x*******i
发帖数: 1590
10
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
我 run proc genmod, 有一个contrast statement
CONTRAST a*b 0 0 0 0 1 -1;
but in sas log
"WARNING: The contrast will not be tested due to some rows being
nonestimable."
output is
Contrast Results for GEE Analysis
Chi-
Contrast DF Square Pr > ChiSq Type
0 . . Score
不知道这个some rows being nonestimable是什么?有牛人帮个忙吧。
e****t
发帖数: 766
11
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
how many category of a and b.
i am not sure whether genmod also have "e" option to show all estimable
function.
j*****e
发帖数: 182
12
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
Proc genmod;
class A B;
model outcome=A*B/noint;
contrast .....;
run;
This should work.
e****t
发帖数: 766
13
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
your A is continouse, right ? did you put it in the class statement ?
i think if with continouse variable in the model, "noint" option will effect
your contrast.
post your "proc genmod" code. let us check ....
x*******i
发帖数: 1590
14
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
my sas codes:
PROC genmod data=xx;
class provfs b;
model outcome=a b a*b;
repeated subject=provfs;
weight c;
CONTRAST 'test equal slopes'
a*b 1 -1 0 0 0 0,
a*b 0 1 -1 0 0 0,
a*b 0 0 1 -1 0 0,
a*b 0 0 0 1 -1 0,
a*b 0 0 0 0 1 -1;
run;
a is continuous. b is categorical with 6 groups,
thanks,

effect
j*****e
发帖数: 182
15
来自主题: Statistics版 - 有人知道这是什么回事?proc genmod.
Try this.
PROC genmod data=xx;
class provfs b/param=ref ref=last;
model outcome=a b a*b;
repeated subject=provfs;
weight c;
CONTRAST 'test equal slope'
a*b 1 -1 0 0 0 ;
run;
For simultanous testing, just use the p-vale for the a*b term(5 df).
By the way, it seems like you don't understand the model parameterization.
S********a
发帖数: 359
16
来自主题: Statistics版 - 【求助】GENMOD link 选择
如果纵轴dependent varible vs time(ie., independent varible)图呈现一个向上30
度的弧形,在用GENMOD procedure时候,应该用什么link合适?
非常感谢!
f**********t
发帖数: 1001
17
来自主题: Statistics版 - proc GLM和proc Reg、proc Genmod的比较
有些疑惑。。。
1.proc GLM到底是Generalized Linear Regression么?看了SAS的文档半
天,没见Link function啊。感觉就对所有的independent variable做
traditional Linear regression了。感觉proc Genmod才是在做
Generalized Linear Regression。
2.proc GLM和proc Reg的差别主要在哪?是不是对于proc Reg而言,
independent variable不能包括categorical variable, nominal
variable和interaction?
非常感谢!
P****l
发帖数: 156
18
来自主题: Statistics版 - proc GLM和proc Reg、proc Genmod的比较
reg只要是 linear function
glm is generalized linear model
主要区别,reg只可以用 continuous independent variable
proc glm 可以用来做任何的 generalized linear model
proc glm 是不用 link function 的
proc genmod 才要指出用什么 link function
其实去 sas网站上的那个support 多看看就就知道了
k*******y
发帖数: 132
19
来自主题: Statistics版 - a question about proc genmod
I have a multinomial distributed variable, say Y, and a series of
observations of Y, like 1,2,3,4,2,3,4,1,...
how to calculate p(Y=1) p(Y=2) P(Y=3) P(Y=4)
with genmod?
have been stuck here for 4 hours...cry...
a********s
发帖数: 188
20
来自主题: Statistics版 - a question about proc genmod
Just as a reference: I did not use genmod for multinomial before, but did
use PROC LOGISTIC with option GLOGIT (generalized logit model), and specify
PREDPROB = I to get each level probabilities.
p********2
发帖数: 9939
21
来自主题: Statistics版 - 请问proc genmod, sas问题
我想run一个regression allowing for error correlation within certain clusters.
比如说,year 和 firm。
proc genmod的一个选项是repeated subject。看了看好像这就是用来specify一个
cluster where errors are correlated within this cluster.但是我要specify两个
clusters。它要我写成year*firm。这是什么意思呢?为什么有*。表示interaction?
if yes,怎么个interaction法呵?如果有三个cluster呢?
还有一个问题,我得model不能converge
WARNING: The negative of the Hessian is not positive definite. The
convergence is questionable.
WARNING: The procedure is continuing but the validity of the model fit i... 阅读全帖
g****8
发帖数: 2828
22
来自主题: Statistics版 - 请问proc genmod, sas问题
我依稀记得 proc logistic 是做不了 proc genmod+ repeated subject 能做得事情的。
p********2
发帖数: 9939
23
来自主题: Statistics版 - 请问proc genmod, sas问题
为什么proc genmod+ repeated subject要take 那么长时间,还说我内存不够。好愁呵。

的。
g****8
发帖数: 2828
24
来自主题: Statistics版 - 请问proc genmod, sas问题
By using proc logistics and proc genmode+repeated, you are using two
different types of models.
This may be helpful for you http://www.lexjansen.com/wuss/2006/tutorials/TUT-Smith.pdf.
Based on your question,in my opinion, you need to use the repeated one.
Sometimes, the iteration dose take time. If you specify a convergence criterion, it will be faster.

呵。
c**********e
发帖数: 2007
25
来自主题: Statistics版 - Does GENMOD give class-level p-value?
Here is the example:
proc genmod data=data_one;
class id x1 x2 x3;
model y = x1 x2 x3 / dist=normal;
repeated subject=id / type=exch;
run;
The default output has p-values for each dummy variable generated by x1, but
not a p-value for x1.
Anyone help please? Thanks a ton. It seems GLM gives such p-values by
default.
d*********d
发帖数: 239
26
针对同一组数据,在PROC GENMOD里用不同的working matrix patterns(
Autoregressive, compound symmetry, and Banded),最终得到的empirical
covariance matrix of parametes是一样的。
这个是巧合吗? 还是本来用什么样的working matrix pattern本来就不重要?
k****i
发帖数: 347
27
来自主题: Statistics版 - 请教个简单的统计问题(包子)
原来d是这个意思,我还以为是day...
这样的话,d1里的x1,x2应该当做repeated measures
6 out of 10个人有反应,应该按照binomial distribution的events/trials形式来分析
具体来说,应该在SAS里用proc genmod
data大概要做成这个样子
D TRT X N
1 0 n1 10
2 1 n2 10
...
SAS code大概是
proc genmod data=data;
class d;
model x/n= trt / dist=bin;
repeated subject=d / type=cs;
run;
如果想估计不同D的效果,就直接adjust for d
proc genmod data=data;
class d;
model x/n= d trt / dist=bin;
run;
y*****w
发帖数: 1350
28
各位distribution大拿好,我最近有个sample size calculation project。是count
data,具体说是number of patient visits, with number of episodes for each
number of visit。请各位帮着参谋看一下我做的是否合适,给些意见。
Sample data如下:
# patient visit episode
---------------------------------
1 156
2 287
3 589
4 899
5 1535
6 1408
7 1017
8 ... 阅读全帖
G*****u
发帖数: 1222
29
来自主题: Actuary版 - 面经
非寿险 精算研究岗位
For the frequency data, in proc genmod, what’s the error distribution
should be used?
For the severity data, in proc genmod, what’s the error distribution should
be used?
What ‘s your internship experience. What do you know about reserving?
What’s your graduate GPA? What’s your college GPA?
What do you know about the loss ratio?
What number do you think is reasonable for a loss ratio?
SAS: how to use retain statement
SAS: How to keep the last transaction of each policy number
What’s t
a*****s
发帖数: 6
30
来自主题: Statistics版 - Help~~a question about SAS
When I try to use "PROC GENMOD" to fit quasi-symmetry model, the log shows:
"error: procedure genmod not found". can anyone tell me why this happen?
Thanks a lot!
f*******r
发帖数: 257
31
If I understand you correctly: beta0 and beta1 now have a restriction that
g(\pi_0)=beta0+beta1*x0. Therefore, there is only one coefficient to be
estimated. In other words, you can solve for beta0 in terms of beta1; then
your model becomes a restricted glm model. I don't know of a way in genmod to
do it. It seems genmod does not take a restrict statement. Depending on specific model, you may be able to do it with other procedures. For example, you can do proc logistic, if the link is a lo
o******6
发帖数: 538
32
☆─────────────────────────────────────☆
whatsummer (不理猫@冥王星) 于 (Mon May 5 16:23:31 2008) 提到:
谢谢
☆─────────────────────────────────────☆
sotough (天马行空) 于 (Mon May 5 17:41:00 2008) 提到:
proc genmod can run poisson model also. I don't think proc logistic can run
poission.
☆─────────────────────────────────────☆
himalaya (Tea) 于 (Mon May 5 18:45:47 2008) 提到:
genmod的参数很多的 distribution可以是possion, negative binomial, normal之类
的, link可以是logit probit identity等等
http://www2.stat.unibo.it/M
c****s
发帖数: 63
33
来自主题: Statistics版 - 关于lasso的variable selection问题
以上您的方法选完变量可以把它直接带入proc genmod 中吗?
因为我的数据respond variable是cost data, 跟一般的数据不一样,skewed非常厉害
,log(cost)以后都还不是太normal,所以,想问一下怎么办?可不可以把选出的
variables直接带入proc genmod 中?
e*******e
发帖数: 2
34
来自主题: Statistics版 - Biostatistician openings in Covance.
There are currently two job openings in Covance (www.covance.com).
Good luck!
Senior Biostatistician I
Master’s degree in statistics/Biostatistics/Applied statistics with
excellent programming skill in SAS, particularly expertise in IML, Proc GLM
and Proc Mixed, Proc MULTTEST, Proc GENMOD, and power/sample size
calculation of various experimental designs and Macros. Major emphasis will
be on carcinogenicity testing statistics and safety pharmacology (with
Latin Squares with embedded repeated me... 阅读全帖
f*******l
发帖数: 828
35
我用 genmod fit一个数据,看起来response variable的分布可以是lognormal也可能
是gamma... 然后我用link=log dist=normal算出来的结果比link=log, dist=gamma的
AIC/BIC大,这样是不是一定就要用link=log dist=gamma了.
可是我觉得link=log dist=normal不是更能说明lognormal么(或者我理解错了?),
然后gamma的canonical link不是应该是 1/ ?
我特别希望能用link=log dist=normal算出来的结果,但是因为BIC大一些,所以不知
道怎么写report... 是不是有别的方法来看genmod下那种方法更好呢?
r****t
发帖数: 276
36
来自主题: Statistics版 - GEE model一问
诸位大虾,在下试用GENMOD with repeated option去估计一个率,看起来很简单的
model,比如这样:
proc genmod data = dsn;
class subjid y x;
model y = x/link = logit distribution = binomial;
repeated subject = subjid/type=exch;
estimate 'rate a' x 1 0;
run;
可是一旦使用了repeated option 也就是GEE model,出来的率非常邪门。如果直接
proc freq; tables y*x得到的y=1 & x=1的率是70%左右,用GEE model求出来的居然在
30%左右?我注意到用exchangeable option 出来的working correlation〉0.95,这是
不是如此离奇的rate的原因亚?那位大虾对这种情况有经验望不吝赐教,谢先
n*****n
发帖数: 3123
37
来自主题: Statistics版 - GEE model一问
你是不是用没有repeat statement的来做independent covariance structure
proc genmod data = dsn;
class subjid y x;
model y = x/link = logit distribution = binomial;
run;
你可以试下
proc genmod data = dsn;
class subjid y x;
model y = x/link = logit distribution = binomial;
repeated subject=subjid/type=ind;
run;
如果两个差的很大,说明1是有问题的。就是说是有correlation的。因为1是用model
based covariance. 而GEE用的是sandwich covariance matrix.
C***o
发帖数: 68
38
来自主题: Statistics版 - 说一下今天的电面
感谢大牛指点!我想请教大牛2个问题。
1.logistic里的selection=backward的话,他背后用的理论是不是deviance test?
2.genmod里是没有selection选项的,那行业上是怎么选genmod里的model的(比如
gamma regression)?
谢谢!
t********m
发帖数: 939
39
来自主题: Statistics版 - 该用cox regression model还是gee model?
Obs ID MONTHS SEQ EVENT DAYS AGE BMI
1 1 0 1 0 0.001 40 27.39999962
2 1 12 2 0 411 41 26.5
3 1 24 3 0 778 42 26.29999924
4 1 36 4 0 1169 43 26.20000076
5 1 48 5 0 1504 44 26
6 1 60 6 0 1911 45 26.39999962
7 1 72 7 0 2225 46 26.10000038
8 1 84 8 0 2612 47 27.60000038
9 2 0 1 0 0.001 50 24.7... 阅读全帖
y*****w
发帖数: 1350
40
Actually the intercept in the ODS output is the estimated log mean of the
fitted gamma distribution, so I don't need the output statement in PROC
GENMOD. The pertinent code becomes:
proc genmod data=mydata;
model visit = / dist=gamma link=log;
freq episode;
ods output parameterestimates=pe;
run;
proc transpose data=pe out=tpe;
var estimate;
id parameter;
run;
data _null_;
set tpe;
call symputx("logmean", intercept);
call symputx("scale", scale);
stop;
run;
data pmf;
do t = 1 ... 阅读全帖
y*****w
发帖数: 1350
41
Because as I mentioned, SAS PROC POWER with the TWOSAMPLEWILCOXON statement
, which I used for the sample size calculation, has no NEGB option.
Actually I found I don't need PROC GENMOD in this context, because I found
that lognormal distribution better fits my data than Gamma distribution,
whereas PROC GENMOD does not have the lognormal option as a distribution. I
found the following SAS example using PROC UNIVARIATE very useful in that it
provides simple and straightforward statistics and gra... 阅读全帖
t*****u
发帖数: 26
42
来自主题: Georgia版 - 求工作推荐
由于爱人在Atlanta附近找到新职位,本人求ATLANTA附近的工作推荐.有5年左右的
Healthcare data analyst工作经验.SAS Programming Skill熟练.
SUMMARY OF QUALIFICATIONS
• 7 years of statistical data analysis experience.
• 7 years of SAS programming experience.
• 5 years of experience working in the Healthcare Industry.
• 5 years of experience managing and analyzing large and complex
datasets.
• 2 years of experience in ArcGIS map creation.
• National Healthcare Safety Network training a... 阅读全帖
s*****a
发帖数: 353
43
来自主题: Economics版 - SAS: does it have this feature? (转载)
proc genmod

anything
c**********e
发帖数: 2007
44
Suppose I have a continuous variable X and a frequency variable Y. I fit a
model by SAS GENMOD. The model says that Y has a negative binomial
distribution with mean a+bX (or exp(a+bX)).
Specifically, I have a sequence X1, X2, ..., Xn and Y1, Y2, ..., Yn. How to
test Yi's follow negative binomial distributions with mean a+bXi (or exp(a+
bXi))?
Anybody has an idea? Thanks a ton.
b******n
发帖数: 54
45
来自主题: Statistics版 - SAS daily tips - GEE
Just start learning how to use PROC GENMOD, :-), Following are quote from SAS
manual:
The analysis of correlated data arising from repeated measurements when the
measurements are assumed to be multivariate normal has been studied
extensively. However, the normality assumption may not always be reasonable;
for example,different methodology must be used in the data analysis when the
responses are discrete and correlated. Generalized Estimating Equations (GEEs)
provide a practical method with reaso
m******n
发帖数: 462
46
来自主题: Statistics版 - Help~~a question about SAS
PROC GENMOD is not a part of SAS/Base. I don't use it but I guess it's
included in SAS/STAT module. If you didn't install this module, you can't
run it.
s***e
发帖数: 2139
47
来自主题: Statistics版 - 用sas作discrete choice model求教
我用proc logistics 作了个简单的logit model
现在要对付repeated choice的data,
用genmod发现不收殓...
请教大家怎么办?谢谢
s***e
发帖数: 2139
48
来自主题: Statistics版 - 用sas作discrete choice model求教
没用过,我来看一下
genmod不收殓,用glimmix就收敛了?
j*****e
发帖数: 182
49
来自主题: Statistics版 - [合集] need help with a reviewer's comment
Because the outcome is binary, you should use generalized linear mixed model
. The term "mixed" means you have random terms in your model. This is caused
by your design(repeated measurement). Do it either in genmod or glimmix.
The parameter estimation method is GEE.GEE is not a model. It is an
estimation method, different from the traditional likelihood method.
m********1
发帖数: 368
50
I am wondering if there are any statements in PROC GENMOD (or any PROC that
can deal with generalized linear models) that can fit the model
g(\pi)=beta0+beta1*x
with the restriction
g(\pi_0)=beta0+beta1*x0
Here g() is the link function, x0 and \pi0 are already known. We want to
estimate beta0 and beta1.
I don't know whether some SAS statement can specify this kind of restriction
in fitting the generalized linear model. Would you give me some advice?
Thank you very much for your help!
1 2 3 下页 末页 (共3页)