I have an online study that presents participants with a sentence that they then respond to.
There is one key word within each sentence.
I have 10 sentences and 10 key words. I want to randomize which key word goes in which sentence, and then the order that the sentences appear in.
I thought I could do it like this:
- At the start of the experiment, create a list containing the 10 key words.
- Have an Excel file that has ten sentences.
- Embed a variable reference to my list in the sentences.
So, for example, at the start of the experiment have a code that does this:
keywords = ["cat", "dog", "snake"]
Then, each sentence in the Excel file would be something like this:
Jim saw the $keywords[trials.thisN][0] on the hill.
Sally found a $keywords[trials.thisN][0] on the porch.
What I end up getting is that each trial presents trials.thisN
.
Could someone explain what I’m doing wrong?