web id questions


Author
Message
sdubrow
sdubrow
Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)Distinguished Member (4.3K reputation)
Group: Forum Members
Posts: 26, Visits: 143
Hello,

I have a couple questions regarding ids for web experiments. I couldn't find details about sequential id generation. I assume it starts from 1 and is based on starting but not necessarily completing the experiment? That is, if 3 people start the experiment before anyone completes it, will they be assigned 1, 2 and 3? Also, is there any way to have that sequence restart within the same registered web script (e.g., by updating it)? Essentially, I'd like to have subject ids 1-8 repeat multiple times. Is the only way to so through a custom javascript? Or can you set random selection within some range?

Thanks!
Sarah


Tags
Dave
Dave
Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)Supreme Being (965K reputation)
Group: Administrators
Posts: 11K, Visits: 74K
Thanks for the clarification. The solution would indeed be to perform a simple computation on the subject number, specifically using a bit of modulo arithmetic. With 8 conditions, you'd do:

<include>
/ precondition = [mod(script.subjectid,8) == 1]
/ file = "/Users/dubrow/Documents/conflictBound/list1.txt"
</include>

<include>
/ precondition = [mod(script.subjectid,8) == 2]
/ file = "/Users/dubrow/Documents/conflictBound/list2.txt"
</include>
...
<include>
/ precondition = [mod(script.subjectid,8) == 0]
/ file = "/Users/dubrow/Documents/conflictBound/list8.txt"
</include>

Hope this helps.

Edited 5 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search