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.
|