'%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations

Cross-tabulations are a simple but important tool for understanding the distribution of socio-demographic characteristics among participants in epidemiological studies. We developed a generic SAS macro, '%svy_freqs', to create publication-quality tables from cross-tabulations between a fac...

Full description

Bibliographic Details
Main Authors: Jacques Muthusi, Peter W. Young, Samuel Mwalili
Format: Article
Language:English
Published: Ubiquity Press 2021-10-01
Series:Journal of Open Research Software
Subjects:
Online Access:https://openresearchsoftware.metajnl.com/articles/318
_version_ 1818901024089309184
author Jacques Muthusi
Peter W. Young
Samuel Mwalili
author_facet Jacques Muthusi
Peter W. Young
Samuel Mwalili
author_sort Jacques Muthusi
collection DOAJ
description Cross-tabulations are a simple but important tool for understanding the distribution of socio-demographic characteristics among participants in epidemiological studies. We developed a generic SAS macro, '%svy_freqs', to create publication-quality tables from cross-tabulations between a factor and a by-group variable given a third variable using survey or non-survey data. The macro also performs two-way cross-tabulations and provides extra features not available in existing procedures such as ability to incorporate parameters for survey design and replication-based variance estimation methods, performing validation checks for input parameters, transparently formatting variable values from character into numeric and allowing for generalizability. We demonstrate the macro using the 2013–2014 National Health and Nutrition Examination Survey (NHANES), a complex survey designed to assess the health and nutritional status of adults and children in the United States.
first_indexed 2024-12-19T20:13:10Z
format Article
id doaj.art-93b1751975f84c318fb500a055c9d594
institution Directory Open Access Journal
issn 2049-9647
language English
last_indexed 2024-12-19T20:13:10Z
publishDate 2021-10-01
publisher Ubiquity Press
record_format Article
series Journal of Open Research Software
spelling doaj.art-93b1751975f84c318fb500a055c9d5942022-12-21T20:07:16ZengUbiquity PressJournal of Open Research Software2049-96472021-10-019110.5334/jors.318260'%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-TabulationsJacques Muthusi0Peter W. Young1Samuel Mwalili2Division of Global HIV and Tuberculosis, U.S. Centers for Disease Control and Prevention, NairobiDivision of Global HIV and Tuberculosis, U.S. Centers for Disease Control and Prevention, MaputoStrathmore University, NairobiCross-tabulations are a simple but important tool for understanding the distribution of socio-demographic characteristics among participants in epidemiological studies. We developed a generic SAS macro, '%svy_freqs', to create publication-quality tables from cross-tabulations between a factor and a by-group variable given a third variable using survey or non-survey data. The macro also performs two-way cross-tabulations and provides extra features not available in existing procedures such as ability to incorporate parameters for survey design and replication-based variance estimation methods, performing validation checks for input parameters, transparently formatting variable values from character into numeric and allowing for generalizability. We demonstrate the macro using the 2013–2014 National Health and Nutrition Examination Survey (NHANES), a complex survey designed to assess the health and nutritional status of adults and children in the United States.https://openresearchsoftware.metajnl.com/articles/318sas macrodisease prevalencethree-way crosstabulationsreproducible researchreplication-based variance estimation
spellingShingle Jacques Muthusi
Peter W. Young
Samuel Mwalili
'%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
Journal of Open Research Software
sas macro
disease prevalence
three-way crosstabulations
reproducible research
replication-based variance estimation
title '%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
title_full '%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
title_fullStr '%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
title_full_unstemmed '%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
title_short '%svy_freqs': A Generic SAS Macro for Creating Publication-Quality Three-Way Cross-Tabulations
title_sort svy freqs a generic sas macro for creating publication quality three way cross tabulations
topic sas macro
disease prevalence
three-way crosstabulations
reproducible research
replication-based variance estimation
url https://openresearchsoftware.metajnl.com/articles/318
work_keys_str_mv AT jacquesmuthusi svyfreqsagenericsasmacroforcreatingpublicationqualitythreewaycrosstabulations
AT peterwyoung svyfreqsagenericsasmacroforcreatingpublicationqualitythreewaycrosstabulations
AT samuelmwalili svyfreqsagenericsasmacroforcreatingpublicationqualitythreewaycrosstabulations