# Randomizing events

This is my first experiment with SuperLab, and I am unsure how to use it to maximum effect.

I have an experiment where a trial comprises a product and price. Each product has 4 different prices associated with it, but only one of those prices is shown in a given trial. There are 20 products, so a total of 80 trials - each product is shown 4 times, with one of its different prices each time. These four trials with a single subject should not be run consecutively. This is where I have trouble randomizing from the stimulus lists. Basically I need two randomizations: 1. Which object is selected for the trial; 2. Which price is shown for that product.

So: a) Can I use a single stimulus list of 20 products, then 20 stimulus lists of 4 prices (one list for each product), when I do not want all 4 prices of a single product shown consecutively (unless by chance)? Each product will appear 4 times, but randomly through the experiment. If I define the product as a trial, then price as the event, I think it will run through all for 4 prices once it has chosen a product. I do not want this.
b) With half the objects I want to show the product first, and with the other half, show the price first. If the price is shown first, the product must still have been selected a priori, since each product has a different set of 4 prices. For the price-first scenario, can I get SuperLab to select the product, then the price, but show the price first?

As a further complication, I want to run exactly the same experiment with 5 different subjects. Can I save the selection order made with the first subject, and repeat it exactly with 4 others, then do a new order with 5 more, etc.

Thanks for your time and help.

We are working on a sample experiment. It should be posted in the next day or two.

The sample experiment attached uses 3 products and 4 prices. There are tracing events in the experiment to check that the codes are working correctly. Feel free to delete these.

A code was created named “Last Product Presented”. There are as many code levels as there are products. In this case we have Product 1, 2, and 3.

Block Level

• Three macros were created, one for each product
• For each [B]Expression[/B] SuperLab is "using only the last 1 trials in the block and Trials marked with code "Last Product Presented" equal to "Product 1, 2 or 3"
• Under the [B]If True[/B] tab it needs to state "Change value of code "Last Product Presented" to "Product 1, 2 or 3" in all trials in this block"

Trial Level

• An expression is created for each product. The conditional expression needs to be created for the "Current trial's code "Last Product Presented" is[B] not set[/B] to Product 1, 2, or 3"

Event Level

• An event needs to be created for each product
• A stimulus list is used for the prices
• Feedback is needed for every product event. It provides feedback, [B]Always, at the end of the event[/B], to "Change value of code "Last Product Presented" to "product 1, 2, or 3"

mhc exp…sl4 (8.66 KB)