Stephen Okiya has asked the following question

I notice that the variable names are truncated in spite of using the option abb(100). Do you know why this is the case?


asdoc uses the abbrev() function of Mata. For some reasons, the abbrev() function splits the following sentence in half, no matter which value we set for the abbreviation.

loc vari " Child's age when she/he was first fed something other than breast milk"

. dis abbrev("`vari'", 32)
 Child's age when she/he was firs

 . dis abbrev("`vari'", 100)
 Child's age when she/he was firs

However, we set the second argument of abbrev() function to missing, then the full sentence is show

. dis abbrev("`vari'", .)

Child's age when she/he was first fed something other than breast milk

Therefore, if we prefer not to abbreviate any name or label, just provide missing value for the abb() option of asdoc. So the following will show all the text

asdoc sum Q85, label abb(.)


  1. michael October 4, 2019 at 7:37 pm - Reply

    when I use the label option, the abb(.) trick doesn’t seem to work; I always get 32 characters, and no more.

    • Attaullah Shah October 5, 2019 at 12:10 am - Reply

      Please mention the Stata command with which you are using asdoc.

  2. Nathan, Bradley October 6, 2019 at 8:44 pm - Reply

    I am excited to try out your impressive asdoc Stata function for a paper I am about to submit as the outputs look quite attractive. My aim is to have the full variable names show in the outputted tables without any abbreviation of variable names occurring.

    However, I noticed that the abbreviation option does not seem to work per the help file. Specifically, longer dependent and independent variable names in the regression tables outputted by asdoc remain cut off regardless of what I specify for abb() or whether I combine it with the label option. The help file says specifying the label and abb() options together should cause the variable name length to be abb + 22.

    Here is some example code:

    asdoc reg sentiment firm_ban avg_volatility_12mos_g lnmve_q leverage_q, vce(robust)

    nest label abb(9) save(TEST_ABB) replace

Leave A Comment