Borrar filtros
Borrar filtros

What are the vectors in fitdist command window output?

1 visualización (últimos 30 días)
Anton
Anton el 4 de Jul. de 2017
Comentada: Star Strider el 4 de Jul. de 2017
In the command window output when using fitdist there are vectors in connection to the parameter values that look like they might contain confidence intervals (a vector containing two values for each parameter). However they are not mentioned at all in the documentation for fitdist and when I look among the properties for the created probability distribution they are nowhere to be found. What are they? They need to be mentioned in the documentation.
For example, refer to MATLABs own example code for using fitdist (run following line in MATLAB command window):
openExample('stats/FitaNormalDistributiontoDataExample')
(Then run the script of course)
Thank you in advance, Anton

Respuesta aceptada

Star Strider
Star Strider el 4 de Jul. de 2017
Your interpretation is correct. It is necessary to go ‘diving’ into the related documentation that (through prob.NormalDistribution (link)) eventually leads to the prob.ToolboxFittableParametricDistribution (link) that lists the relevant functions to get the necessary information as scalars and matrices, and to use elsewhere in your code.
Example
load hospital
x = hospital.Weight;
pd = fitdist(x,'Normal')
pd_mean = mean(pd) % Function References
pd_std = std(pd)
pd_ci = paramci(pd)
pd_mean = pd.mean % Structure References
pd_std = pd.std
pd_ci = pd.paramci
The information is inconveniently buried in the documentation, but it is all available. Additional documentation, including that necessary to change the confidence interval probabilities from the default 95%, is available in the paramci (link) page.
It would be nice if links to some of these were displayed on the fitdist documentation page.
  2 comentarios
Anton
Anton el 4 de Jul. de 2017
Thank you!
I was unaware that the things you call structure references in your code above could be used that way. It seems to me to be another way of calling the functions and perform the calculation? Or is that CI already saved somewhere even though it is invisible in the variables box in MATLAB?
I thought that only properties (like variables, arrays etc) that are visible in the variables box in MATLAB could be accessed via the dot-notation (pd.mu for example).
Below is a zoom in on what I am calling the variables box:
Star Strider
Star Strider el 4 de Jul. de 2017
My pleasure!
There appear to be several ways to access the elements of the structures returned by various functions. The CI array exists in the structure, and can be accessed as a structure element or through the function. I have no idea why it does not show up in the Workspace window for ‘pd’. Only the parameter covariances appear.
It seems that the distribution-fitting function results in the Workspace window need some tweaking, along with the documentation. It should not require following three links in order to get to the necessary information.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by