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

Hi,

We have a bit of a complex question. We are trying to run an experiment which consists of presenting 360 shortclips that need to be rated using 3 different questions.

Currently, the ideal setup would be: Page 1 = present the stimuli
Page 2= Question 1
Page 3 = Question 2
Page 4 = Question 3

Currently what we tried was: setting a randomization to draw one random shortclip each time, followed by using loopToPage(), to create a certain amount of loops through these 4 pages, and also save the values for each questions separately. However this is not working very well.

Is there any solution to make this work?
The main thing we wanted to avoid is to have to create separate pages for each combo of Stim + 3 Questions.

Thank you very much!

in SoSci Survey (English) by s169050 (110 points)
>  However this is not working very well.

Please post you PHP code, used so far, and elaborate a bit on *what* is already working an *what* is not yet working. This will allow me for a much better answer then the general bla-bla I'd would have to write without the information :)
Hi, yes of course! Sorry for not doing it.

So, for the page in which the presentation stimulus happens, currently we have this code:

loopToPage('loopend', 2); #for now I'm looping 2x
$fragen = array(
  0 => array('VR03', 'VR06', 'VR07'), #first batch of questions
  1 => array('VR08', 'VR09', 'VR10'), #second batch of questions
);
registerVariable($fragen);

and for the 3 other pages with questions, we have:
$i = loopIndex();
$set = $fragen[$i];
question($set[0]);     #.... 1, and 2 for the subsequent ones.

What is working: The loop is happening twice, and the questions are correctly being saved separately for each time it loops.

What is not working: - Since I implemented this option of more question variables per loop, the shortclip selected at each loop is the same. And we need it to ramdonly present every video. The code for selecting the stimuli is the following:
if (value('RD01') > 0) {
 replace('%image%', 'RD01', 'response');
 html('<video autoplay>
        <source src="%image%" type="video/mp4">
       </video>');
}

- Also, I haven't managed to create a way to save the value of each shortclip shown. So each time the loop happens, the RD01 value is substituted, and we need to know which video was presented for the 3 questions.

I hope this helps! :)
Thanks a lot!

1 Answer

0 votes

the shortclip selected at each loop is the same.

If you like to present all 360 clips to each respondents (you do not really do that, do you?), you'll have to tell the random generator to draw 360 codes per interviews. The variables are then RD01x1 to RD01x360.

$ = loopToPage(...);
$randomID = id('RD', 1, $i + 1);
if (value($randomID) > 0) {
 replace('%image%', $randomID, 'response');
 html('<video autoplay>
        <source src="%image%" type="video/mp4">
       </video>');
}

Also, I haven't managed to create a way to save the value of each shortclip shown.

The random generator will do that for you.

HOWEVER ... if you're really plannnig to show more than 10 clips in an interview, use a multi-level-design for that. That will be much better than havon hundreds of variables in the dataset. Multi-Level Structure

by SoSci Survey (198k points)
edited by SoSci Survey
Hi,

Thank you for your help! I introduced the code you suggested, and the only thing I had to add to make it work is:

$randomID = id('RD', 1, $i+1);

otherwise it would get an error, because the loop count starts with zero. However, then I get the following error during the second time the loop runs:

In der Funktion id() wurde auf Variablen des Elements RD01 verwiesen. Dieses Element hat keine Variable(n) Nr. 2.

Do you know why this would not work?

We are at the same time trying to implement this using the Multi-Level Structure,  but we would stil appreciate your feedback.

Thank you!
> Do you know why this would not work?

Yes, the loopPage() will count in indices that start with 0, while the first variable in the random generator has an x1 (not x0) ni the end. I simply forgot the +1. Added now, so nobody will copy non-working code.
...