Ashley1014 / qualtrics

The Javascript code to automate user selection behavior for a research on Qualtrics.
0 stars 0 forks source link

Power Strip Lottery Assignment: Note to Self #5

Open aunarang opened 2 years ago

aunarang commented 2 years ago

This is what I would do if I was to determine if the respondent wins the lottery before they even complete the survey.

lottery_assignment = ${rand://int/1:30}. There are 1 in 30 lottery winners. This is the assignment mechanism to determine lottery winner.

lottery_winner = 0 or 1. If lottery_assignment = 28, they win the lottery and this will be 1. Else, 0.

But I need determine lottery winner after survey is complete and it is verified that the respondent submitted a quality response. Therefore winner will not be determined by embedded data.

aunarang commented 2 years ago

lottery_assignment = ${rand://int/1:30} lottery_winner_no = ${rand://int/1:30} lottery_winner = 0 or 1; 1 if lottery_assignment = lottery_winner_no