web study has very small ratio of people that seem to be able to do it


web study has very small ratio of people that seem to be able to do it...
Author
Message
audiosophy
audiosophy
Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)
Group: Forum Members
Posts: 62, Visits: 212
Oh on the contrary, I'm sure it is I that is missing something ;) 

If I do that, it will select 1 of 3 groups will it with no replacement? I thought random was properly random, as in no way (on first glance) to specify a random number between an integer (in this case between 1 and 3) ? 

Yes that would be much easier if that is all there is to it. 

Just out of interest though, something like the code I sent before would also work to achieve the same thing?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
The group number will be random, not constrained to values 1, 2 and 3. That, however, does not matter. See:

https://www.millisecond.com/forums/Topic13856.aspx

In short, your script takes the random number modulo n (where n is the number of conditions as in "1 of 3") to determine which of the n conditions to assign. Simple modulo arithmetic. 1 mod 3 = 1 -> 1st condition. 2 mod 3 = 2 -> 2nd condition. 3 mod 3 = 0 -> 3rd condition. 4 mod 3 = 1 -> 1st condition... 12887 mod 3 = 2 -> 2nd condition.

And yes, three <batch> elements would have worked as well, but seems entirely unnecessary (unless I'm missing something).

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Oh, and I should add that you can also set your web experiment to generate group ids *sequentially* in case you're more comfortable with that. That amounts to pretty much the same thing your PHP script is intended to achieve.

Edited 9 Years Ago by Dave
audiosophy
audiosophy
Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)
Group: Forum Members
Posts: 62, Visits: 212
Ah yes when I first saw the stuff about the modulo arithmetic, I didn't really know how that could be used to generate appropriate group numbers, but that makes complete sense to me now and is all working. I have my spss syntax recoding those sometimes 6 figure group numbers into my three groups that can be used for analysis. 

COMPUTE group_code=MOD(group-1, 3) +1.
EXECUTE.

group_code is the new variable generated that is either 1, 2, or 3. 



audiosophy
audiosophy
Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)Guru (8.6K reputation)
Group: Forum Members
Posts: 62, Visits: 212
And thanks again Dave, much appreciated. The support you guys offer is top notch. 
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Great to hear everything seems to be working now. Thanks for letting me know and thanks for sharing your SPSS syntax with others as well.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search