SAS中文论坛

标题: 关于PROC NLIN过程步的一个问题请教 [打印本页]

作者: shiyiming    时间: 2010-3-18 11:15
标题: 关于PROC NLIN过程步的一个问题请教
在SAS的非线性模型NLIN里面,有个参数选项是L95,这是求预测值的置信区间下确界,置信度是95%,但是我想求99%的置信区间的下确界,如何定义?谢谢!
作者: shiyiming    时间: 2010-3-18 20:57
标题: Re: 关于PROC NLIN过程步的一个问题请教
[code:1aldcomq]OUTPUT OUT = OUT PREDICTED = YP L95 = L95 LCL = LCL_ALPHA/ALPHA = 0.05; [/code:1aldcomq]

As you noted, L95 gives the lower bound of an approximate 95% confidence interval for an individual prediction, which is a default regardless of what a confidence level given in the model. LCL is a general term depending on the ALPHA level specified in the model. Take an example of the code above. If you set the ALPHA as 0.05, the LCL is equivalent to L95 here. If you set ALPHA different to 0.05, LCL will give a lower bound at specified confidence level.

JingJu
作者: shiyiming    时间: 2010-3-19 09:13
标题: Re: 关于PROC NLIN过程步的一个问题请教
不好意思,我用的是9.1版本,你说的options好像没有,难道是最新的9.2版本的options?
作者: shiyiming    时间: 2010-3-19 21:04
标题: Re: 关于PROC NLIN过程步的一个问题请教
Indeed, it works on SAS 9.2. On the other hand, since output data set gives L95 and U95, and the t statistic is computable, probably the following formula is helpful for your question.

[list:144vhe7g]Let t_0.05 = t(n-p, 1-0.05/2), t_alpha = t(n-p, 1-alpha/2) , t statistic with df = n-p where  n is the number of observations, and p is the number of parameters.

L_alpha = (t_alpha/t_0.05)*0.5*(L95-U95) +0.5*(L95+U95);[/list:u:144vhe7g]
Of note, please justify it before using the formula.

JingJu
作者: shiyiming    时间: 2010-3-20 09:31
标题: Re: 关于PROC NLIN过程步的一个问题请教
多谢!公式L_alpha = (t_alpha/t_0.05)*0.5*(L95-U95) +0.5*(L95+U95)有点意思,不知道这个公式出自何处?
作者: shiyiming    时间: 2010-3-20 11:13
标题: Re: 关于PROC NLIN过程步的一个问题请教
我在验证。
作者: shiyiming    时间: 2010-3-21 00:21
标题: Re: 关于PROC NLIN过程步的一个问题请教
[code:3tkzied0]ALPHA = 0.01; N = 27; P = 4;
L_ALPHA = quantile('T', 1-ALPHA/2, N-P)/QUANTILE('T', 1-0.05/2, N-P)*0.5*(L95-U95)+0.5*(L95+U95);[/code:3tkzied0]

for P, if you have three paramters a, b, c . so P = 3 +1, the extra one is intercept.
I use the foregoing formula to check its validity in SAS 9.2. I don't think there is any problem. Just for reminding, the QUANTILE function is working on SAS 9.1? If not, you need to find a replacement.

JingJu
作者: shiyiming    时间: 2010-3-21 01:03
标题: Re: 关于PROC NLIN过程步的一个问题请教
quantile function works in v9.1
作者: shiyiming    时间: 2010-3-23 09:37
标题: Re: 关于PROC NLIN过程步的一个问题请教
公式的由来:
对于T test有关的Confidence interval,特点是对称而且公式差不多都是L95 = f(X) -STANDAD ERROR (OR ALIKE)*T(ALPHA = 0.05).U95 = f(X)+STANDAD ERROR (OR ALIKE)*T(ALPHA = 0.05).所以f(x) = (L95+U95)/2.对于其他的alpha,其他保持不变,唯一改变的是t(alpha)。把公式倒一下即可。我用SAS9.2 验证这个公式,误差在1E-14左右, rounding error。故此公式是对的。
我想sas统计过程的改进无外乎几点:增加新的统计量,改善算法,还有就是提供更多的拿来就能吃的菜。这个问题就是,把以前的剩菜回锅一抄,由肉炒菜变成了菜炒肉。我有个朋友很聪明,学什么一点就透。这也是他非常藐视sas的理由。一个又一个新的版本,增加的只是价格,其他的都是剩菜。我笨,所以只好把剩菜当成是圣菜。
作者: shiyiming    时间: 2010-3-24 15:28
标题: Re: 关于PROC NLIN过程步的一个问题请教
感谢Jingju!我也已经用那个+-置信区间推导了L99,确如你所说,关于满足制定分布条件的底层公式就是那么几个,倒来倒去。非常感谢你如此的耐心!you are nice man!




欢迎光临 SAS中文论坛 (http://www.mysas.net/forum/) Powered by Discuz! X3.2