Tag Archives: psychological science

Data Sharing and Code Commenting: Best Practices for Graduate Students

Scientific computing has become increasingly important in psychological science research. However, proper data management and techniques related to analytic workflow are rarely directly taught to graduate students. This short piece highlights a few best practices for data sharing and code commenting that can be incorporated as a graduate student to facilitate data reproducibility and replicability.

Why Should I Share My Data and Code?

Based on concerns of poor self-correction in psychological science (Klein et al., 2018; Open Science Collaboration, 2015), much attention has been drawn to the replicability crisis, also known as the “credibility revolution” (Vazaire, 2018). Accordingly, the open science movement has strengthened the scientific community’s expectation of access to key components of research (e.g., protocols, resources, data, and analysis software code) in order to assess, validate, and replicate prior research (Ioannidis, 2012). Data sharing is one of several key practices research organizations and major funders have begun to mandate (Houtkoop et al., 2018). Despite this, data sharing remains quite rare in the psychological sciences, due to two primary reasons:

  • 1) a lack of knowledge on how to get started
  • 2) researchers are unaware of the benefits of data sharing or may not be confident in the quality of their data

Here, we will be focusing on the latter concern, however, for specific guidelines on how to prepare and share your data, see Klein et al. (2018).

Benefits of Data and Code Sharing

When a researcher makes their data and code widely available, they are, in effect, endorsing:

  • analytic reproducibility (i.e., statistical analyses that can be re-run to detect unintended errors or bias and verify the logic and sequence of data analysis steps; Hardwicke et al., 2018, Wilson et al., 2017)
  • analytic robustness (i.e., alternative analytic decisions that may be used to verify results)
  • analytic replication (i.e., replication of the same analytic steps with new data to investigate generalizability; Houtkoop, 2018)

Importance of Code Commenting

Data sharing should be, however, the bare minimum. Above and beyond this, making your data management and analysis code publicly available, requires that the code be readable (i.e., understandable) and reproducible. There are some basic scientific computing practices that ensure research is not just reproducible, but also efficient, transparent, and accessible in the future (Cruwell et al., 2019). As an example, one way to ensure analytic code can be easily understood, is to provide a detailed, commented version of the code. When you have to come back to modify or review the code you wrote weeks, months, or even years ago, will you be able to remember what you did and what that code means? Even more important, will other people be able to understand what you did? Within an open science framework, it’s essential for other people to be able to easily interpret your code for data quality checks and reproducibility. Although incorporating code comments may seem tedious at the time,  the long run benefits afforded to your future self, your peers, your co-authors, and other researchers in the field cannot be understated.

How to Comment your Code

Now that we covered the why, let’s talk about the what. Here are some concrete steps to take when addressing your code (adapted from Wilson et al., 2017). First, create a commented-out section, i.e., the “header”, at the top of your code. Here, create an overview of your project to self-reference. List the project title, filename, the co-authors, a description of the purpose (e.g., initialization, data cleaning, analysis) and any dependencies including required input data files, software version, and calendar date.

Then insert a table of contents that describes the sections of the code. An example table of contents can include:

  • 1) Loading in Data and Libraries
  • 2) Descriptive Statistics
  • 3) Preliminary Analysis
  • 4) Main Analysis for Aim 1
  • 5) Main Analysis for Aim 2
  • 5) Sensitivity Analysis
  • 6) Tables

Adjust this based on your project, your aims, and your workflow. It might also be helpful to include a list of all the variable names and a brief description of each variable in the dataset at the top of the code.

Next, it’s important to record all the steps used to process the data. Find out how to make a comment in the code in the software you are using (e.g., SAS, R). Place a brief explanatory comment at the start of a data step or analytic move.

***An example of commented out code in SAS:

/* Load in Library */
libname gradPSYCH 'N/project/APAGS/data';

/* Designate data */
data APAGS; set gradPSYCH.AGAPS; run;

/* See Contents of Data File */
proc contents data=APAGS; run;

If you carefully comment chunks of functionally-related code, i.e., writing out what you are doing and why, other researchers, and your future self, will be able to easily reproduce your data steps.

Final Thoughts

As a scientist, being committed to open science means engaging in responsible data management techniques, embracing transparency, and preparing your data for a reproducible research workflow. Publicly sharing data as well as a well-organized, carefully commented data management and analytic code that enables other researchers to engage in analytic reproducibility, analytic robustness, and analytic replication is a good start. Overall, these practices will also improve your personal research efficiency and external credibility.


References

  • Crüwell, S., van Doorn, J., Etz, A., Makel, M. C., Moshontz, H., Niebaum, J. C., Orben, A., Parsons, S., & Schulte-Mecklenbeck, M. (2019). Seven easy steps to open science: An annotated reading list. Zeitschrift für Psychologie, 227(4), 237-248. https://doi.org/10.1027/2151-2604/a000387
  • Hardwicke, T. E., Mathur, M. B., MacDonald, K. E., Nilsonne, G., Banks, G. C., Kidwell, M., … Frank, M. C. (2018, March 19). Data availability, reusability, and analytic reproducibility: Evaluating the impact of a mandatory open data policy at the journal Cognition. https://doi.org/10.1098/rsos.180448
  • Houtkoop BL, Chambers C, Macleod M, Bishop DVM, Nichols TE, Wagenmakers E-J. (2018). Data Sharing in Psychology: A Survey on Barriers and Preconditions. Advances in Methods and Practices in Psychological Science.;1(1):70-85. doi:10.1177/2515245917751886
  • Ioannidis, J. P. (2012). Why science is not necessarily self-correcting. Perspectives on Psychological Science7(6), 645-654.
  • Klein, O., Hardwicke, T. E., Aust, F., Breuer, J., Danielsson, H., Mohr, A. H., Ijzerman, H., Nilsonne, G., Vanpaemel, W., & Frank, M. C. (2018). A Practical Guide for Transparency in Psychological Science. Collabra: Psychology, 4(1), 20. https://doi.org/10.1525/collabra.158
  • Open Science Collaboration. Estimating the reproducibility of psychological science.Science349,aac4716(2015).DOI:10.1126/science.aac4716
  • Vazire S. (2018). Implications of the Credibility Revolution for Productivity, Creativity, and Progress. Perspectives on psychological science : a journal of the Association for Psychological Science13(4), 411–417. https://doi.org/10.1177/1745691617751884
  • Wilson, G., Bryan, J., Cranston, K., Kitzes, J., Nederbragt, L., & Teal, T. K. (2017). Good enough practices in scientific computing. PLOS Computational Biology, 13(6), e1005510. https://doi.org/10.1371/journal.pcbi.1005510

Conducting Social Justice Research

While social justice topics in psychological research are not novel, sociopolitical changes in recent decades have perhaps illuminated the need for the incorporation of social justice research in psychological science and practice. Social justice and advocacy are woven into every corner of our professional experiences – from our didactic and academic competencies to our clinical training and ethics codes. Psychological science is no exception.

Incorporating social justice topics into our research can seem like a difficult feat. Everywhere you look, there are systemic hurdles that may stand in your way of feeling comfortable and confident taking on social justice research. Maybe it’s the voice in your head telling you “this project isn’t going to be the one to dismantle oppression,” or perhaps it’s a belief that your research does not fit under the umbrella of social justice topics. In other cases, it may be a lack of formal training in conducting research that utilizes appropriate methodology to produce socially just outcomes and findings. However, as students in psychology, we hold the power to not only ask “what answers do we not have yet?” but to rephrase the question into “whose voice is missing from the narrative?”

Here are some starting points for the interested researcher who hopes to embark on social justice research.

Qualitative Methods

If you’re anything like me, digesting quantitative research may bring you comfort. Something about attaching numbers and statistics to your work can make your analyses feel supported and concrete. However, is hard to fully understand someone’s experiences, reactions, and thoughts through numbers alone. Narrative-based research, interviews, and other qualitative methods allow researchers to analyze participant perspectives and experiences through a richness of storytelling. Participants can provide context to their answers and can help develop insight around a phenomenon through exploratory methods, often imperative to social justice research. When the question is regarding whose voice has not been incorporated into the narrative yet, sometimes the best methods are the ones utilizing the voices themselves. After all, our research is what makes psychology a science, and qualitative methodologies are just as rigorous as quantitative.

In some qualitative methodologies, participating community members are welcomed as collaborators to contribute to the design, implementation, and outcomes of the research. Participatory Action Research (PAR) and Community Based Research are two such examples of this. These qualitative approaches to research emphasize the importance of community, understanding sociocultural structures, and action, making them excellent methods to utilize when conducting social justice research. Importantly, they empower the stakeholders of the community you are working with to be active participants in your research.

Me-Search

I first heard the term “me-search” when starting graduate school. The appeal of doing research on a topic that resonated with me, my experiences, and potentially the related experiences of others has since fueled my research endeavors throughout my academic career. I began to realize how disconnected I felt from the research I was digesting. Experiences I knew all too well were seemingly nowhere to be found in the existing literature. I have found that me-search has been a great way to incorporate social justice topics into my own research. As a biracial, queer, gender-expansive graduate student, researching topics and experiences I know first-hand provides me not only with an opportunity to ensure voices like mine are heard, but also allows me to feel connected with the research I conduct. To put it simply, sometimes when you consider whose perspective is missing from the narrative, the answer can very feasibly be “mine.”

However, it is important to emphasize the need for self-care when conducting me-search related to social justice topics. Not only does researching something you have personally experienced make it easier to bring your work home with you, but me-search can put you in the position to reflect on the ways in which you yourself are impacted by oppressive systems. Participating in self-care activities and avoiding burnout is important to ensure you are prioritizing your well-being and can approach your research with interest and enthusiasm. Whether it’s putting space between yourself and academia or finding comfort in the connectedness you feel with the communities you are researching, self-care is yours to define and is an important part of conducting socially just research.

Becoming a researcher and scientist in psychology can feel like a daunting task. Additionally, knowing your research can inform social change can feel intimidating. Our research has the potential to be utilized for advocacy, fight against oppressive forces, and promote well-being. I encourage you to keep looking for the holes in our current literature and to listen for those voices that call to you in need of being amplified.

Resources

Cokley, K., & Awad, G. H. (2013). In defense of quantitative methods: Using the “Master’s Tools” to promote social justice. Journal for Social Action in Counseling and Psychology, 5(2), 26-41.

Fassinger, R. E., & Morrow, S. (2013). Toward best practices in quantitative, qualitative, and mixed-method research: A social justice perspective. Journal for Social Action in Counseling and Psychology, 5(2), 69-83.

Frost, D. M. (2018). Narrative approaches within a social psychology of social justice: The potential utility of narrative evidence. In P. Hammack (Ed.), The Oxford Handbook of Social Psychology and Social Justice (pp. 83-93). New York, NY: Oxford University Press.

Kidd, S. A., & Kral, M. J. (2005). Practicing participatory action research. Journal of Counseling Psychology, 52, 187-195.

Levitt, H. M., Motulsky, S. L., Wertz, F. J., Morrow, S. L., & Ponterotto, J. G. (2017). Recommendations for designing and reviewing qualitative research in psychology: Promoting methodological integrity. Qualitative Psychology, 4, 2-22.

Paquin, J. D., Tao, K. W., & Budge, S. L. (2019). Toward a psychotherapy science for all: Conducting ethical and socially just research. Psychotherapy, 56(4), 491.

Ponterotto, J. G. (2005). Qualitative research in counseling psychology: A primer on research paradigms and philosophy of science. Journal of Counseling Psychology, 52, 136-136.


Posted by Sarah Kohnen, an APAGS Science Committee member and counseling psychology doctoral student at Chatham University. Feel free to reach out to Sarah with any questions you may have!

Increasing Research Transparency in Psychological Science: How Can Graduate Students Participate?

Written by: Michelle Rivers, Rachael Soicher, and Dr. Morton Ann Gernsbacher

  1. What is transparency in research, and why does it matter?

Research transparency, also referred to as “open science,” is the process of making research and its dissemination accessible to all levels of society. Practices that increase research transparency accelerate progress toward solving the persistent problems of society. For example, you may have heard about the “replication crisis” in psychology and other sciences. Engaging in open science practices can help make science more reproducible and thus more trustworthy.

As the field of psychology works toward greater research transparency, how can you get involved? In this post, we talk about some baby steps you can take as a graduate student, and we address some common challenges you may face along the way.

2. How can you get started?

Below we’ve crafted a short list of ways you can make your research more transparent. Think of baby steps. Don’t feel like you have to do all of them at once!

  • Pre-register your study design, hypotheses, and planned analyses. Place them in a locked file (hardcopy or electronically) or post them on free websites like AsPredicted or Open Science Framework.
  • Make your study materials, data, preprints, and post-prints publicly available online, such as on your lab’s website or on Open Science Framework.
  • Avoid “Questionable Research Practices,” such as selectively reporting dependent measures/entire experiments, revising your sample size after viewing your data, or so-called “HARKing” (hypothesizing after the results are known).
  • Take advantage of research collaborations. Do you have or need access to a particular demographic sample? Check out StudySwap or Psychological Science Accelerator, online platforms for research replication, collaboration, and resource exchanges.
  • Use free and open-source software so it’s easier for others to reproduce your exact methods and analyses. For example, OpenSesame and PsychoPy are open-source applications for running psychology experiments, LimeSurvey is open-source survey software, G*Power is free software for running power analyses, and R is free software for statistical computing and graphics
  • Practice disseminating your research to diverse audiences. For example, one of us, Michelle, manages a blog (cogbites.org) run by early-career academics that focuses on translating scientific research about the study of mental processes to a general audience. To learn more about science communication and outreach, consider applying to attend ComSciCon, a workshop for graduate students, by graduate students.
  • Stay informed! If you have an advanced stats or methods course in your program, encourage the instructor to include recent readings on research transparency. One of us, Morton, teaches an open-access active-learning Research Methods course, and you can find other teaching resources here. Consider starting a reading group with other students in your program!

Continue reading

Translating Psychology from the Classroom to the Community

By Rachel Moore and Michael K. Scullin (Baylor University)

Hi all! We’re Rachel Moore (student) and Michael Scullin (professor), and we are teaming up to show you how to go from being a student of psychology to an ambassador of psychology.

Across two class assignments in 2016, Baylor University students translated psychological science from the classroom to the community. The students collectively produced 15 community outreach projects on sleep health and 19 “news” videos on human cognition. Below we interweave the professor’s view and student’s view on the two classroom assignments.

Community Outreach Project on Sleep Health

Professor Says:

As a sleep researcher, I spend a lot of hours in the lab (not sleeping), without direct contact with the families who might benefit from my research. Therefore, I asked the local Children’s Science Museum if my lab could create a “pop-up” exhibit. For an entire day, we held a booth of sleep science activities and taught kids and their families about sleep. It was a lot of fun. I think we learned as much from the families as they did from us.  Following this transformational experience, I challenged students in my Sleep class to create an innovative, community-based outreach project that promoted sleep awareness.

Student Says:

The community outreach project intimidated me! It extended beyond the comfortable bubble of homework and tests, and I feared the impending face-to-face interaction with strangers. In the beginning, I remember thinking I was in no position to interrupt people’s lives with some information I learned in classes—why would they want to listen to me?  Understanding that friends, family, other students, or strangers may exist on the receiving end of our work raised the stakes to convey information as clearly and effectively as I could. So we had to buckle down and ask ourselves, “What do we find important? Who should know this information? How will we share?”

Continue reading

Writing About Psychological Science for the General Public

REPOST from the APA Psychological Science Agenda | November 2015

From The Science Student Council

Writing about psychological science for the general public

Considerations and strategies for effectively sharing your research with the world.

By Daniel R. Rovenpor

Imagine the following scenario: You spent years working on a project that aimed to produce a novel data-driven insight into a problem in the world. Then, with some luck, your work is successful and your insight gets published in a prestigious academic psychology journal. You hope that many people will see your article and learn about your insight, but you know that the chances are slim that the average person will see your article in an academic journal. This discrepancy between psychology’s potential to do good in the world and the fact that only a small fraction of the world’s population reads our journals is often frustrating. How can psychological scientists communicate to a broad audience? There are a number of ways to do this, including teaching, community outreach and advocacy. This article focuses on another way: writing for the general public.

Read more….