Conditional Branching for the summary


Conditional Branching for the summary

Author
Message
celeste
celeste
Esteemed Member
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)

Group: Forum Members
Posts: 21, Visits: 1

Dear Sean/Dave,


I have scripted a primed lexical decision task.  Where I have 24 primes ( 24 photos) - target (1 brandname) combinations.  I have scripted 24 different trials, so that I can determine which prime (photo) causes the smallest/shortest latency.  To obtain an higher reliability there are 3 blocks with the 24 prime-target combinations, so each prime-target is presented 3 times.  To obtain the mean latencies of each prime-target combination, I have added the 'totalmeanlatency' property - here is one example:


<text IdealismeBeterewereldreactie>
/ items= ("totalmeanlatency = <% trial.merk1IdealismeBeterewereld.totalmeanlatency %>")
/ valign = top
/ halign = right
/ position = (95%, 10%)
/ fontstyle = ("Agency FB", 1.56%, false, false, false, false, 5, 1)
/ txcolor = (255, 255, 255)
/ fontstyle = ("Arial", 5%)
</text>


It is very important that the participant in the summarypage sees the photo/prime with the shortest latency.  To do this I thought of scripting 24 different summaries with the condition that it will only show if the 'totalmeanlatency' of the trial is shorter than the 'totalmeanlatency' of the other 23 trials.


The summary blocks:


<block summary>
/ recorddata = false
/ branch = [if(trial.merk1IdealismeBeterewereld.totalmeanlatency < trial.merk1LoyaalMoreel.totalmeanlatency & trial.merk1VerbondenSamen.totalmeanlatency & trial.merk1WarmZorgzaam.totalmeanlatency & trial.merk1OrdeStructuur.totalmeanlatency & trial.merk1VeiligBeschermd.totalmeanlatency & trial.merk1OntspannenZorgeloos.totalmeanlatency & trial.merk1SpeelsPlezier.totalmeanlatency & trial.merk1OngebondenOnafhankelijk.totalmeanlatency & trial.merk1CreatiefFantasie.totalmeanlatency & trial.merk1IndividueelUniek.totalmeanlatency & trial.merk1OntdekkenNieuwsgierig.totalmeanlatency & trial.merk1VaardigTalent.totalmeanlatency & trial.merk1PrestatieVooruitgang.totalmeanlatency & trial.merk1UitdagingWinnen.totalmeanlatency & trial.merk1TrotsZelfverzekerd.totalmeanlatency & trial.merk1WaarderingErkenning.totalmeanlatency & trial.merk1AanzienPrestige.totalmeanlatency & trial.merk1BezitVerzamelen.totalmeanlatency & trial.merk1InvloedLeiderschap.totalmeanlatency & trial.merk1FitSportief.totalmeanlatency & trial.merk1GezondheidVoeding.totalmeanlatency & trial.merk1MooiSchoonheid.totalmeanlatency & trial.merk1SexyOpwindend.totalmeanlatency)) block.summaryIdealismeBeterewereld]
</block>


The block 'summary' directs to the block 'summaryIdealismeBeterewereld if 'trial.merk1IdealismeBeterewereld.totalmeanlatency' is smaller than the 23 other trial.merk1.....totalmeanlatency'


<block summaryIdealismeBeterewereld>
/ trials = [1=summaryIdealismeBeterewereld]
/ recorddata = false
/ branch = [if(trial.merk1IdealismeBeterewereld.totalmeanlatency > trial.merk1LoyaalMoreel.totalmeanlatency & trial.merk1VerbondenSamen.totalmeanlatency & trial.merk1WarmZorgzaam.totalmeanlatency & trial.merk1OrdeStructuur.totalmeanlatency & trial.merk1VeiligBeschermd.totalmeanlatency & trial.merk1OntspannenZorgeloos.totalmeanlatency & trial.merk1SpeelsPlezier.totalmeanlatency & trial.merk1OngebondenOnafhankelijk.totalmeanlatency & trial.merk1CreatiefFantasie.totalmeanlatency & trial.merk1IndividueelUniek.totalmeanlatency & trial.merk1OntdekkenNieuwsgierig.totalmeanlatency & trial.merk1VaardigTalent.totalmeanlatency & trial.merk1PrestatieVooruitgang.totalmeanlatency & trial.merk1UitdagingWinnen.totalmeanlatency & trial.merk1TrotsZelfverzekerd.totalmeanlatency & trial.merk1WaarderingErkenning.totalmeanlatency & trial.merk1AanzienPrestige.totalmeanlatency & trial.merk1BezitVerzamelen.totalmeanlatency & trial.merk1InvloedLeiderschap.totalmeanlatency & trial.merk1FitSportief.totalmeanlatency & trial.merk1GezondheidVoeding.totalmeanlatency & trial.merk1MooiSchoonheid.totalmeanlatency & trial.merk1SexyOpwindend.totalmeanlatency) noblock]
</block>


 - To be sure that the block 'summaryIdealismeBeterewereld' doesn't run if the 'trial.merk1IdealismeBeterewereld.totalmeanlatency' is higher than the other 23 'trial.merk1....totalmeanlatency' I have added the condition with 'noblock'


-  I have only added the / branch for the trial; IdealismeBeterewereld, but the block 'summary' should have 23 other / branch underneath for the other 23 trials.


Unfortunately I get an error when I try and run my script.  The error indicates that the /branch expressions in the  block 'summary' and the block 'summaryIdealismeBeterewereld' are invalid.  My questions are:


Is it even possible to script a conditional branch so that the summary wil only show if one 'trial.merk1....totalmeanlatency' is smaller than the other 23 'trial.merk1...totalmeanlatency? 


 If so, what have I scripted wrongly? I can only think of the if, &, < or > signs.


I really hope you understand what I am aiming for.  Please let me know if something is unclear and/or you need to see more of my script.  Your help would be very much appreciated!!


Kind regards,


Celeste



Dave
Dave
Supreme Being
Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)Supreme Being (678K reputation)

Group: Administrators
Posts: 9.8K, Visits: 46K

Your syntax is incorrect in several ways. Correct syntax is along the lines of


if (trial.a.totalmeanlatency > trial.b.totalmeanlatency && trial.a.totalmeanlatency > trial.c.totalmeanlatency && ...)


Also, I would rather use /skip than /branch.


Regards,


~Dave


celeste
celeste
Esteemed Member
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)

Group: Forum Members
Posts: 21, Visits: 1

Dave,


Thank you for your reply.  I have adjusted my script and so far so good!! :-)


Thank you again.


Celeste


GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search