Random Questions

Discussions about CSEntry
Post Reply
MNBS
Posts: 9
Joined: January 28th, 2016, 2:21 pm

Random Questions

Post by MNBS »

Hi everyone,
I want to start by thanking the users of this forum. It is a huge help for me :).

Basically,what I want to do is asking respondents which of two options they prefer, where each option has a number of different attributes that vary randomly.
For example, if we were asking about which car a person preferred we might include color, type of engine, fuel consumption, and price as four attributes. For color, there would be two levels of the attribute — white and black — but for price we might specify 10 different prices (25k, 30k, 35k, 40k, etc.).
We would then have the computer randomly generate two profiles based on the specified attributes and ask the respondent which of these two he would be most likely to choose.

Is it possible to do that on CSPro ?
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Random Questions

Post by josh »

It should be possible but you will need to write some logic. I would make an array for the possible values of each attribute and then use the random function to generate a random index to each array. So if you have 10 prices you would make an array of prices and then generate a random number between 1 and 10 and use that index into the array. Then you would combine the results of the attributes into a string to create the first profile and then do the same to generate the second profile. Then you can use the setvalueset function to show the two profiles that the user should choose.
Post Reply