Values are not working?


Author
Message
Claud_l
Claud_l
Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)Associate Member (95 reputation)
Group: Forum Members
Posts: 7, Visits: 45
Hi Everyone,
I am very new to Inquisit so am not to sure what I am talking about and am hoping my query has a very easy solution.

In my experiment participants experience a trial where they indicate if a smell was present or absent. They press "a" if absent and "s" if present. I created 4 variables in my values section: hit, miss, correctrejection, falsealarm. These variables should store whether a subject correctly reported the smell when it was present (hit) or missed it when it was present (miss) or whether they correctly reported the smell to be absent when it was absent (correctrejection) or report the smell to be present when it was absent (falsealarm). I hope this makes some sense.
My code is down below:

<trial present>
/ ontrialbegin = [values.present="present";]
/ stimulustimes = [1900=text.presentabsent]
/ validresponse = (31,30)
/ correctresponse = (31)
/ response = timeout(5900)
/ correctmessage = true(text.correctmsg, 500)
/ ontrialend = [
    if(trial.present== 31){
        values.hit +=1
    }
    if(trial.present== 30){
        values.miss +=1
    }
]
</trial>


<trial absent>
/ ontrialbegin = [values.present="absent";]
/ stimulustimes = [1900=text.presentabsent;]
/ validresponse = (31,30)
/ correctresponse = (30)
/ response = timeout(5900)
/ correctmessage = true(text.correctmsg, 500)
/ ontrialend = [
    if(trial.absent == 31){
        values.falsealarm +=1
    }
    if(trial.absent == 30){
        values.correctrejection +=1
    }
]
</trial>


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
Claud_l - 1/13/2022
Hi Everyone,
I am very new to Inquisit so am not to sure what I am talking about and am hoping my query has a very easy solution.

In my experiment participants experience a trial where they indicate if a smell was present or absent. They press "a" if absent and "s" if present. I created 4 variables in my values section: hit, miss, correctrejection, falsealarm. These variables should store whether a subject correctly reported the smell when it was present (hit) or missed it when it was present (miss) or whether they correctly reported the smell to be absent when it was absent (correctrejection) or report the smell to be present when it was absent (falsealarm). I hope this makes some sense.
My code is down below:

<trial present>
/ ontrialbegin = [values.present="present";]
/ stimulustimes = [1900=text.presentabsent]
/ validresponse = (31,30)
/ correctresponse = (31)
/ response = timeout(5900)
/ correctmessage = true(text.correctmsg, 500)
/ ontrialend = [
    if(trial.present== 31){
        values.hit +=1
    }
    if(trial.present== 30){
        values.miss +=1
    }
]
</trial>


<trial absent>
/ ontrialbegin = [values.present="absent";]
/ stimulustimes = [1900=text.presentabsent;]
/ validresponse = (31,30)
/ correctresponse = (30)
/ response = timeout(5900)
/ correctmessage = true(text.correctmsg, 500)
/ ontrialend = [
    if(trial.absent == 31){
        values.falsealarm +=1
    }
    if(trial.absent == 30){
        values.correctrejection +=1
    }
]
</trial>


Your syntax is of. It ought to be

<trial present>
/ ontrialbegin = [values.present="present";]
/ stimulustimes = [1900=text.presentabsent]
/ validresponse = (31,30)
/ correctresponse = (31)
/ response = timeout(5900)
/ correctmessage = true(text.correctmsg, 500)
/ ontrialend = [
  if(trial.present.response== 31){
   values.hit +=1
  }
  else if(trial.present.response== 30){
   values.miss +=1
  }
]
</trial>

and so forth.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search