benjann / fre

Stata module to display one-way frequency table

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to exclude the column with the cumulative percentages

ericmelse opened this issue · comments

Dear Ben,

Of all your fine packages, I use fre about every 5 minutes each time that I work with Stata for my research.
So, not much to complain about fre, but, I do have an option request.

I would like to have the option to not include the column with the cumulative percentages in the result window (matrix etc.), possibly using nocumulative or that abbreviated into noc .

Using the classic example auto data (Chambers, J. M., W. S. Cleveland, B. Kleiner, P. A. Tukey (2018, reprint 1983). Graphical methods for data analysis. CRC Press. https://doi.org/10.1201/9781351072304. Pages 352-355. Originally published by Consumer Reports, April 1979):

. sysuse auto, clear
. fre rep78
* which reports:

rep78 -- Repair record 1978
-----------------------------------------------------------
              |      Freq.    Percent      Valid       Cum.
--------------+--------------------------------------------
Valid   1     |          2       2.70       2.90       2.90
        2     |          8      10.81      11.59      14.49
        3     |         30      40.54      43.48      57.97
        4     |         18      24.32      26.09      84.06
        5     |         11      14.86      15.94     100.00
        Total |         69      93.24     100.00           
Missing .     |          5       6.76                      
Total         |         74     100.00                      
-----------------------------------------------------------

. fre rep78 , nomiss
* which reports:

rep78 -- Repair record 1978
-----------------------------------------
       |      Freq.    Percent       Cum.
-------+---------------------------------
 1     |          2       2.90       2.90
 2     |          8      11.59      14.49
 3     |         30      43.48      57.97
 4     |         18      26.09      84.06
 5     |         11      15.94     100.00
 Total |         69     100.00           
-----------------------------------------

. fre rep78 , nomiss noc
* which could report:

rep78 -- Repair record 1978
------------------------------
       |      Freq.    Percent
-------+----------------------
 1     |          2       2.90
 2     |          8      11.59
 3     |         30      43.48
 4     |         18      26.09
 5     |         11      15.94
 Total |         69     100.00           
------------------------------

Time permitting, possibly you can implement this option in the ado file of fre.

Best,
Eric