由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 求教:SAS怎样实现限制必须经过某个点的GLM
相关主题
proc nlmixed很豪放how to convert a categorical variable into a continuous variable
proc genmod 结果的问题求大侠指点,GEE macro in SAS
proc GLM和proc Reg、proc Genmod的比较统计新人问个自学SAS的问题
问个GENERALIZED线性模型中,DESIGN MATRIX变动的影响Help~~a question about SAS
[SAS]programming statement in Proc GLMMIX/NLMIX/MODEL极菜的SAS问题 -- 最简单的线性回归
请问怎么建立变量全是ordinal data的model?急,谢谢。请教一个SAS PROC PHREG 的问题
有人知道这是什么回事?proc genmod.新人拜山,请教做SAS programmer主要用哪些procedure?
longitudinal的data,一般都用什么方法分析?没学过sql找工是不是很难?
相关话题的讨论汇总
话题: proc话题: beta0话题: beta1话题: x0
进入Statistics版参与讨论
1 (共1页)
m********1
发帖数: 368
1
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!
f*******r
发帖数: 257
2
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
m********1
发帖数: 368
3
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...

【在 f*******r 的大作中提到】
: 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

j*****e
发帖数: 182
4
Use Proc Nlmixed to write your own likelihood function.
m********1
发帖数: 368
5
Thank you very much. Your hint is very useful.
I have just noticed that, using PROC NLMIXED, in the "model" statement we
can use general(ll) to specify a general log likelihood function that we
construct using SAS programming statements.
Are there any other solutions for this problem?

【在 j*****e 的大作中提到】
: Use Proc Nlmixed to write your own likelihood function.
o****o
发帖数: 8077
6
substitute your restriction in terms of \beta_0 into the model
so it becomes
g(\pi)=g(\pi_0) + \beta_1 (X - x0)
=\alpha_0 + \alpha_2 *Z, a stnadard GLM
where Z=(X-x0), \alpha_0=g(\pi_0), \alpha_1=\beta_1

that
restriction

【在 m********1 的大作中提到】
: 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!

m********1
发帖数: 368
7
I think the suggestion of jsdagre on the #4 floor above is better.
My original idea is exactly same as yours, however, it has a problem: \alpha
_0=g(\pi_0) is already given. So the only parameter to estimate is \alpha_1=
\beta_1.
To use fisher-scoring and find a solution to maximize the defined log likelihood is
more straight forward, I think. Only need to define the log likelihood function and PROC NLMIXED will solve it for you.

【在 o****o 的大作中提到】
: substitute your restriction in terms of \beta_0 into the model
: so it becomes
: g(\pi)=g(\pi_0) + \beta_1 (X - x0)
: =\alpha_0 + \alpha_2 *Z, a stnadard GLM
: where Z=(X-x0), \alpha_0=g(\pi_0), \alpha_1=\beta_1
:
: that
: restriction

o****o
发帖数: 8077
8
不过这种方法你就可以试试offset的技巧with no intercept, 这样就不用自己写似然
方程了

alpha
1=
likelihood is
function and PROC NLMIXED will solve it for you.

【在 m********1 的大作中提到】
: I think the suggestion of jsdagre on the #4 floor above is better.
: My original idea is exactly same as yours, however, it has a problem: \alpha
: _0=g(\pi_0) is already given. So the only parameter to estimate is \alpha_1=
: \beta_1.
: To use fisher-scoring and find a solution to maximize the defined log likelihood is
: more straight forward, I think. Only need to define the log likelihood function and PROC NLMIXED will solve it for you.

m********1
发帖数: 368
9
有道理,多谢oloolo大人!我终于明白怎么设置offset了!
那么至少有两种办法可以做这个问题了。

【在 o****o 的大作中提到】
: 不过这种方法你就可以试试offset的技巧with no intercept, 这样就不用自己写似然
: 方程了
:
: alpha
: 1=
: likelihood is
: function and PROC NLMIXED will solve it for you.

1 (共1页)
进入Statistics版参与讨论
相关主题
没学过sql找工是不是很难?[SAS]programming statement in Proc GLMMIX/NLMIX/MODEL
说一下今天的电面请问怎么建立变量全是ordinal data的model?急,谢谢。
关于proc varmax 的VECM model有人知道这是什么回事?proc genmod.
Re: 请问SAS如何学起?longitudinal的data,一般都用什么方法分析?
proc nlmixed很豪放how to convert a categorical variable into a continuous variable
proc genmod 结果的问题求大侠指点,GEE macro in SAS
proc GLM和proc Reg、proc Genmod的比较统计新人问个自学SAS的问题
问个GENERALIZED线性模型中,DESIGN MATRIX变动的影响Help~~a question about SAS
相关话题的讨论汇总
话题: proc话题: beta0话题: beta1话题: x0