asdoc abbreviates / truncates my variable names and labels | Word to Stata

  • 0

asdoc abbreviates / truncates my variable names and labels | Word to Stata

Category:asdoc

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?


Answer:

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(.)




Leave a Reply

6 + sixteen =