Evaluating multivariate stable distributions
이전 댓글 표시
Hello,
I need to calculate the probability density function for the multivariate stable distribution. It seems to me that MATLAB only does so
fo univariate stable distributions (I wish I am wrong). I tested this as below;
pd = makedist('Stable','alpha',0.5,'beta',0.5,'gam',1,'delta',0);
pdf(pd2,1)
ans = 0.1003
pdf(pd2,2)
ans = 0.0533
but when I try the command pdf(pd2,[1 2]) (or pdf(pd2,[1; 2]) ) then I get
0.1003 0.0533
and this means that matlab does not want consider [1 2] as a single point in 2-dimensional state space.
Do you know if there is any package, or anything, where I can perform multivariate estimation of stable densities at some query points?
Thanks for your kind help in advance!
Babak
댓글 수: 13
Mohammad Shojaei Arani
2023년 11월 8일
If you look at what MATLAB considers as "Stable Distribution", you'll see that it is univariate:
This might help (I didn't look into it more closely):
Mohammad Shojaei Arani
2023년 11월 8일
When you type
pd = makedist('Stable','alpha',0.5,'beta',0.5,'gam',1,'delta',0);
you get the univariate Stable distribution.
Unfortunately, I don't see a multivariate extension in MATLAB.
If the Toolbox I gave you the link for does not meet your requirements, I think you will have to program what you want on your own.
What do you want to do with the multivariate stable distribution ?
Mohammad Shojaei Arani
2023년 11월 9일
Paul
2023년 11월 10일
Why doesn't stable_pdf require the gamma and delta parameters? Are they assumed to be 1 and 0 respectively? Can they be specified to be other values?
Any idea why stable_pdf is so much faster?
Mohammad Shojaei Arani
2023년 11월 10일
I think the comment above was to me, not Torsten.
Here is a timing test of Matlab's pdf.
pd = makedist('Stable','alpha',1.6,'beta',0.3,'gam',1,'delta',0);
rng(100);
for count = 1:5
x = random(pd,[1 10^count]);
tic;
A = pdf(pd,x); % This is based on MATLAB built in functions
t1(count) = toc;
end
figure
semilogx(10.^(1:5),t1,'-x')
figure
[sx,ind] = sort(x);
plot(sx,A(ind),'-o','MarkerSize',2)
ylim([-0.01, 0.3])
I wonder why the timing jumps up for larger number of values. Maybe it's because for larger number of random values it's more likely that some of the random values will be at points where the pdf is difficult to compute accurately (presumably in the tails?). The matab doc StableDistribution says it computes the pdf via direct integration and perhaps there are some values of x for which it takes more time for the integration to converge. Just speculating ....
Instead of posting norm(A-B), can you post something that compares the actual values of A-B? Maybe a plot of abs(A-B) vs x or abs(A-B)./abs(B) vs x or something like that? I'm curious about how stable_pdf compares pointwise to pdf, particularly in the tails.
Mohammad Shojaei Arani
2023년 11월 12일
For future reference, graphic images, like in a .png file, can be inserted at the cursor by clicking on the image icon (to the left of the link icon in the Insert menu).
Should I be surprised that the largest differences are around x = 0 and not in the tails?
Maybe pdf is slower because it uses the same method to work for all values of alpha and beta (though the doc page does mention an assumption it makes on alpha). Maybe stable_pdf is taking advantage of faster methods that are tuned for its allowable values of parameters, though I suppose there's nothing stopping pdf from doing the same for that same subset of parameters.
If you fell stongly about it, you can always submit an enhancement reqeust to TMW tech support.
openfig('Fig1.fig');
openfig('Fig2.fig');
Mohammad Shojaei Arani
2023년 11월 12일
Mohammad Shojaei Arani
2023년 11월 18일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





