IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0214262.html
   My bibliography  Save this article

%svy_logistic_regression: A generic SAS macro for simple and multiple logistic regression and creating quality publication-ready tables using survey or non-survey data

Author

Listed:
  • Jacques Muthusi
  • Samuel Mwalili
  • Peter Young

Abstract

Introduction: Reproducible research is increasingly gaining interest in the research community. Automating the production of research manuscript tables from statistical software can help increase the reproducibility of findings. Logistic regression is used in studying disease prevalence and associated factors in epidemiological studies and can be easily performed using widely available software including SAS, SUDAAN, Stata or R. However, output from these software must be processed further to make it readily presentable. There exists a number of procedures developed to organize regression output, though many of them suffer limitations of flexibility, complexity, lack of validation checks for input parameters, as well as inability to incorporate survey design. Methods: We developed a SAS macro, %svy_logistic_regression, for fitting simple and multiple logistic regression models. The macro also creates quality publication-ready tables using survey or non-survey data which aims to increase transparency of data analyses. It further significantly reduces turn-around time for conducting analysis and preparing output tables while also addressing the limitations of existing procedures. In addition, the macro allows for user-specific actions to handle missing data as well as use of replication-based variance estimation methods. Results: We demonstrate the use of the macro in the analysis of 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. The output presented here is directly from the macro and is consistent with how regression results are often presented in the epidemiological and biomedical literature, with unadjusted and adjusted model results presented side by side. Conclusions: The SAS code presented in this macro is comprehensive, easy to follow, manipulate and to extend to other areas of interest. It can also be incorporated quickly by the statistician for immediate use. It is an especially valuable tool for generating quality, easy to review tables which can be incorporated directly in a publication.

Suggested Citation

  • Jacques Muthusi & Samuel Mwalili & Peter Young, 2019. "%svy_logistic_regression: A generic SAS macro for simple and multiple logistic regression and creating quality publication-ready tables using survey or non-survey data," PLOS ONE, Public Library of Science, vol. 14(9), pages 1-14, September.
  • Handle: RePEc:plo:pone00:0214262
    DOI: 10.1371/journal.pone.0214262
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0214262
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0214262&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0214262?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Ben Jann, 2007. "Making regression tables simplified," Stata Journal, StataCorp LP, vol. 7(2), pages 227-244, June.
    2. Lumley, Thomas, 2004. "Analysis of Complex Survey Samples," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 9(i08).
    3. Dhand, Navneet K., 2010. "UniLogistic: A SAS Macro for Descriptive and Univariable Logistic Regression Analyses," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 35(c01).
    4. Archer, Kellie J. & Lemeshow, Stanley & Hosmer, David W., 2007. "Goodness-of-fit tests for logistic regression models when data are collected using a complex sampling design," Computational Statistics & Data Analysis, Elsevier, vol. 51(9), pages 4450-4464, May.
    5. Ben Jann, 2005. "Making regression tables from stored estimates," Stata Journal, StataCorp LP, vol. 5(3), pages 288-308, September.
    6. Shareen A Iqbal & Joshua D Wallach & Muin J Khoury & Sheri D Schully & John P A Ioannidis, 2016. "Reproducible Research Practices and Transparency across the Biomedical Literature," PLOS Biology, Public Library of Science, vol. 14(1), pages 1-13, January.
    7. Roy Wada, 2005. "OUTREG2: Stata module to arrange regression outputs into an illustrative table," Statistical Software Components S456416, Boston College Department of Economics, revised 17 Aug 2014.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Carsten Sauer & Peter Valet & Stefan Liebig, 2013. "The Impact of within and between Occupational Inequalities on People's Justice Perceptions towards Their Own Earnings," SOEPpapers on Multidisciplinary Panel Data Research 567, DIW Berlin, The German Socio-Economic Panel (SOEP).
    2. Hlavac, Marek, 2016. "TableMaker: An Excel Macro for Publication-Quality Tables," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 70(c03).
    3. Zhao, Yuejun, 2023. "Job displacement and the mental health of households: Burden sharing counteracts spillover," Labour Economics, Elsevier, vol. 81(C).
    4. Daniel Homocianu, 2023. "Exploring the Predictors of Co-Nationals’ Preference over Immigrants in Accessing Jobs—Evidence from World Values Survey," Mathematics, MDPI, vol. 11(3), pages 1-29, February.
    5. Francisco Fernández López, 2017. "Impacto de la informalidad laboral sobre el acceso a crédito formal," Coyuntura Económica, Fedesarrollo, vol. 47(1 y 2), pages 169-204, December.
    6. Michael Lokshin & Zurab Sajaia, 2008. "Creating print-ready tables in Stata," Stata Journal, StataCorp LP, vol. 8(3), pages 374-389, September.
    7. John Luke Gallup, 2012. "A programmer's command to build formatted statistical tables," Stata Journal, StataCorp LP, vol. 12(4), pages 655-673, December.
    8. Ben Jann, 2017. "Creating HTML or Markdown documents from within Stata using webdoc," Stata Journal, StataCorp LP, vol. 17(1), pages 3-38, March.
    9. Attila Varga & Dimitrios Pontikakis & Joaquín M. Azagra-Caro, 2010. "Absorptive capacity and the delocalisation of university-industry interaction Evidence from participations in the EU's Sixth Framework Programme for Research," Working Papers 2010R01, Orkestra - Basque Institute of Competitiveness.
    10. Höglinger, Marc & Diekmann, Andreas, 2017. "Uncovering a Blind Spot in Sensitive Question Research: False Positives Undermine the Crosswise-Model RRT," Political Analysis, Cambridge University Press, vol. 25(1), pages 131-137, January.
    11. Maciej Berk{e}sewicz & Herman Cherniaiev & Robert Pater, 2021. "Estimating the number of entities with vacancies using administrative and online data," Papers 2106.03263, arXiv.org.
    12. Aaltonen, Katri & Vaalavuo, Maria, 2024. "Financial burden of medicines in five Northern European countries: A decommodification perspective," Social Science & Medicine, Elsevier, vol. 347(C).
    13. Ben Jann, 2007. "Making regression tables simplified," Stata Journal, StataCorp LP, vol. 7(2), pages 227-244, June.
    14. Keith Davis & Timothy Bell & Jacqueline Miller & Derek Misurski & Bela Bapat, 2011. "Hospital costs, length of stay and mortality associated with childhood, adolescent and young Adult meningococcal disease in the US," Applied Health Economics and Health Policy, Springer, vol. 9(3), pages 197-207, May.
    15. J. Michael Brick & Michael E. Jones, 2008. "Propensity to respond and nonresponse bias," Metron - International Journal of Statistics, Dipartimento di Statistica, Probabilità e Statistiche Applicate - University of Rome, vol. 0(1), pages 51-73.
    16. Antonio Páez, 2021. "Open spatial sciences: an introduction," Journal of Geographical Systems, Springer, vol. 23(4), pages 467-476, October.
    17. Atella, Vincenzo & Belotti, Federico & Depalo, Domenico & Piano Mortari, Andrea, 2014. "Measuring spatial effects in the presence of institutional constraints: The case of Italian Local Health Authority expenditure," Regional Science and Urban Economics, Elsevier, vol. 49(C), pages 232-241.
    18. David Roodman, 2022. "Schooling and Labor Market Consequences of School Construction in Indonesia: Comment," Papers 2207.09036, arXiv.org, revised Mar 2024.
    19. Jonathan Wakefield & Taylor Okonek & Jon Pedersen, 2020. "Small Area Estimation for Disease Prevalence Mapping," International Statistical Review, International Statistical Institute, vol. 88(2), pages 398-418, August.
    20. Sebastian Butschek & Jan Sauermann, 2024. "The Effect of Employment Protection on Firms’ Worker Selection," Journal of Human Resources, University of Wisconsin Press, vol. 59(6), pages 1981-2020.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0214262. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.