Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stata 17: table command #204

Merged
merged 7 commits into from
May 30, 2024
Merged

Stata 17: table command #204

merged 7 commits into from
May 30, 2024

Conversation

mahaalbashir
Copy link
Contributor

The changes that were included in the code to handle the differences between Staat16 and Stata17 are:

  1. The words contents in Stata 16 is now replaced by statistic 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)

  2. The word by used for superrows in Stata 16 does not exist in Satat 17.

  3. 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.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (2d09424) to head (0d6bf92).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
+ Coverage   99.63%   99.66%   +0.02%     
==========================================
  Files           9        9              
  Lines        1093     1182      +89     
==========================================
+ Hits         1089     1178      +89     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jim-smith jim-smith merged commit e6190fe into main May 30, 2024
6 checks passed
@jim-smith jim-smith deleted the Stata branch May 30, 2024 22:50
@jim-smith jim-smith mentioned this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants