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

Adding Stata complex table examples #197

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions stata/stata_acro_nursery.do
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
quietly{
adopath +"."

version 16
use "../data/nursery_dataset", clear


** start the session ******
noisily display `"***********************************************"'
noisily display `" Creating acro session"'
noisily acro init

noisily display `""'

**** basic tabulation
noisily display `"************ Tables ************"'
noisily display `"calling table finance parents directly"'
noisily table finance parents
noisily display `""'
noisily display `"now calling: acro table finance parents"'
noisily acro table finance parents

noisily display `""'

**** complex tabulation
noisily display `"************ Tables with hierarchical rows ************"'
noisily display `"calling table finance housing parents, by(social)"'
noisily table finance housing parents, by(social)
noisily display `""'
noisily display `"now calling: acro table finance housing parents, by(social)"'
noisily acro table finance housing parents, by(social)

noisily display `""'
noisily display `""'

**** complex tabulation
noisily display `"************ Tables with hierarchical columns ************"'
noisily display `"calling table finance housing parents, contents(mean children sd children)"'
noisily table finance housing parents, contents(mean children sd children)
noisily display `""'
noisily display `"now calling: acro table finance housing parents, contents(mean children sd children)"'
noisily acro table finance housing parents, contents(mean children sd children)

noisily display `""'
noisily display `""'

**** tabulation with contents
* acro table year survivor if year>2013, contents(freq mean inc_activity sd inc_activity)

noisily display `""'
noisily display `""'
noisily display `"*********** Regressions *******************************"'
** linear
noisily display `""'
noisily display `" ***** stata: recommend children"'
noisily regress recommend children

noisily display `""'
noisily display `"acro : recommend children"'
noisily acro regress recommend children

noisily display `""'
noisily display `""'
noisily display `" *********list the session contents using :acro print_outputs *****"'
noisily acro print_outputs


noisily display `""'
noisily display `" ************* end the session : acro finalise. *******"'
noisily acro finalise


}
23 changes: 23 additions & 0 deletions stata/stata_acro_test.do
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
quietly{
adopath +"."

version 16
use "../data/test_data", clear


Expand All @@ -19,6 +20,28 @@ noisily display `""'
noisily display `"now calling: acro table survivor grant_type"'
noisily acro table survivor grant_type

noisily display `""'

**** complex tabulation
noisily display `"************ Tables with hierarchical rows ************"'
noisily display `"calling table year grant_type, by(survivor)"'
noisily table year grant_type, by(survivor)
noisily display `""'
noisily display `"now calling: acro table year grant_type, by(survivor)"'
noisily acro table year grant_type, by(survivor)

noisily display `""'
noisily display `""'

**** complex tabulation
noisily display `"************ Tables with hierarchical columns ************"'
noisily display `"calling table year survivor grant_type, contents(count inc_grants sd inc_grants)"'
noisily table year survivor grant_type, contents(count inc_grants sd inc_grants)
noisily display `""'
noisily display `"now calling: acro table year survivor grant_type, contents(count inc_grants sd inc_grants)"'
noisily acro table year survivor grant_type, contents(count inc_grants sd inc_grants)

noisily display `""'
noisily display `""'
**** tabulation with contents
* acro table year survivor if year>2013, contents(freq mean inc_activity sd inc_activity)
Expand Down
Loading