How to calculate skewness and kurtosis via 'groupsummary'?

3 visualizaciones (últimos 30 días)
Jiashun Wu
Jiashun Wu el 23 de Ag. de 2021
Editada: Jiashun Wu el 24 de Ag. de 2021
Hi!
I have a question about how to calculate skewness and kurtosis using the 'groupsummary' function.
I am working with a subset of variables from a table.
Thanks for your help!

Respuestas (1)

dpb
dpb el 23 de Ag. de 2021
Editada: dpb el 23 de Ag. de 2021
Presuming you have the Statistics Toolbox which defines the two statistics of interest m-files--
G = groupsummary(T,groupvars,method,datavars)
where
method={'skewness','kurtosis'};
You'll define the other inputs to match your wishes on grouping and data variables.
If you don't have the requisite TB, then write your own functions and refer to them in their place.
  1 comentario
Jiashun Wu
Jiashun Wu el 24 de Ag. de 2021
Editada: Jiashun Wu el 24 de Ag. de 2021
Thanks dpb for your comments.
I do have the Statistics Toolbox (Fullname: Statistics and Machine Learning Toolbox).
But the computation methods in groupsummary do not include 'skewness' nor 'kurtosis' (i.e., the code you provided would not work) --- https://www.mathworks.com/help/matlab/ref/double.groupsummary.html?s_tid=doc_ta.

Iniciar sesión para comentar.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by