SearcharxivSearch

arXiv subjects

Daniel McCaffrey

Publications and source records attributed to Daniel McCaffrey.

2 recordsLinked to original sources

A tutorial for using propensity score weighting for moderation analysis: an application to smoking disparities among sexual minority adults

Objective. To provide step-by-step guidance and STATA and R code for using propensity score (PS) weighting to estimate moderation effects. Research Design. Tutorial illustrating the key steps for estimating and testing moderation using observational data. Steps include (1) examining covariate overlap across treatment groups within levels of the moderator, (2) estimating the PS weights, (3) evaluating whether PS weights improved covariate balance, (4) estimating moderated treatment effects, and (5) assessing sensitivity of findings to unobserved confounding. Our illustrative case study uses data from 41,832 adults from the 2019 National Survey on Drug Use and Health to examine if gender moderates the association between sexual minority status (e.g., lesbian, gay, or bisexual [LGB] identity) and adult smoking prevalence. Results. For our case study, there were no noted concerns about covariate overlap and we were able to successfully estimate the PS weights within each level of the moderator. Moreover, balance criteria indicated that PS weights successfully achieved covariate balance for both moderator groups. PS weighted results indicated there was significant evidence of moderation for the case study and sensitivity analyses demonstrated that results were highly robust for one level of the moderator but not the other. Conclusions. When conducting moderation analyses, covariate imbalances across levels of the moderator can cause biased estimates. As demonstrated in this tutorial, PS weighting within each level of the moderator can improve the estimated moderation effects by minimizing bias from imbalance within the moderator subgroups.

stat.AP

Best Practices in Statistical Computing

The world is becoming increasingly complex, both in terms of the rich sources of data we have access to as well as in terms of the statistical and computational methods we can use on those data. These factors create an ever-increasing risk for errors in our code and sensitivity in our findings to data preparation and execution of complex statistical and computing methods. The consequences of coding and data mistakes can be substantial. Openness (e.g., providing others with data code) and transparency (e.g., requiring that data processing and code follow standards) are two key solutions to help alleviate concerns about replicability and errors. In this paper, we describe the key steps for implementing a code quality assurance (QA) process for researchers to follow to improve their coding practices throughout a project to assure the quality of the final data, code, analyses and ultimately the results. These steps include: (i) adherence to principles for code writing and style that follow best practices, (ii) clear written documentation that describes code, workflow and key analytic decisions; (iii) careful version control, (iv) good data management; and (iv) regular testing and review. Following all these steps will greatly improve the ability of a study to assure results are accurate and reproducible. The responsibility for code QA falls not only on individual researchers but institutions, journals, and funding agencies as well.

stat.CO