Why do I get negative coefficients from the "johnsrnd" function in MATLAB R2022b?

3 次查看(过去 30 天)
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
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 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by