Why do I get negative coefficients from the "johnsrnd" function in MATLAB R2022b?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 9 de Feb. de 2023
Respondida: MathWorks Support Team
el 16 de Feb. de 2023
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.
Respuesta aceptada
MathWorks Support Team
el 9 de Feb. de 2023
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!