Error in using splithalf () of the package "splithalf"

22 Views Asked by At

I have a daily diary dataset, i.e. not consisting of RT or accuracy data. I want to calculate the Spearman Brown splithalf reliability, odd-even-method, for a single item called day_sitnumberneg. I've cleaned the dataset and computed an variable assigning each row either "even" or "odd", named "odd_even_between". However, there always occurs an error:

"error in splithalf(data = mds, outcome = "RT", score = "average", halftype = "random", : one or more of the conditions do not exist in the condition variable"

I've tried following guidelines (https://cran.r-project.org/web/packages/splithalf/readme/README.html; https://sdparsons.github.io/splithalf_documentation/examples.html) and a youtube-videos (https://www.youtube.com/watch?v=FhqyKxH4kyk) but I didn't manage to figure out why it doesn't work.

This is the code I've tried to run:

splithalf(data = mds,
          outcome = "RT",
          score = "average",
          halftype = "random",
          permutations = 5000, 
          var.compare = "odd_even_between",
          compare1 = "odd",
          compare2 = "even",
          var.condition = "odd_even_between",
          var.participant = "vp_initials",
          var.RT = "day_sitnumberneg")

This is the tibble mds:

vp_initials odd_even_between day_sitnumberneg
222002 odd 7
212003 even 2
222002 odd 4
212004 even 6
222002 odd 3
212003 even 4
212004 odd 1
212004 even 1

Thank you very much in advance!

0

There are 0 best solutions below