Why do I get negative coefficients from the "johnsrnd" function in MATLAB R2022b?
3 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2023 年 2 月 9 日
回答済み: MathWorks Support Team
2023 年 2 月 16 日
I am using the "johnsrnd" function in MATLAB R2022b to identify the distribution type and estimate the coefficients of the transformation based on my data as follows:
q=[-1.5351,-0.4660,0.5285,1.4536];
[~,type,coef] = johnsrnd(q,0,0);
The obtained coefficients (gamma, eta, epsilon, lambda) are
coef = [36.2084,-13.8186,13.7797,-1.0000]
which is not a valid output since coef(2) = eta and coef(4) = lambda should be strictly positive.
採用された回答
MathWorks Support Team
2023 年 2 月 9 日
This is the expected behavior of the function. The primary reference for this function is Slifker, J.F. and S.S. Shapiro (1980) "The Johnson System: Selection and Parameter Estimation", which can be found by executing "edit johnsrnd" in the MATLAB Command Window. According to the primary reference, only two types have no bounds on lambda or eta. This correspond to the following two options of the function: SL (lognormal, which is the identified distribution type based on your provided data) and SN (identity/normal). For both of these types, the sign of 'eta' does not change the results. You can safely set coef(2) = abs(coef(2)) in this scenario if you want to use the magnitude of this coefficient.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!