SAS中文论坛

标题: 恳请大家的帮忙!分布模型的检验 [打印本页]

作者: shiyiming    时间: 2008-11-30 11:25
标题: 恳请大家的帮忙!分布模型的检验
我是sas初学者,可现在确碰到个难题,恳请大家能够帮个忙,在这先谢谢了!
9.3,7.3,13.7,12.3,12.3 14.3 8.3 8.7 13.3  12.3
比如这一行数,我想用 normal,Gamma,weibull分布等做分布模型,并选择模型拟合效果最好的一种。
我该怎么用sas语言写啊!
作者: shiyiming    时间: 2008-12-1 03:57
标题: Re: 恳请大家的帮忙!分布模型的检验
you may use PROC UNIVARIATE -> HISTOGRAM, PROBPLOT or QQPLOT statement. For example
[code:18oio1jc]
data a1;
input x @@;
datalines;
9.3 7.3 13.7 12.3 12.3 14.3 8.3 8.7 13.3 12.3
;
ods html;
ods graphics on;
proc univariate data=a1;
        histogram x / normal(mu=est sigma=est color=red)
                gamma(alpha=est sigma=est color=blue)
                weibull(c=est sigma=est color=green)
        ;
run;
ods graphics off;
ods html close;
[/code:18oio1jc]
Reference: [url:18oio1jc]http://support.sas.com/onlinedoc/913/getDoc/en/procstat.hlp/univariate_index.htm[/url:18oio1jc]
作者: shiyiming    时间: 2008-12-1 09:28
标题: Re: 恳请大家的帮忙!分布模型的检验
非常感谢阿!
高手,我想用mean square error(均方误差)对这几个分布模型进行检验,选出拟合效果最好的一种。
MSE = Σ{Fˆ (xi) – F(xi)}2
谢谢阿!
作者: shiyiming    时间: 2008-12-3 01:05
标题: Re: 恳请大家的帮忙!分布模型的检验
I'm not sure but PROC UNIVARIATE may only give you the maximum likelihood estimators.
How could you optimize by mean square errors? The F(xi) in your equation is unknown.
Anyway, no matter what you want to optimize, you can program step by step using [url=http://support.sas.com/onlinedoc/913/getDoc/en/imlug.hlp/langref_sect176.htm:39e8ho1z]Nonlinear Optimization and Related Subroutines[/url:39e8ho1z].

Above all, my level is low and don't just take whatever I said.
作者: shiyiming    时间: 2008-12-4 11:16
标题: Re: 恳请大家的帮忙!分布模型的检验
Thank you very much !
Your response gives me a great help!




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