How to link Inquisit script and demographic script


Author
Message
Andrea Deme
Andrea Deme
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: 16, Visits: 34
The puzzling thing is that I do get different numbers as IDs, but all of them just seems to be even numbers (see attached), and I have no idea, why :(
The script must be okay, I think, as if I run it on the PC with odd and even numbers as IDs it changes the block order...
(And I  modified the launch page just as you instructed me to, but according to the huge numbers, it is working properly, i think...)
Attachments
IDs.png (848 views, 24.00 KB)
IATintroV2.txt (749 views, 40.00 KB)
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: 12K, Visits: 98K
Hmm, weird. (1) It is, of course, perfectly possible to receive multiple even ids in a row. Same thing as tossing a coin -- nothing prevents in from landing heads multiple times in a row. Over the long run, though, the expectation is approx. 50% heads and 50% tails, or as here: 50% odd and 50% even numbers. (2) It might be that your browser's JavaScript engine has a bug or bias in its Math.random() or Math.floor() implementation. Would be interesting to know if the same happens across different browsers or if changing the function to e.g.

function GetSubjectNumber()
{
    return (Math.round(Math.random() * 1000000000));
}

or

function GetSubjectNumber()
{
    return (Math.ceil(Math.random() * 1000000000));
}

makes any (systematic) difference.


EDITED TO ADD: It is usually not advisable to use Math.round() because it will lead to the resulting distribution being non-uniform.

Edited 10 Years Ago by Dave
Andrea Deme
Andrea Deme
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: 16, Visits: 34
yes, you are absolutely right about the multiple heads and tails, and that I shouldn't worry about this... I tried math.floor implementation again and multiple (5 or 6) odd numbers in a raw also occurred. than i tried ceil and seemed a tiny bit more balanced (but still, it was just 6 or 7 trials that is very impressionistic),
anyway, i'll  stick to that and thank you again for your time and effort! it was a huge help you just gave me!! :)
Andrea Deme
Andrea Deme
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: 16, Visits: 34
oh, you looked it up! great!!! thanks a lot!! :)
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: 12K, Visits: 98K
No problem. Note that I would generally recommend sticking with Math.floor(), which -- in theory -- should get you closest to a uniform odd/even distribution.

Andrea Deme
Andrea Deme
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: 16, Visits: 34
dear Dave, sorry, itts me again... the very same scripts and html that run perfectly a week ago just went rong and I cannopt find the reason why... I did not modify any important parts in the script. it's probably a typical issue, please see the error messagge and the scripts and html attached. could you help me out again?
Attachments
IATintroV2.txt (772 views, 40.00 KB)
error.png (866 views, 34.00 KB)
IATjorossz.exp (805 views, 21.00 KB)
batchIATdemog.exp (802 views, 73 bytes)
demographic.exp (867 views, 5.00 KB)
Tags
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: 12K, Visits: 98K
The error message indicates no subject id was passed to the script. In case of the IAT that's fatal as the counterbalancing of conditions (cf. the <variables> element) relies on it.

As to why that is, I cannot tell you based on the materials you provided. I would need the live link to the actual launch page.

Andrea Deme
Andrea Deme
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: 16, Visits: 34
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: 12K, Visits: 98K
Thanks for the link. There is nothing obviously "wrong" with the launch page code. That said, I am able to reproduce the error using the latest Firefox version / the NPAPI plugin, but not using Internet Explorer / ActiveX or ClickOnce.

My guess would thus be that Mozilla changed their plugin handling (again) recently, essentially breaking the way the subject id and other information is passed from the launch page to the plugin via. The only quick "fix" I can think of is to direct your participants to complete the study using Internet Explorer (which is fortunately present on every Windows system by default).

Over the long run, I would recommend at least considering upgrading to Inquisit 4, which provides support for modern platforms and browsers.

P.S.: I'll be looking into this more deeply, but that'll take some time. Oddly enough, the issue does not seem to occur with standard 3.0.6.0 launch pages generated via the Web Script Wizard, which suggests there is some (non-obvious) factor relating to the "custom" launch page you're using involved.

Edited 10 Years Ago by Dave
Andrea Deme
Andrea Deme
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: 16, Visits: 34
Uhh, oh my... I tried explorer as well and it did work... thank you very much, you saved my day again. And yes, I'll put some pressure on the head of department and ask for the upgrade to Inquisit 4. So you say simply changing the html would not solve the problem, right? 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search