The well-known Preacher and Hayes macros for performing a bootstrapped test of mediation are designed to work only with SPSS or SAS. Those statistics packages are fine, but I prefer Stata. In this post, I provide Stata code for performing the Preacher and Hayes test. Continue reading “Stata code for performing the Preacher and Hayes bootstrapped test of mediation”
Searching through Strings in Stata
In Stata, I needed to search some string values. I couldn’t use regular expressions because the strings I’m working with happen to contain regexp control characters. The following Stata code accomplishes the task without regular expressions: Continue reading “Searching through Strings in Stata”