Skip to content
Discussion options

You must be logged in to vote

Hi @t-09,

The problem here is that this chunk of code runs before the experiment starts:

var main_procedure = {
            timeline: [titration_procedure, effort],
            timeline_variables: [
                {effort_A: 2, effort_B: generateMaxEff(), offer_A: 33, offer_B: 72, is_effort_required: false},
            ],
            // randomize_order: true       
        }

Which means that generateMaxEff() is called before any data exist.

Since you are computing this value dynamically I'm not sure if you need to use a timeline variable. Could you just do something like this instead?

var titration_procedure = {
            type: 'html-button-response',
            choices: function (){

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@t-09
Comment options

Answer selected by t-09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants