估计稳定分布的分布
我有 2 组数据:
d1= {0.119894,0.430666,0.0831885,0.0319174,0.120422,0.113005,0.396407,0.286316,0.0846212,0.0380193,0.047136,0.0362305,0.0445161,0.142403,0.0540607,0.133119,0.10831,0.173586,0.162465,0.0704632,0.0856676,0.086322,0.31334,0.210488,0.165907,0.119317,0.0995894,0.103821,0.135736,0.245069,0.0814167,0.142331,0.321499,0.0576824,0.0535766,0.0546975,0.121395,0.0608112,0.0606295,0.133289,0.0468469,0.0501325,0.0641351,0.0846396,0.317252,0.0779754,0.105217,0.0749865,0.302625,0.301864,0.0929992,0.12178,0.279253,0.245539,0.198353,0.107202,0.17784,0.145572,0.055006,0.0770127,0.0861758,0.189966,0.21403,0.0834313,0.206845,0.2087,0.263422,0.0767717,0.162445,0.0542824,0.0553086,0.141381,0.052898,0.0945407,0.0776741,0.0367623,0.0565677,0.166219,0.035447,0.120121,0.0418321,0.11264,0.0540176,0.120358,0.074417,0.242225,0.398622,0.308373,0.15192,0.278717};
d2={0.170719,0.099203,0.0539713,0.15749,0.150455,0.142714,0.0705496,0.0690684,0.0630756,0.0372223,0.0885515,0.0305229,0.0869673,0.0426363,0.0504665,0.0371966,0.0766164,0.0402321,0.0334813,0.0489499,0.0753463,0.0942363,0.0786223,0.335095,0.0706324,0.0764047,0.0682716,0.0699429,0.0355438,0.0755698,0.10206,0.199187,0.0560379,0.0342713,0.0500202,0.0558365,0.0624332,0.0418887,0.0531662,0.0499419,0.0273659,0.0228881,0.0893776,0.0643183,0.0171277,0.0373337,0.0457631,0.0764322,0.0963383,0.0633643,0.107952,0.0570244,0.19336,0.0428824,0.0629954,0.120787,0.0924894,0.0562895,0.125588,0.116919,0.196895,0.264337,0.0787541,0.318374,0.193144,0.147134,0.0456675,0.0419496,0.057378,0.0577714,0.0706519,0.0410366,0.0716635,0.0547774,0.0157382,0.030444,0.0769898,0.0121786,0.0586156,0.0314843,0.0942514,0.1627,0.0781299,0.148406,0.423559,0.276206,0.0708934,0.0812794,0.159947};
现在我想使用 StableDistribution[] 找到估计分布
对于第一个数据集,我执行以下操作:
dist1 = EstimatedDistribution[d1, StableDistribution[alpha, beta, mu, sigma]]
我收到一条消息并输出
FindMaximum::sdprec: Line search unable to find a sufficient increase in the function value with MachinePrecision digit precision. >>
StableDistribution[1,0.863446,1.,-0.0781627,0.0345779]
输出看起来不错(不太适合数据,但不是太糟糕了)但是该消息对输出意味着什么?
对于第二个数据集 d2
dist2 = EstimatedDistribution[d2, StableDistribution[alpha, beta, mu, sigma]]
我收到不同的消息。
Optimization`ModifiedCholeskyDecomposition::herm: The matrix {{2.76856*10^157,-1.75574*10^159,-1.84519*10^157,-2.26892*10^157},{7.88598*10^159,0.,6.41507*10^159,7.88598*10^159},{1.82386*10^157,6.41507*10^159,1.13495*10^157,1.82386*10^157},{-2.26892*10^157,-1.75574*10^159,-1.84519*10^157,1.68961*10^157}} is not Hermitian or real and symmetric.
和输出:
StableDistribution[1,0.834688,1.,-0.0101189,0.0181306]
所以,我有几个问题。谁能解释这些消息及其相关性?在我看来,Mathematica 尝试了多种不同的方法来估计分布,但有些方法效果不太好。
谢谢。
J。
I have 2 sets of data:
d1= {0.119894,0.430666,0.0831885,0.0319174,0.120422,0.113005,0.396407,0.286316,0.0846212,0.0380193,0.047136,0.0362305,0.0445161,0.142403,0.0540607,0.133119,0.10831,0.173586,0.162465,0.0704632,0.0856676,0.086322,0.31334,0.210488,0.165907,0.119317,0.0995894,0.103821,0.135736,0.245069,0.0814167,0.142331,0.321499,0.0576824,0.0535766,0.0546975,0.121395,0.0608112,0.0606295,0.133289,0.0468469,0.0501325,0.0641351,0.0846396,0.317252,0.0779754,0.105217,0.0749865,0.302625,0.301864,0.0929992,0.12178,0.279253,0.245539,0.198353,0.107202,0.17784,0.145572,0.055006,0.0770127,0.0861758,0.189966,0.21403,0.0834313,0.206845,0.2087,0.263422,0.0767717,0.162445,0.0542824,0.0553086,0.141381,0.052898,0.0945407,0.0776741,0.0367623,0.0565677,0.166219,0.035447,0.120121,0.0418321,0.11264,0.0540176,0.120358,0.074417,0.242225,0.398622,0.308373,0.15192,0.278717};
d2={0.170719,0.099203,0.0539713,0.15749,0.150455,0.142714,0.0705496,0.0690684,0.0630756,0.0372223,0.0885515,0.0305229,0.0869673,0.0426363,0.0504665,0.0371966,0.0766164,0.0402321,0.0334813,0.0489499,0.0753463,0.0942363,0.0786223,0.335095,0.0706324,0.0764047,0.0682716,0.0699429,0.0355438,0.0755698,0.10206,0.199187,0.0560379,0.0342713,0.0500202,0.0558365,0.0624332,0.0418887,0.0531662,0.0499419,0.0273659,0.0228881,0.0893776,0.0643183,0.0171277,0.0373337,0.0457631,0.0764322,0.0963383,0.0633643,0.107952,0.0570244,0.19336,0.0428824,0.0629954,0.120787,0.0924894,0.0562895,0.125588,0.116919,0.196895,0.264337,0.0787541,0.318374,0.193144,0.147134,0.0456675,0.0419496,0.057378,0.0577714,0.0706519,0.0410366,0.0716635,0.0547774,0.0157382,0.030444,0.0769898,0.0121786,0.0586156,0.0314843,0.0942514,0.1627,0.0781299,0.148406,0.423559,0.276206,0.0708934,0.0812794,0.159947};
Now I want to find an Estimated distribution using StableDistribution[]
For the first data set I do the following:
dist1 = EstimatedDistribution[d1, StableDistribution[alpha, beta, mu, sigma]]
I get a message and output
FindMaximum::sdprec: Line search unable to find a sufficient increase in the function value with MachinePrecision digit precision. >>
StableDistribution[1,0.863446,1.,-0.0781627,0.0345779]
The output looks ok (not a great fit for the data, but not too bad) but what does the message imply for the output?
For the second data set, d2
dist2 = EstimatedDistribution[d2, StableDistribution[alpha, beta, mu, sigma]]
I get a different message.
Optimization`ModifiedCholeskyDecomposition::herm: The matrix {{2.76856*10^157,-1.75574*10^159,-1.84519*10^157,-2.26892*10^157},{7.88598*10^159,0.,6.41507*10^159,7.88598*10^159},{1.82386*10^157,6.41507*10^159,1.13495*10^157,1.82386*10^157},{-2.26892*10^157,-1.75574*10^159,-1.84519*10^157,1.68961*10^157}} is not Hermitian or real and symmetric.
and output:
StableDistribution[1,0.834688,1.,-0.0101189,0.0181306]
So, I've got a couple of questions. Can anyone explain these messages and their relevance? It looks to me that Mathematica tries a number of different ways to estimate the distribution and some just don't work very well.
Thx.
J.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了使稳定分布的参数估计有效,构造了pdf(alpha, beta, x)的多元插值,并将所得插值用于估计。多项式插值会出现小规模振荡,这可能会扰乱最大化例程。因此,在进行稳定估计时,最好使用PrecisionGoal->3、AccuracyGoal->3。
不过,这样做并不会消除您的消息,但会加快估计速度,这对于较大尺寸的问题很重要。
由于数据量很小,估计量的统计不确定性无论如何都很大。
第一条消息是良性的,但第二条消息可能是一个错误,因为对数似然
数据的估计分布太低。
顺便说一句,StableDistribution 似乎不太适合您的数据:
In order to make parameter estimation for stable distribution efficient, a multivariate interpolation of the pdf(alpha, beta, x) is constructed, and the resulting interpolation is used for estimation. Polynomial interpolation exhibits small scale oscillations, which can throw off the maximization routines. Thus, in working with stable estimation, it is better to use PrecisionGoal->3, AccuracyGoal->3.
Doing this does not get rid of your messages, though, but will speed-up estimation, which matters for larger size problems.
Since you data-size is small, statistical uncertainties of the estimators are large anyway.
The first message is benign, but the second is probably a bug, since the log-likelihood
of the estimated distribution on data is too low.
As an aside, it seems that StableDistribution is not a very good fit for your data:
关于数值优化器警告的一般评论 - 我有类似的 问题使用
FindMaximum
并收到“足够减少”警告,即使输出看起来不错。这与无法保证默认AccuracyGoal
6 的事实有关,但可以在没有警告的情况下实现较小的目标。您可以使用
Off[FindMaximum::sdprec]
全局关闭警告,或者使用以下命令按命令抑制警告:A general comment about numerical optimizer warnings -- I had a similar issue with using
FindMaximum
and getting "sufficient decrease" warnings, even though output seemed fine. It had to do with the fact that defaultAccuracyGoal
of 6 could not be guaranteed, but smaller goal could be met without warnings.You can globally turn the warning off with
Off[FindMaximum::sdprec]
or suppress it on per-command basis with