Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Redefine value in each trial
Redefine value in each trial
Post Reply
Like
132
Redefine value in each trial
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
skotturi
skotturi
posted 10 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 2,
Visits: 4
Dear Community,
I am trying to use the Prospective Time Estimation task provided by Inquisit.
Instead of just doing one trial at a fixed time interval of 53 seconds, I am trying to do multiple trials of random length.
Instead of using:
<values>
...
/timeinterval = 5300
</values>
I'm using:
<values>
...
/timeinterval = ceil(rand(45,75))*1000
</values>
To achieve a random time interval in between 45 & 75 seconds.
I'm currently just running two experiment blocks:
<expt >
/blocks = [1 = timeestimationstart, 2=
timeestimationstart]
</expt>
This works except that the time interval variable isn't reassigned the second time, so my interval is the same for both trials.
I have tried to force the reevaluation of the timeinterval variable:
<trial start>
/stimulustimes = [0=start, circle]
/timeout = [values.timeinterval = ceil(rand(45, 75))*1000]
/branch = [trial.end]
/recorddata = false
</trial>
But this fails with "Expression '[values.timeinterval' is invalid. Expression contains an unknown element or property name."
I could just hardcode a second timeinterval, a second trial and second variable to be exported but I'd prefer a more elegant solution.
It's been a while since I've coded much in Inquisit, been spending most of my time in python, js & R. Thus I'm undoubtedly over thinking this, I think...
The code I'm working with can be found here (the prospective task):
http://www.millisecond.com/download/library/TimeEstimation/
Cheers,
Sante
Tags
change
reevaluate
trial
value
variable
Reply
Like
132
Dave
Dave
posted 10 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 104K
#1:
Values are -- by design -- static. I.e. the expression in
<values>
...
/timeinterval = ceil(rand(45,75))*1000
</values>
will get evaluated once and then values.timeinterval will remain unchanged. It is supposed to.
#2:
This
<trial start>
...
/timeout = [values.timeinterval = ceil(rand(45, 75))*1000]
...
</trial>
is simply invalid syntax. The correct way to express it would be simply
<trial start>
...
/timeout = ceil(rand(45, 75))*1000
...
</trial>
#3:
The proper way to do this is
<values>
...
/timeinterval = 5300
</values>
<trial start>
...
/ontrialbegin = [values.timeinterval = ceil(rand(45, 75))*1000]
/timeout = values.timeinterval
...
</trial>
Reply
Like
121
skotturi
skotturi
posted 10 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 2,
Visits: 4
Great, that works and makes a lot more sense.
The /ontrialbegin method was just what I was looking for!
Cheers,
Sante
Reply
Like
135
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
132
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search