Pivot table using grpstats
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Prasanth Sunkara
2018 年 1 月 23 日
編集済み: Prasanth Sunkara
2018 年 1 月 23 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!