Title

putdocxfreqtable -- Produces frequency oneway tables with putdocx.

Syntax

putdocxfreqtable varlist , [noCUM] [noSUM [PERCDigits(#) [LABLen(#)]]

Description

produces a one-way table when there is one categorical variable in varlist.

Syntax

varlist must contain one variable

Options:

nocum : drops the cumulative sum in the frequency table

nocum : drops the row sum in the frequency table

PERCDigits : number of digits in percentages. Default 0

LABLen: maximum length of category labels. Default is no truncation.

Remarks

In the Stata output, category labels are truncated at 32 characters. They are not truncated in the Word document.

Example

. sysuse auto, clear

. egen pricecat = cut(price), at(0,5000,10000,999999) label

. label variable pricecat "Price (categorical)"

. tab pricecat

. // Start putdocx, enter contextual information.

. capture putdocx clear

. putdocx begin

. putdocx paragraph, style(Title)

. putdocx text ("Demonstration Title")

. putdocx paragraph, style(Subtitle)

. putdocx text ("Demonstration Produced `c(current_date)'")

. putdocx paragraph

. putdocx text ("Following this paragraph will be a one-way frequency tabulation of price by categories.")

. // Demonstrate putdocxfreqtable.

. putdocxfreqtable pricecat

. putdocx save "putdocxfreqtable.docx"

Author

Jan Brogger

https://github.com/janbrogger/putdocxfreqtable