Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Between subject design - Relevance equation

  • tischer_s
  • tischer_s's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108629 by tischer_s
Dear community,

I am currently building a quite big questionnaire for my master thesis.

Within this thesis I have 3 treatmens conaining of 6 question groups and several questions:

t1_pp t1_q t1_v t1_n t1_k
t2_pp t2_q t2_v t2_n t2_k
t3_pp t3_q t3_v t3_n t3_k

Now it is necessary that one user only gets one treatment collection (t1 or t2 or t3) shown.

The selection which treatment is shown should be randomized.

So for example:

user 1: t3_pp t3_q t3_v t3_n t3_k
user 2: t2_pp t2_q t2_v t2_n t2_k
user 3: t2_pp t2_q t2_v t2_n t2_k
user 4: t1_pp t1_q t1_v t1_n t1_k
...

The survey is set that question groups are shown.

Unfortunately I am not confident enough in programming to set the Relevance equation to fit my needs :(

May anyone please help me where to start?

Thank you very much in advance

Best

Sebastian Tischer
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 10 months ago - 9 years 10 months ago #108721 by tpartner
Replied by tpartner on topic Between subject design - Relevance equation
Create an equation question - code randNum - and place this expression in it. This expression will load randNum with a random number between 1 and 3.

Then conditions can be based on that question.

Code:
{if(randNum >= 0, randNum , rand(1,3))}


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 10 months ago by tpartner.
The following user(s) said Thank You: tischer_s
The topic has been locked.
  • tischer_s
  • tischer_s's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108724 by tischer_s
Replied by tischer_s on topic Between subject design - Relevance equation
Hi tpartner,

thank you very very much for your great help :)

so I will give each question group these condition?

But does this shuffle the groups like this?

user 1: t3_pp t3_q t3_v t3_n t3_k
user 2: t2_pp t2_q t2_v t2_n t2_k
user 3: t2_pp t2_q t2_v t2_n t2_k
user 4: t1_pp t1_q t1_v t1_n t1_k

I dont want t1 and t2 mixed for one user!

Do you know how I mean?
The topic has been locked.
  • tischer_s
  • tischer_s's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108730 by tischer_s
Replied by tischer_s on topic Between subject design - Relevance equation
Or does this condition mean it generates a random number between 1 and 3 and then selects the group which got a randomize number equal to the one generated?

For example:

I give all Treatment question groups the following randimize numbers(because other numbers already used):

t1 - 11
t2 - 12
t3 - 13

Now I make the equation like:

{if(randNum >= 0, randNum , rand(11,13))}

Does this mean if the random number 12 is generated it only shows t2 question types?
Are they shuffled then too?

Thank you very much for your help :)

Best
Sebastian
The topic has been locked.
  • tischer_s
  • tischer_s's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #108736 by tischer_s
Replied by tischer_s on topic Between subject design - Relevance equation
Ok, I got it :) Thanks a lot for your help :)
The topic has been locked.
  • tischer_s
  • tischer_s's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 10 months ago #109069 by tischer_s
Replied by tischer_s on topic Between subject design - Relevance equation
Hi again,

I am currently in the pretest phase and want to switch to a within subject design.

Is it possible that I modify this equation so that the variable "randnumber" is always 1 and 2 and 3?

if(randnumber > 0, randnumber, rand(1, 3))

I want that I don't need to modify each question group again, thats why I want to store all three numbers in "randnumber".


Is there any way of doing so?

Thank you very much for your help :)

Best
Sebastian
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 10 months ago #109126 by tpartner
Replied by tpartner on topic Between subject design - Relevance equation
No, by definition you can only store one value.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose