StatsTools

### Current Publications with Papaja

Heyo! Frederik, the author of papaja, requested that we update him with papers written with his package. I was like, oh man, like the whole lab?! So, I decided that I could probably make it easy by making a table here. Obviously, this table is current at the moment, as I hope many of the ones under review will get accepted, and I have several others that we will start writing soon. I only listed ones here you could find the actual .Rmd if you went to the links provided. Github is linked to each of these OSF pages as well.

Methods to Detect Low Quality Data and Its Implication for Psychological Research https://osf.io/x6t8a/ https://osf.io/cv2bn/ 10.3758/s13428-018-1035-6
Does the Delivery Matter? Examining Randomization at the Item Level https://osf.io/gvx7s/ https://osf.io/p93df/ accepted pending small revisions
Beyond p-values: Utilizing Multiple Estimates to Evaluate Evidence https://osf.io/u9hf4/ https://osf.io/9hp7y/ revision to resubmit
Perceived Grading and Student Evaluation of Instruction https://osf.io/jdpfs/ https://osf.io/7x4uf/ revision to resubmit
Investigating the Interaction between Associative, Semantic, and Thematic Database Norms for Memory Judgments and Retrieval https://osf.io/y8h7v/ https://osf.io/fcesn/ under review
Bulletproof Bias? Considering the Type of Data in Common Proportion of Variance Effect Sizes https://osf.io/urd8q/ https://osf.io/cs4vy/ under review
The LAB: Linguistic Annotated Bibliography https://osf.io/9bcws/ https://osf.io/h3bwx/ under review
English Semantic Feature Production Norms: An Extended Database of 4,436 Concepts https://osf.io/cjyzw/ https://osf.io/gxbf4/ under review
A Meta-Analysis of Expressive Writing on Positive Psychology Variables and Traumatic Stress https://osf.io/4mjqt/ https://osf.io/u98cw/ under review
The N400’s 3 As: Association, Automaticity, Attenuation (and Some Semantics Too) https://osf.io/h5sd6/ https://osf.io/6w2se/ under review
Focus on the Target: The Role of Attentional Focus in Decisions about War https://osf.io/r8qp2/ https://osf.io/9fgu8 under review
An Extension of the QWERTY Effect: Not Just the Right Hand, Expertise and Typability Predict Valence Ratings of Words https://osf.io/zs2qj/ https://osf.io/k7dx5/ under review
Modeling Memory: Exploring the Relationship Between Word Overlap and Single Word Norms when Predicting Relatedness Judgments and Retrieval https://osf.io/j7qtc/ https://osf.io/qekad/ writing
Outrageous Observations: The Redheaded Stepchild of Data Analysis https://osf.io/52mqw/ writing
Moral Foundations of U.S. Political News Organizations https://osf.io/5kpj7/ writing
A Validation of the Moral Foundations Questionnaire and Dictionary https://osf.io/kt9yf/ writing

You can also check out the YouTube for the couple of videos I’ve made on papaja and markdown.

### New Publication: Texting

One more announcement! We just had a new publication accepted:

“Textisms”: The Comfort of the Recipient: This paper was an *undergraduate* honors thesis that Flora-Jean and I finally got accepted! She did a great job making sure this paper was completed and published.

You can check out the materials here: https://osf.io/8kt52/

You can view the pre-print: https://osf.io/ptf7c/

We should have the real print up soon! Just waiting on the journal now.

Abstract: The purpose of this study was to determine whether certain textisms (texting cues) were perceived as more comfortable than others, both in the context of conversation as well as with regards to the general perception of the textism. Participants were assigned to one of two conversations and were asked to rate how comfortable they would feel after each statement in a conversation. Next, they were all asked to rank the general comfort ratings of each textism. We predicted that participants would feel more comfortable with the usage of emoticons (a smiley face) and initialisms (JK), whereas they would feel less comfortable with typographical symbols (…) and capital letters (WHAT) in general, as well as in the context of a conversation. Results indicated that, globally and in the context of a conversation, participants perceive initialisms and emoticons as more comfortable and typographical symbols and capital letters as less comfortable.

### New Publications

Just wanted to do a quick post to say that the Nature Human Behavior response paper, Justify Your Alpha is now online at NHB’s website: Springer – it is free to view but not download. You can download the PDF version on OSF.

We’ve submitted a couple new papers as well – updated those on my research publications page. I also have a couple more to get done – hoping to feature some of the cool coding work I’ve done this week after taking a breather from a seriously packed week. I’ve reached my revise and resubmit limit … five total: 1 accepted, 1 under review again, 3 editing. With two invited papers due in April and a big conference, I might implode!

### New Publication – Detect Low Quality Data

My coauthor John Scofield and I just had a publication accepted at Behavior Research Methods – you can check out the publication preprint at OSF.

We thew together a website for the paper that summarizes everything we found, as well as puts all the materials together in one place – check it out.

We create a really nice R function to help you detect low quality data, which you can find on GitHub, and I even made a video that explains all the parts to the function at YouTube.

If you aren’t a R person, you can use our Shiny App, download the code, and watch the YouTube video that explains everything to you.

Enjoy!

### Citations in R Markdown + Papaja

Heyo! I wanted to write a post about some of the quirky things I’ve found with writing manuscripts in R Markdown, as well as provide a solution to a problem that someone else might be having.

Update: The csl file I describe below is a special formatted one, which was shared with me. You can download it from GitHub to try the suggestions below.

Update 2: Turns out, potentially, the suggestions from the manual are not working correctly, as Frederik has checked it out and opened an issue on github. I’ll write a new post when there are updates!

First, let me tell you how much I love Frederik Aust’s papaja package for R. I had been trying to integrate open science and transparency in our lab, which was helped by the switch to R to track what we were doing in our data analysis. I heard about papaja through a former student, and I jumped in head first. I know it’s helped us think a LOT about reproducibility and replication, as we want people to be able to track what we did and avoid p-hacking in our papers. Having a workflow that is integrated throughout the manuscript really forces you to think about how you are presenting your data and knowing that others can view it especially forces you to be clear about what you did. We’ve fully embraced working transparently through Open Science Foundation integration, much of work in on GitHub, and we are writing manuscripts with papaja to make it more obvious what is what.

Before doing that, I had started learning markdown, and although I’ve been using it for a bit now, I still feel like a noob. Mix LaTeX in there, and even more so. Thankfully, I have some very awesome twitter friends that help me when I get stuck in trying to do something … like trying to stick a % symbol in a column name for a table. Whew. One thing I wish were a little bit different is citations. Currently, papaja using pandoc-citeproc to create the text referencing for knitting to PDF or Word.

The problem with this is that any time you have the same author last names (like Erin Buchanan and Tom Buchanan), you automatically get E. Buchanan and T. Buchanan in the in-text referencing. That is APA style but reviewers and the like do not like it. Real APA != to Used APA. The other issue stems from the fact that you will get the the first initials, even if the other author name match is in second or third place. Therefore, if I cite myself and cite Tom but he only appears as second author, I will still get E. Buchanan in the in text citation. That’s probably also a correct interpretation of APA but ain’t worth fighting reviewers over. Additionally, the absolute name matching often forces us to fix bibtex files a lot over things like Buchanan, E. versus Buchanan, E.M. versus Buchanan, Erin etc. Many different permutations of one person’s name via differences in doi citations can be tedious to fix.

Therefore! I checked out the papaja manual – which is stellar – to see if there was some other way to do it. I also googled this, but really got stuck with the translation of latex to markdown. The manual suggests you can do this:

---
output:
papaja::apa6_pdf:
citation_package: biblatex
---

To pass the citations through a different processor. Great! I will try that.

Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c.
Latexmk: applying rule 'biber QWERTY'...
Rule 'biber QWERTY': File changes, etc:
Non-existent destination files:
'QWERTY.bbl'
------------
Run number 1 of rule 'biber QWERTY'
------------
------------
Running 'biber  "QWERTY"'
------------
INFO - This is Biber 2.7
INFO - Logfile is 'QWERTY.blg'
ERROR - QWERTY.bcf is malformed, last biblatex run probably failed. Deleted QWERTY.bbl
INFO - ERRORS: 1
Latexmk: biber found malformed bcf file for 'QWERTY'.
I'll ignore error, and delete any bbl file.
Rule 'pdflatex': File changes, etc:
Non-existent destination files:
'QWERTY.pdf'
------------
Run number 1 of rule 'pdflatex'
------------
Biber error: [427] Utils.pm:180> ERROR - QWERTY.bcf is malformed, last biblatex run probably failed. Deleted QWERTY.bbl
Latexmk: applying rule 'pdflatex'...
------------
Running 'pdflatex  -halt-on-error -interaction=batchmode -recorder  "QWERTY.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
Latexmk: Non-existent bbl file 'QWERTY.bbl'
No file QWERTY.bbl.
=== TeX engine is 'pdfTeX'
Biber error: [427] Utils.pm:180> ERROR - QWERTY.bcf is malformed, last biblatex run probably failed. Deleted QWERTY.bbl
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 1
Refer to 'QWERTY.log' for details
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
! LaTeX Error: Command \c@author already defined.
Or name \end... illegal, see p.192 of the manual.

Execution halted

Balls. I searched this error for a while and found: 1) update LaTeX: check, 2) figure out why your bibtext was messed up: check … tried with only one reference and still crashed, and 3) other stuff I don’t remember. When I tried a separate markdown, thinking the one that I had open was the problem, I got the actual citation codes, rather than the text:

Researchers discovered that online data collection can be
advantageous over laboratory and paper data collection, as it
is often cheaper and more efficient (Ilieva2001;Schuldt1994;Reips2012)

I thought maybe it was my computer, so one of my coauthors tried it. Same as the first error. Maybe it’s a mac thing? Another coauthor with a mac, got the second error. I’m sad to say that I don’t have an answer for either of these problems – from the looks of it, I’m following the guidelines suggested, but both problems pop up. I would love to hear if you know why.

Enter Julia! Julia helped find a work around for the issue. In the head of your markdown file (note I used some … to shorten some of what papaja does for you automatically):

...
bibliography      : ["q_bib.bib"]
...
output            : papaja::apa6_pdf
replace_ampersands: yes
csl               : apa6.csl
---

And then be sure to put the apa6.csl in the same folder as your markdown. Now, you can confuse people with all your Buchanans, Logans, Cohens, and Fritzs. Or, in our case, we can make Reviewer #2 happy and annoy the copy editor.

Note: I had to update papaja to get this solution to work, as the replace ampersands did not work the first time.