I'm trying to create a table of descriptive statistics for a large data set. I have two variables for which I would like to present the 25th, 50th, and 75th percentiles. One of these is a date variable. (I know that it is unusual to present dates with these statistics, but I have my reasons in this case.) The other one is a count variable. So I would like the results for the date variable to be in %tdnn/dd/YY format, but the count variable in %1.0f. I have tried:
but that gives me everything as %1.0, so the dates are basically unreadable to humans. I also tried, pretty much knowing it wouldn't work:
But, as I expected, I got
How can I do this?
Code:
dtable, continuous(order_date, statistic(p25 p50 p75)) nformat(%tdnn/dd/YY) continuous(n_orders, statistic(p25 p50 p75)) nformat(%1.0f)
Code:
dtable, continuous(order_date, statistic(p25 p50 p75) nformat(%tdnn/dd/YY)) continuous(n_orders, statistic(p25 p50 p75) nformat(%1.0f))
Code:
option nformat() not allowed in option continuous() r(198)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float record_date int number_of_events 23100 2 23310 3 23140 4 22779 1 22741 7 23014 7 23198 4 23103 1 22882 1 22685 2 23267 1 22680 3 22987 3 22973 3 22707 1 23323 1 23124 2 23120 1 23071 3 23274 12 22718 1 22729 1 22660 1 23119 10 23022 2 23135 1 22683 12 23308 5 23219 2 23062 1 22942 1 23314 1 23035 2 22965 1 23125 1 22746 1 22986 1 23228 1 23251 15 23199 1 23099 5 22747 5 22629 19 22642 1 23187 1 23288 2 23168 1 23019 3 22647 1 23015 4 23114 4 23015 1 22673 7 22851 10 23287 1 23154 1 22715 5 23316 1 23316 2 22607 1 22690 2 22826 3 22767 11 23040 1 23126 1 23327 6 23323 59 23155 1 22612 1 22896 7 22698 3 22641 1 23115 1 23068 2 23215 3 23070 1 23224 1 23201 1 23285 1 22927 1 22984 8 23044 1 22951 1 22708 4 23091 8 23126 7 22939 23 22936 1 23070 2 23317 18 22783 2 22796 2 22847 9 22732 9 22752 2 22931 1 23178 3 23316 1 23236 1 22833 1 end format %td record_date
Comment