Welcome, Guest
Username: Password: Remember me

TOPIC: Between subject design - Relevance equation

Between subject design - Relevance equation 5 months 6 days ago #108629

  • tischer_s
  • tischer_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
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 administrator has disabled public write access.

Between subject design - Relevance equation 5 months 4 days ago #108721

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
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.

{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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 5 months 4 days ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: tischer_s

Between subject design - Relevance equation 5 months 4 days ago #108724

  • tischer_s
  • tischer_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
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 administrator has disabled public write access.

Between subject design - Relevance equation 5 months 4 days ago #108730

  • tischer_s
  • tischer_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
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 administrator has disabled public write access.

Between subject design - Relevance equation 5 months 4 days ago #108736

  • tischer_s
  • tischer_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
Ok, I got it :) Thanks a lot for your help :)
The administrator has disabled public write access.

Between subject design - Relevance equation 4 months 4 weeks ago #109069

  • tischer_s
  • tischer_s's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 19
  • Karma: 0
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 administrator has disabled public write access.

Between subject design - Relevance equation 4 months 3 weeks ago #109126

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4264
  • Thank you received: 801
  • Karma: 368
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.200 seconds
Donation Image