Pivot table using grpstats
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
Let us I want to calculate the sum and mean of wealth for men and women.
I set Type ={men, women} and have created a pivot table using
summarytable = grpstats(dsa,'Type',{'sum','mean'})
Now I want to have sum and mean for everyone in the sample (without grouping for men and women). Please advise the next step.
0 comentarios
Respuestas (1)
Prasanth Sunkara
el 23 de En. de 2018
Editada: Prasanth Sunkara
el 23 de En. de 2018
Hi, I understand that you want to compute the stats without using any grouping variable. It could be done as follows:
>>summarytable = grpstats(dsa, [],{'sum','mean'})
>>openExample('stats/SummaryStatisticsforaDatasetArrayWithoutGroupingExample')
0 comentarios
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!