Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

0 votes

I want to randomize my stimuli. Each stimulus contains an audio file and a question that is unique for each audio file. So when I randomize the order of my stimuli, I want the audio files and questions that are embedded on the same page to stay together. How can I randomize the pages without questions and audio files mixing? From what I can see in Randomization, I can only find randomization options for respectively questions, texts and media files, but what about when these are combined and should stay combined as they are?

in SoSci Survey (English) by s175567 (225 points)

1 Answer

0 votes
 
Best answer

You will have to display the stimulus via PHP code (not with the HTML code option directly in the random generator).

If you have the PHP IF-filter that displays the proper stimulus, you can simply copy the filter and display something else (e.g., a question), using the same random code.

by SoSci Survey (198k points)
selected by s175567
Thank you for your answer! I am not quite steady on PHP code. Can you confirm if this is what you had in mind when mentioning the IF-filter to display both audio and question?

$number = value('RG01');
 
if ($number == 1) {
  text('stimulusA');
  question('AB01');
} elseif ($number == 2) {
  text('stimulusB');
  question('AB01');
} elseif ($number == 3) {
  text('stimulusC');
  question('AB02');
} elseif ($number == 4) {
  text('stimulusD');
  question('AB02');
}

Would I get the same results if I randomize pages instead? I'm thinking that would be easier – and I am afraid I don't quite understand how I ensure that the same stimulus + question doesn't appear twice with Randomization with PHP code on page https://www.soscisurvey.de/help/doku.php/en:create:randomization-question.
Yes, that is a suitable PHP code.

> Would I get the same results if I randomize pages instead?

That is another option, although it is not necessarily easier.

>  I am afraid I don't quite understand how I ensure that the same stimulus + question doesn't appear twice

Are we talking about randomization (display one stimulus per interview) or rotation (display all, but in random order)?
Aha, I am probably aiming for rotation. I want to display all, but in random order. I already have experimental groups with a set stimuli per experimental group (that an interviewee is randomly assigned to by use of questionnaire randomization: one questionnaire per group). I have two blocks of stimuli per interview. The blocks should be in fixed order, but the stimuli within each block should be in random order. I think using setpageorder() would be fine if I'm only interested in a rotation of pages? Is it fine to use the same page IDs across different questionnaires?

For example:

$pages = array('PA', 'PB', 'PC', 'PD', 'PE');
shuffle($pages);
$pages[] = 'PX';
setPageOrder($pages);
> I want to display all, but in random order.

Than you will need a separate question (copy) for each stimulus.

And yes, in that case rotationg questions is the better option. But, please use a random generator - it's much easier than shuffle(). We will take care to translate the respective manual soon: https://www.soscisurvey.de/help/doku.php/de:create:rotation-pages
I have used shuffle() as above, and it works fine. Are there any drawbacks to shuffle() other than being "more difficult"? And is it OK to use the same page IDs (e.g. P1, P2, P3) in different questionnaires as the IDs are collected locally within the questionnaire, or do I have to use different page IDs across the questionnaires?

I see there is something about the random values not being stored when using shuffle(), but I can't really grasp what the random values are? This isn't something I necessarily need in my data collection is it? I am not investigating sequence effect, only trying to limit it.

Thank you again!
> Are there any drawbacks to shuffle() other than being "more difficult"?

You won't have the presentation order during analysis, should you need it. And you should not allow for a "back" button, because people were able to re-rotate the pages, if they visited the page again - as long as you do not use `registerVariable()`. That's all, only little things that make the whole thing a bit more vulnerable for non-intended behavior.

> And is it OK to use the same page IDs (e.g. P1, P2, P3) in different questionnaires as the IDs are collected locally

The page IDs are not collected (in the sense of "collected data") at all, so you ca use the same in different questionnaires.

> This isn't something I necessarily need in my data collection is it?

Usually not, but some people make a big fuzz about it (although most of them never actually run analyses on the presentation order).
...