Yet another update to violinplot is now available from SSC. To install the update, type:
A matrix containing the results of the box plots is now returned in r(); specify option table to also display the matrix in the results window. Example:
Code:
ssc install violinplot, replace
Code:
. sysuse sp500
(S&P 500)
. gen condition = ceil(_n/62)
. violinplot open high low close, over(condition) vertical nostack ///
> noline nofill key(box) table
1: condition = 1
2: condition = 2
3: condition = 3
4: condition = 4
------------------------------------------------------------------------------------------
| N mean median p25 p75 whisk_l whisk_u
-------------+----------------------------------------------------------------------------
1 |
open | 62 1275.915 1299.575 1234.18 1341.1 1117.58 1373.73
high | 62 1285.768 1312.74 1241.36 1350.32 1124.27 1383.37
low | 62 1260.876 1277.365 1214.5 1329.14 1081.19 1364.66
close | 62 1273.329 1297.105 1233.42 1340.89 1117.58 1373.73
-------------+----------------------------------------------------------------------------
2 |
open | 62 1233.399 1248.33 1212.58 1266.61 1137.59 1312.83
high | 62 1243.792 1255.58 1225.61 1269.3 1169.51 1315.93
low | 62 1222.752 1235.135 1207.38 1254.56 1137.51 1306.89
close | 62 1234.41 1248.33 1214.36 1266.44 1137.59 1312.83
-------------+----------------------------------------------------------------------------
3 |
open | 62 1154.159 1182.545 1131.74 1205.82 1032.74 1236.71
high | 62 1162.049 1188.685 1135.52 1214.44 1018.92 1239.78
low | 62 1142.005 1170.415 1114.86 1196.14 998.24 1229.43
close | 62 1151.338 1181.59 1129.03 1204.52 1016.1 1236.72
-------------+----------------------------------------------------------------------------
4 |
open | 62 1116.062 1121.7 1085.2 1142.66 1051.33 1170.35
high | 62 1124.567 1137.185 1097.43 1150.89 1063.37 1173.62
low | 62 1107.705 1118.09 1076.57 1135.9 1041.48 1164.43
close | 62 1117.64 1125.805 1087.2 1142.92 1056.75 1170.35
------------------------------------------------------------------------------------------

Comment