ACRO
ACRO copied to clipboard
Stata 17: table command
The changes that were included in the code to handle the differences between Staat16 and Stata17 are:
-
The words
contents
in Stata 16 is now replaced bystatistic
in Satat 17 If you want to have more than one aggfunc in Stata 16 you need one contents statement:contents(mean sd inc_acticity)
If you want to have more than one aggfunc in Stata 17 you need more than one statistic statement:statistic(mean sd inc_acticity) statistic(sd inc_acticity)
-
The word
by
used for superrows in Stata 16 does not exist in Satat 17. -
How the rowspec, colspec and tablespec are handles in Staat 17 differs from Stata 16. In Stata 16 the first parameter is the index and the following parameters are the columns and if you want superorws you use the word
by
. In Satat 17 it can be summarised as follows:We have a string (the variables ,index,columns and tables, as string), and we want to create a list of strings like this [rowstring, colstring, tablestring] according to the following scenarios:
- If the string doesn’t have parentheses, then all the words until the last one are rowstring and the last one is the colstring.
- If the string has parentheses:
- If there are parentheses at the start of the string, then all the words between the first parentheses are the rowstring.
- If the remaining string doesn’t contain parentheses, then the remaining words are the colstring.
- If the remaining string starts with parentheses, then all the words between these parentheses are the colstring.
- If the remaining string still contains words without parentheses, then the remaining words are the tablestring.
- If the remaining string still contains words with parentheses, then the words between these parentheses are the tablestring.
- If the remaining string is empty then the tablestring is empty.
- If the remaining string has parentheses but does not start with them, then the words before the parentheses are the colstraing while the words inside the parentheses are the tablestring.
- If there are not parentheses at the start of the string, then all the words until the first parentheses are the rowstring.
- If the remaining string starts with parentheses, then all the words between these parentheses are the colstring.
- If the remaining string still contains words with parentheses, then the words between these parentheses are the tablestring.
- If the remaining string is empty then the tablestring is empty.
- If the remaining string has parentheses but does not start with them, then the words before the parentheses are the colstraing while the words inside the parentheses are the tablestring.
- If the remaining string starts with parentheses, then all the words between these parentheses are the colstring.
- If there are parentheses at the start of the string, then all the words between the first parentheses are the rowstring.